diff options
author | das <das@FreeBSD.org> | 2004-08-05 01:44:55 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2004-08-05 01:44:55 +0000 |
commit | 73fe96f0a7ad5f492ecc11937cd91884c841d6dd (patch) | |
tree | 5c6b230c7c5af6c1af7a5ccbe7fc5bc52fd3fd89 /lib/msun/src | |
parent | 0a811906a48aa74a168f1b4eb1ebb40abddcb7bc (diff) | |
download | FreeBSD-src-73fe96f0a7ad5f492ecc11937cd91884c841d6dd.zip FreeBSD-src-73fe96f0a7ad5f492ecc11937cd91884c841d6dd.tar.gz |
Use isnormal() instead of fpclassify() to avoid dependency on libc.so.5.
Diffstat (limited to 'lib/msun/src')
-rw-r--r-- | lib/msun/src/s_round.c | 4 | ||||
-rw-r--r-- | lib/msun/src/s_roundf.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/lib/msun/src/s_round.c b/lib/msun/src/s_round.c index ea764ae..c3c0665 100644 --- a/lib/msun/src/s_round.c +++ b/lib/msun/src/s_round.c @@ -33,10 +33,8 @@ double round(double x) { double t; - int i; - i = fpclassify(x); - if (i == FP_INFINITE || i == FP_NAN) + if (!isnormal(x)) return (x); if (x >= 0.0) { diff --git a/lib/msun/src/s_roundf.c b/lib/msun/src/s_roundf.c index a040e16..ba42e8e 100644 --- a/lib/msun/src/s_roundf.c +++ b/lib/msun/src/s_roundf.c @@ -33,10 +33,8 @@ float roundf(float x) { float t; - int i; - i = fpclassify(x); - if (i == FP_INFINITE || i == FP_NAN) + if (!isnormal(x)) return (x); if (x >= 0.0) { |