Always false float comparisons
Marco Leise via Digitalmars-d
digitalmars-d at puremagic.com
Thu May 12 16:32:39 PDT 2016
Am Thu, 12 May 2016 09:03:58 -0400
schrieb Steven Schveighoffer <schveiguy at yahoo.com>:
> Not taking one side or another on this, but due to D doing everything
> with reals, this is already the case.
>
> -Steve
As far as I have understood the situation:
- FPU instructions are inaccurate
- FPU is typically set to highest precision (80-bit)
to give accurate float/double results
- SSE instructions yield accurately rounded results
- Need for 80 bits greatly reduced with SSE
- FPU deprectated on 64-bit x86
- Results of FPU and SSE math differ
- Compiler writers discordant
GCC: compiler switch for SSE or FPU, SSE default
DMD: FPU only
- Unless CTFE uses soft-float implementation, depending on
compiler and flags used to compile a D compiler, resulting
executable produces different CTFE floating-point results
--
Marco
More information about the Digitalmars-d
mailing list