August 07, 2016
On 8/6/2016 11:45 PM, Ilya Yaroshenko wrote:
>> So it does make sense that allowing fused operations would be equivalent to
>> having no maximum precision.
>
> Fused operations are mul/div+add/sub only.
> Fused operations does not break compesator subtraction:
> auto t = a - x + x;
> So, please, make them as separate pragma.

ok
August 07, 2016
On Saturday, 6 August 2016 at 09:35:32 UTC, Walter Bright wrote:
> 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.

It's not as cut and dry. Sometime, processing faster mean you can process more data to begin with, and get a better result.

1 2 3 4 5 6 7
Next ›   Last »