bearophile wrote:
Don:
I think that even DMD should be using a 128-bit emulator for
internal constants, regardless of the machine precision.
Can you tell me why?
(Note: LDC supports 128 bit integers too. Maybe even 128 bit floating points).
Because it'd be nice if the language gave a guarantee for how much
precision is used in literals. The more of those machine-specific things
can be removed, the better.
the compiler should not depend on NaNs being handled correctly in the
C++ compiler.
By "C++ compiler" do you mean the back-end? I think GCC, LLVM, ICC and DMD
support NaNs well enough (LLVM supports signaling NaNs too, they say me).
No. I meant the constant folding which the compiler performs. If you
write (a==b) in the compiler source code, does it work correctly if a or
b is a NaN ?