Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 !@monks...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2017-08-20 02:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (313 votes). Check out past polls.

    Notices?