summaryrefslogtreecommitdiffstats
path: root/sys/netinet/in_rmx.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2006-07-05 22:59:33 +0000
committerbde <bde@FreeBSD.org>2006-07-05 22:59:33 +0000
commitebfec8dd17bf246ce347fe94ba6c05bce1b02f5e (patch)
tree647731f60d6783f4360e86f8b034089a85b061fb /sys/netinet/in_rmx.c
parenteeaf8558c3eca277c83abbbfef4341681a0d3af5 (diff)
downloadFreeBSD-src-ebfec8dd17bf246ce347fe94ba6c05bce1b02f5e.zip
FreeBSD-src-ebfec8dd17bf246ce347fe94ba6c05bce1b02f5e.tar.gz
Fixed tanh(-0.0) on ia64 and optimizeed tanh(x) for 2**-55 <= |x| <
2**-28 as a side effect, by merging with the float precision version of tanh() and the double precision version of sinh(). For tiny x, tanh(x) ~= x, and we used the expression x*(one+x) to return this value (x) and set the inexact flag iff x != 0. This doesn't work on ia64 since gcc -O does the dubious optimization x*(one+x) = x+x*x so as to use fma, so the sign of -0.0 was lost. Instead, handle tiny x in the same as sinh(), although this is imperfect: - return x directly and set the inexact flag in a less efficient way. - increased the threshold for non-tinyness from 2**-55 to 2**-28 so that many more cases are optimized than are pessimized. Updated some comments and fixed bugs in others (ranges for half-open intervals mostly had the open end backwards, and there were nearby style bugs).
Diffstat (limited to 'sys/netinet/in_rmx.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud