Why don't we switch to C like floating pointed arithmetic instead of automatic expansion to reals?

Ilya Yaroshenko via Digitalmars-d digitalmars-d at puremagic.com
Sat Aug 6 13:06:14 PDT 2016


On Saturday, 6 August 2016 at 19:51:11 UTC, Walter Bright wrote:
> On 8/6/2016 2:48 AM, Ilya Yaroshenko wrote:
>>> I don't know what the point of fusedMath is.
>> It allows a compiler to replace two arithmetic operations with 
>> single composed
>> one, see AVX2 (FMA3 for intel and FMA4 for AMD) instruction 
>> set.
>
> I understand that, I just don't understand why that wouldn't be 
> done anyway.

Some applications requires exactly the same results for different 
architectures (probably because business requirement). So this 
optimization is turned off by default in LDC for example.


More information about the Digitalmars-d mailing list