Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: NaN output

by BrowserUk (Patriarch)
on Mar 05, 2014 at 16:49 UTC ( [id://1077107]=note: print w/replies, xml ) Need Help??


in reply to NaN output

Are you sure that you are not encountering an endian problem? For example, the 4 byte value 0x7ff00000, decoded as a big-endian float produces a valid number:

print unpack 'f>', pack 'V', 0x7ff00000;; 8.6273742553086e-041

But treated as a little-endian value it produces NaN:

print unpack 'f<', pack 'V', 0x7ff00000;; 1.#QNAN

Just a thought.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2024-03-28 12:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found