Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Exploring IEEE754 floating point bit patterns.

by BrowserUk (Pope)
on Jul 28, 2012 at 05:05 UTC ( #984141=CUFP: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #! perl -slw
    use strict;
    ...
        NEG_ZERO, NEG_DENORM_1ST, NEG_DENORM_LST, NEG_NORM_1ST, NEG_NORM_L
    +ST,
        NEG_INF, NEG_SNAN_1ST, NEG_SNAN_LST,
        NEG_IND, NEG_QNAN_1ST, NEG_QNAN_LST;
    
  2. or download this
    C:\test>ieee.pl
                          0 : 0000000000000000
    ...
                    -1.#IND : fff8000000000000
                   -1.#QNAN : fff8000000000001
                   -1.#QNAN : ffffffffffffffff
    
  3. or download this
    #include <stdio.h>
    #include <float.h>
    ...
                FPClassAsText( _fpclass( asDouble( dblPatns[ i ] ) ) )
            );
    }
    
  4. or download this
    C:\test>qnan
    0000000000000000 :                       0 Positive zero (+0)
    ...
    fff8000000000000 :                 -1.#IND Quiet NaN
    fff8000000000001 :                -1.#QNAN Quiet NaN
    ffffffffffffffff :                -1.#QNAN Quiet NaN
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-12-20 17:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (97 votes), past polls