Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: What does this print for you?

by kikuchiyo (Pilgrim)
on Dec 25, 2009 at 10:32 UTC ( #814341=note: print w/replies, xml ) Need Help??

in reply to What does this print for you?

Thank you all for your answers.

I used this floating point converter to generate my numbers:

I simply reversed the characters in "Merry Ch" and "ristmas!" and fed the hex equivalents into the converter. However, I had to adjust them a bit to make the script actually print Merry Christmas!.

Now if we assume the converter to be conformant to IEEE-754, then it follows that your Perl (or compiler or OS) is not conformant, if it prints "Merry Christmas!" Even if it is a small difference numerically, it is a difference.

Anyway, I wish you all a merry Christmas, regardless the correctness of your floating point library. :)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://814341]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2018-01-19 04:29 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (215 votes). Check out past polls.