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

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sat Aug 6 02:35:32 PDT 2016


On 8/6/2016 1:21 AM, Ilya Yaroshenko wrote:
> We need 2 new pragmas with the same syntax as `pragma(inline, xxx)`:
>
> 1. `pragma(fusedMath)` allows fused mul-add, mul-sub, div-add, div-sub operations.
> 2. `pragma(fastMath)` equivalents to [1]. This pragma can be used to allow
> extended precision.


The LDC fastmath bothers me a lot. It throws away proper NaN and infinity 
handling, and throws away precision by allowing reciprocal and algebraic 
transformations. As I've said before, correctness should be first, not speed, 
and fastmath has nothing to do with this thread.


I don't know what the point of fusedMath is.


More information about the Digitalmars-d mailing list