about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128/s_expm1l.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-05-29 12:00:22 -0700
committerUlrich Drepper <drepper@redhat.com>2009-05-29 12:00:22 -0700
commit7f3394bdf34e28b374e5569a7a74ddac734fb172 (patch)
tree70e5277461d3299d9706f79077843710dddbd177 /sysdeps/ieee754/ldbl-128/s_expm1l.c
parentb8bb339f7d684654295aca2dedb69c2c069a7cab (diff)
downloadglibc-7f3394bdf34e28b374e5569a7a74ddac734fb172.tar.gz
glibc-7f3394bdf34e28b374e5569a7a74ddac734fb172.tar.xz
glibc-7f3394bdf34e28b374e5569a7a74ddac734fb172.zip
Fix errno for boundary conditions in 128-bit long double.
Similar to the changes which went already in for the other formats,
follow POSIX rules for errno.
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/s_expm1l.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/s_expm1l.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_expm1l.c b/sysdeps/ieee754/ldbl-128/s_expm1l.c
index 78bbe65b53..a82489bb24 100644
--- a/sysdeps/ieee754/ldbl-128/s_expm1l.c
+++ b/sysdeps/ieee754/ldbl-128/s_expm1l.c
@@ -53,6 +53,7 @@
 
 
 
+#include <errno.h>
 #include "math.h"
 #include "math_private.h"
 
@@ -121,7 +122,10 @@ __expm1l (long double x)
 
   /* Overflow.  */
   if (x > maxlog)
-    return (big * big);
+    {
+      __set_errno (ERANGE);
+      return (big * big);
+    }
 
   /* Minimum value.  */
   if (x < minarg)