summaryrefslogtreecommitdiffstats
path: root/newlib/libm/mathfp/sf_logarithm.c
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2007-10-17 20:14:49 +0000
committerJeff Johnston <jjohnstn@redhat.com>2007-10-17 20:14:49 +0000
commit923f9573a3f8e607b264575448ca520b3f228863 (patch)
treee267943a9e0ba33a0b467d7c743a062c24eb015a /newlib/libm/mathfp/sf_logarithm.c
parentec828b8bf114ff4010e3c5d793553a318cafb890 (diff)
downloadcygnal-923f9573a3f8e607b264575448ca520b3f228863.tar.gz
cygnal-923f9573a3f8e607b264575448ca520b3f228863.tar.bz2
cygnal-923f9573a3f8e607b264575448ca520b3f228863.zip
2007-10-17 Jeff Johnston <jjohnstn@redhat.com>
* libm/mathfp/s_logarithm.c: Fix case where input is 0 to return -inf. * libm/mathfp/sf_logarithm.c: Ditto.
Diffstat (limited to 'newlib/libm/mathfp/sf_logarithm.c')
-rw-r--r--newlib/libm/mathfp/sf_logarithm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libm/mathfp/sf_logarithm.c b/newlib/libm/mathfp/sf_logarithm.c
index 224482f13..b8564c14c 100644
--- a/newlib/libm/mathfp/sf_logarithm.c
+++ b/newlib/libm/mathfp/sf_logarithm.c
@@ -42,7 +42,7 @@ _DEFUN (logarithmf, (float, int),
if (x <= 0.0)
{
errno = ERANGE;
- return (z_notanum_f.f);
+ return (-z_infinity_f.f);
}
/* Get the exponent and mantissa where x = f * 2^N. */