Why use float and double instead of real?

Witold Baryluk baryluk at smp.if.uj.edu.pl
Tue Jun 23 12:05:41 PDT 2009


Dnia 2009-06-23, wto o godzinie 17:14 +0000, BCS pisze:
> Reply to Witold,

> > this is exactly the same think which cpu already does when dealing
> > with doubles and floats. internal computations are performed in ext.
> > precision, and written somewhere, truncating to 64bits.
> > 
> 
> You misread me; if you need computation to exactly match 32 or 64bit math, 
> you will need to round after every single operation (+, -, *, /, etc.), what 
> most systems do is use full internal precision for intermediate value and 
> round only when the value is stored to a variable. If you don't need bit-for-bit 
> matches, then 80-bit matches IEEE-754 semantics just with more bits of precision.
> 
> 

We both know this, so EOT. :)




More information about the Digitalmars-d-learn mailing list