real operations imprecise?

kinke kinke at gmx.net
Tue May 5 14:47:28 UTC 2020


I can't even reproduce the 'missing' digits. On run.dlang.io, 
i.e., on Linux x64 (and so x87 real), I get an identical output 
for both DMD and LDC:

void main()
{
     import core.stdc.stdio, std.math;
     printf("%.70Lf\n", PI);
     printf("%.70Lf\n", PI_2);
     printf("%La\n", PI);
     printf("%La\n", PI_2);
}

=>

3.1415926535897932385128089594061862044327426701784133911132812500000000
1.5707963267948966192564044797030931022163713350892066955566406250000000
0xc.90fdaa22168c235p-2
0xc.90fdaa22168c235p-3


More information about the Digitalmars-d-learn mailing list