pow(2) returns slightly different result compared to other platforms' implementation

2016-09-22 Thread Aleksej Lebedev
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 bec

Re: pow(2) returns slightly different result compared to other platforms' implementation

2016-09-22 Thread Aleksej Lebedev
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 roun