Intel does not have a 128-bit FP representation. 80-bits is as good as it
gets. The 80-bit form is stored in a 128-bit memory location.
-Matt
Hmmm. Yah, 10 ^ -20 cannot be exactly represented in any 2s complement FP
format. So unless there is a requirement that it round up, that result is
perfectly valid.
long double d;
d = pow(10.0, -20.0);
printf("%23.23Lg\n", d);
d = powl(10.0, -20.0);
Actually, it doesn't matter much. I just noticed that fpgetprec is
deprecated while new API fesetround doesn't allow to set up 80-bit
precision (63-bit mantissa).
So, I fixed the test by simply switching to powl.
--
Aleksej Lebedev
On 22/09/16 20:18, Aleksej Lebedev wrote:
I did some
I did some investigation and found that FreeBSD and therefore DragonFly
allows to set up rounding precision modes via fpgetprec(3), but
the rounding precision that is supposed to be enough (FP_PE) is already
set by default.
Also, quick search showed that IEEE only requires so called exact
Hi, everyone!
I'm porting ChezScheme that was recently opensourced to DragonFly.
I was able to compile it, but lots of tests are failing. At least some
of them are due to (minor) bugs in DragonFly
(http://bugs.dragonflybsd.org/issues/2951).
Also I noticed that one of the tests is failing