Remove real type

strtr strtr at spam.com
Sun Apr 25 08:57:37 PDT 2010


Walter Bright Wrote:

> strtr wrote:
> > Walter Bright Wrote:
> > 
> >> strtr wrote:
> >>> I'm not really searching for perfect/fixed math, but that the math is 
> >>> consistent on different x86 hardware after compilation. Is this possible?
> >>> 
> >> Yes, but you'll have to avoid the math functions if you're using C ones.
> > As they are dynamic linked?
> 
> No, because the implementations of them vary from platform & compiler to
> platform & compiler. This is whether they are static or dynamically linked.
O.k. stay away from std.c.math :)

> 
> >> The D ones should give the same results.
> > So as long as I only use floats (and doubles) and use the std.math functions
> > I should be save over x86 ?
> 
> Given the same arguments, you'll get the same results on every D platform.  
yay :)

> But the calculation of the argument values can vary.
I'm not sure I understand what that means, calculations of the arguments. Could you give an example of a calculation of an argument?

> 
> > This would mean a lot to me :D Why do all the
> > std.math functions state reals as arguments?
> 
> Because they are designed for maximum precision.
I always thought that D supplied extra math functions on top of the C ones to support reals..




More information about the Digitalmars-d mailing list