80 bit floating point emulator

kinke noone at nowhere.com
Sun Feb 6 13:47:37 UTC 2022


On Sunday, 6 February 2022 at 13:42:16 UTC, Ola Fosheim Grøstad 
wrote:
> It says "or greater precision", so you can use a higher 
> precision library.

GDC does this. LDC could use an 128-bit emulation to fix e.g. 
cross-compilation from x86 to non-Apple AArch64 (but LLVM has 
such functionality already). And yeah, according to the spec, a 
128-bit emulation should suffice for targeting x86 too, but CTFE 
results might slightly diverge from a native x86-DMD then.

> But in general, it would be better to have real be a compile 
> time type only and instead have ieee32, ieee64, ieee80, ieee128 
> etc.

I strongly disagree. `real` is the cross-platform solution for 
'max hardware precision' or 'C long double', and most code should 
probably use float/double.


More information about the Digitalmars-d mailing list