Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Exploring IEEE754 floating point bit patterns.

by BrowserUk (Pope)
on Jul 29, 2012 at 06:46 UTC ( #984270=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        printf("%f %f\n",       inf / inf, -(inf / inf)); // -1.#IND00 -1.
    +#IND00
        printf("%.4f %.4f\n",   inf / inf, -(inf / inf)); // -1.#IND -1.#I
    +ND
        printf("%.10f %.10f\n", inf / inf, -(inf / inf)); // -1.#IND000000
    + -1.#IND000000
    
  2. or download this
        printf("%g %g\n", inf / inf, -(inf / inf));      // -1.#IND -1.#IN
    +D
    
  3. or download this
    print +( 10.0**20 + 1 ) - 10.0**20;;
    0
    
    print +( 10.0**20 - 10.0**20 ) + 1;;
    1
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2014-07-24 09:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (158 votes), past polls