summaryrefslogtreecommitdiff
path: root/lib/math/scale2-impl.myr
diff options
context:
space:
mode:
authorS. Gilles <sgilles@math.umd.edu>2018-04-20 14:33:46 -0400
committerS. Gilles <sgilles@math.umd.edu>2018-05-02 18:59:12 -0400
commit0dd6c9d5124707e4c69116745469e21f7e076429 (patch)
tree4af92429a7a4a9bb36667aa594fb70bc1b5d318d /lib/math/scale2-impl.myr
parente406ac08a6f68623f0454f2983b88575e69ca62b (diff)
downloadmc-0dd6c9d5124707e4c69116745469e21f7e076429.tar.gz
Implement most of expm1. Errors in huge numbers.
[Tan92] finishes off calculation of expm1(f) by range expansion, which involves multiplying a number by 2^M, where M grows roughly linearly with f. If f is very large (say, 0x0x42b17200 in single-precision), M may grow to be as larger than the maximal exponent (in this case, M = 128). If 2^M * P is calculated in the normal way, the intermediate value 2^M is not representable, causing mangled output. However, the result may still be computed: the value P is of magnitude < 1. Therefore, a scalb function will be necessary to perform this multiplication without creating unrepresentable intermediate values={
Diffstat (limited to 'lib/math/scale2-impl.myr')
0 files changed, 0 insertions, 0 deletions