3 ms·
Current x87 processors still can do 80-bit arithmetic. For example: #include <stdio.h> int main(void) { long double ld; double d; ld = 1000;
by radford-neal 5y ago
Current x87 processors still can do 80-bit arithmetic. For example:
#include <stdio.h>
int main(void)
{ long double ld; double d;
ld = 1000; ld = ld/3;
d = 1000; d = d/3;
printf("%.16g %.16g\n",(double)(ld-333),d-333);
return 0;
}
produces the following output:
0.3333333333333334 0.3333333333333144
The 80-bit long double type gives higher accuracy.
This is on an AMD Threadripper PRO 3945WX using gcc 9.4.0.