]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorAndreas Jaeger <aj@suse.de>
Mon, 23 Jul 2001 08:54:31 +0000 (08:54 +0000)
committerAndreas Jaeger <aj@suse.de>
Mon, 23 Jul 2001 08:54:31 +0000 (08:54 +0000)
2001-07-23  Stephen L Moshier <moshier@mediaone.net>

* sysdeps/ieee754/ldbl-128/s_expm1l.c (__expm1l): Return proper
sign for 0 input.  Return NaN with no exception for NaN input.

ChangeLog
sysdeps/ieee754/ldbl-128/s_expm1l.c

index 73e157d7505a3f4b2e39fb10837114725998b28a..d284e62c7bcf43b29b870336df51fe7c82624f5c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-07-23  Stephen L Moshier <moshier@mediaone.net>
+
+       * sysdeps/ieee754/ldbl-128/s_expm1l.c (__expm1l): Return proper
+       sign for 0 input.  Return NaN with no exception for NaN input.
+
 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
 
        * iconv/gconv_builtin.h: ISO-106464/UTF-8/ transformation must
index f662ee909366d888fb19c77541824a357fa98e6f..c03635e2ab7442ef0781788116079d10006b3e55 100644 (file)
@@ -81,14 +81,6 @@ __expm1l (long double x)
   ieee854_long_double_shape_type u;
   int k;
 
-  /* Overflow.  */
-  if (x > maxlog)
-    return (big * big);
-
-  /* Minimum value.  */
-  if (x < minarg)
-    return (4.0 / big - 1.0L);
-
   /* Detect infinity and NaN.  */
   u.value = x;
   ix = u.parts32.w0;
@@ -104,10 +96,22 @@ __expm1l (long double x)
          else
            return x;
        }
-      /* NaN.  */
-      return (x + x);
+      /* NaN. No invalid exception. */
+      return x;
     }
 
+  /* expm1(+- 0) = +- 0.  */
+  if ((ix == 0) && (u.parts32.w1 | u.parts32.w2 | u.parts32.w3) == 0)
+    return x;
+  /* Overflow.  */
+  if (x > maxlog)
+    return (big * big);
+  /* Minimum value.  */
+  if (x < minarg)
+    return (4.0/big - 1.0L);
+
   /* Express x = ln 2 (k + remainder), remainder not exceeding 1/2. */
   xx = C1 + C2;                        /* ln 2. */
   px = __floorl (0.5 + x / xx);