Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by creamygoodness (Curate)
on Jul 18, 2009 at 16:32 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://781353]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (1)
As of 2024-04-24 16:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found