3 ms·
> If this were assembly, there would be a chance that the test for whether to return the argument without change can be factored with the computation of the qua
by stephencanon 14y ago
> If this were assembly, there would be a chance that the test for whether to return the argument without change can be factored with the computation of the quantity (23 - e) (which would be computed directly from the unbiased exponent), so I would really have to try both before deciding on a variant.
It works out exactly as you suggest.
Tools: MPFR and GMP are extremely useful if using GPLv3 code doesn’t pose a problem for you and the small performance overhead of arbitrary-precision isn’t an issue. I have a small “big float” (not arbitrary precision, just more than enough digits than needed to design math library routines for “standard” precisions) library that I wrote myself. It’s not very complete but it has everything I need for library development.