On 2014-02-06 11:54:04 +0100, Niels Möller wrote: > Marc Glisse <marc.gli...@inria.fr> writes: > >> + ASSERT (d != 0.5*d); /* Exclude infinities */ > > > > That excludes more than infinities, it might also exclude > > FLT_TRUE_MIN, no? > > I would have expected that FLT_TRUE_MIN * 0.5 == 0.0. And then it's not > excluded by that assert. But I'm not familiar with those fine floating > point details.
In rounding mode toward +inf (FE_UPWARD), FLT_TRUE_MIN * 0.5 gives FLT_TRUE_MIN. You may need: ASSERT (d - d == 0); -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) _______________________________________________ gmp-devel mailing list gmp-devel@gmplib.org https://gmplib.org/mailman/listinfo/gmp-devel