summaryrefslogtreecommitdiffstats
path: root/newlib/libm/math/sf_tanh.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2001-04-04 13:33:01 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2001-04-04 13:33:01 +0000
commit16740220a22d09a1c63714d93f1efc5fbe3927f3 (patch)
tree7b24242b9b20a0ee328c94acd2c95e1a8778c944 /newlib/libm/math/sf_tanh.c
parent51fc3813e9a9ef8079b2fbde1b12647dd3f4ac93 (diff)
downloadcygnal-16740220a22d09a1c63714d93f1efc5fbe3927f3.tar.gz
cygnal-16740220a22d09a1c63714d93f1efc5fbe3927f3.tar.bz2
cygnal-16740220a22d09a1c63714d93f1efc5fbe3927f3.zip
* libc/include/machine/ieeefp.h: Comment about new configuration
macros _FLT_LARGEST_EXPONENT_IS_NORMAL and _FLT_NO_DENORMALS. * libm/common/fdlib.h: Define new macros for testing floats. * libm/common/sf_*: Use them. * libm/math/ef_*: Likewise. * libm/math/sf_*: Likewise.
Diffstat (limited to 'newlib/libm/math/sf_tanh.c')
-rw-r--r--newlib/libm/math/sf_tanh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libm/math/sf_tanh.c b/newlib/libm/math/sf_tanh.c
index ba9edf5c0..1eb44a2ff 100644
--- a/newlib/libm/math/sf_tanh.c
+++ b/newlib/libm/math/sf_tanh.c
@@ -35,7 +35,7 @@ static float one=1.0, two=2.0, tiny = 1.0e-30;
ix = jx&0x7fffffff;
/* x is INF or NaN */
- if(ix>=0x7f800000) {
+ if(!FLT_UWORD_IS_FINITE(ix)) {
if (jx>=0) return one/x+one; /* tanh(+-inf)=+-1 */
else return one/x-one; /* tanh(NaN) = NaN */
}