Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: [Win32, C, and way OT] C floats, doubles, and their equivalence

by creamygoodness (Curate)
on Jul 18, 2009 at 16:32 UTC ( #781353=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    float foo = (float)nv;
    
  2. or download this
    double nv = (float)(2.0 / 3);
    
  3. or download this
    static __inline int
    compare_truncated_double_to_float(double d, float f)
    ...
        if (f == truncated_double) { return 1; }
        else                       { return 0; }
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2014-10-24 23:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (138 votes), past polls