Formatting -0.0 as 0.0
Steven Schveighoffer
schveiguy at gmail.com
Sat Oct 16 14:15:03 UTC 2021
On 10/15/21 6:26 PM, Elronnd wrote:
> On Friday, 15 October 2021 at 14:09:32 UTC, Steven Schveighoffer wrote:
>> Note that if ldc is optimizing out an addition with 0, and that
>> actually changes the observable results, that technically is an
>> invalid optimization.
>
> I disagree. With -ffast-math you're explicitly saying 'please feel free
> to make changes to expressions involving floating-point numbers which
> maintain all observable results only under the assumption that
> floating-point numbers have properties that they actually don't'.
Yeah you are probably right. I didn't realize that was a special
optimization flag.
-Steve
More information about the Digitalmars-d
mailing list