1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00
freebsd/lib/msun
Bruce Evans fe72622ebe 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).
2006-07-05 22:59:33 +00:00
..
alpha Add symbol versioning to libm. 2006-03-27 23:59:45 +00:00
amd64 Add symbol versioning to libm. 2006-03-27 23:59:45 +00:00
arm Add symbol versioning to libm. 2006-03-27 23:59:45 +00:00
bsdsrc Removed an unused declaration which was so old that it wasn't a prototype 2005-11-18 05:03:12 +00:00
i387 Removed the optimized asm versions of scalb() and scalbf(). These 2006-07-05 20:06:42 +00:00
ia64 Add symbol versioning to libm. 2006-03-27 23:59:45 +00:00
man s/5.5/6.0/ in HISTORY section. 2005-11-24 09:25:10 +00:00
powerpc Add symbol versioning to libm. 2006-03-27 23:59:45 +00:00
sparc64 Add symbol versioning to libm. 2006-03-27 23:59:45 +00:00
src Fixed tanh(-0.0) on ia64 and optimizeed tanh(x) for 2**-55 <= |x| < 2006-07-05 22:59:33 +00:00
Makefile Add symbol versioning to libm. 2006-03-27 23:59:45 +00:00
Symbol.map Add symbol versioning to libm. 2006-03-27 23:59:45 +00:00