Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: What does this print for you?

by kikuchiyo (Monk)
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: http://babbage.cs.qc.edu/IEEE-754/

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. :)


Comment on Re: What does this print for you?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://814341]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2015-07-04 22:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls