Remove real type

Walter Bright newshound1 at digitalmars.com
Sat Apr 24 22:57:39 PDT 2010


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.


>> 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. But 
the calculation of the argument values can vary.

> 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.




More information about the Digitalmars-d mailing list