summaryrefslogtreecommitdiff
path: root/libc/sysdeps/ieee754/ldbl-128ibm
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-05-22 20:28:34 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-05-22 20:28:34 +0000
commit6b946eeb50a57ee4ff8c50783d516bb03cf89b7a (patch)
tree19d7e79d38b73083f6786b448e2c148e04533b9a /libc/sysdeps/ieee754/ldbl-128ibm
parent8394b52f4259c85b39e1114e6f239599f50fbcc2 (diff)
Merge changes between r8463 and r8486 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@8487 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/sysdeps/ieee754/ldbl-128ibm')
-rw-r--r--libc/sysdeps/ieee754/ldbl-128ibm/s_cosl.c7
-rw-r--r--libc/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c6
-rw-r--r--libc/sysdeps/ieee754/ldbl-128ibm/s_sinl.c8
-rw-r--r--libc/sysdeps/ieee754/ldbl-128ibm/s_tanl.c8
4 files changed, 22 insertions, 7 deletions
diff --git a/libc/sysdeps/ieee754/ldbl-128ibm/s_cosl.c b/libc/sysdeps/ieee754/ldbl-128ibm/s_cosl.c
index 59a819670..8470850fc 100644
--- a/libc/sysdeps/ieee754/ldbl-128ibm/s_cosl.c
+++ b/libc/sysdeps/ieee754/ldbl-128ibm/s_cosl.c
@@ -44,6 +44,7 @@
* TRIG(x) returns trig(x) nearly rounded
*/
+#include <errno.h>
#include "math.h"
#include "math_private.h"
#include <math_ldbl_opt.h>
@@ -67,9 +68,11 @@
return __kernel_cosl(x,z);
/* cos(Inf or NaN) is NaN */
- else if (ix>=0x7ff0000000000000LL)
+ else if (ix>=0x7ff0000000000000LL) {
+ if (ix == 0x7ff0000000000000LL)
+ __set_errno (EDOM);
return x-x;
-
+ }
/* argument reduction needed */
else {
n = __ieee754_rem_pio2l(x,y);
diff --git a/libc/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c b/libc/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c
index 735006575..f631eddf5 100644
--- a/libc/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c
+++ b/libc/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c
@@ -51,6 +51,7 @@
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <errno.h>
#include "math.h"
#include "math_private.h"
#include <math_ldbl_opt.h>
@@ -120,7 +121,10 @@ __expm1l (long double x)
/* Overflow. */
if (x > maxlog)
- return (big * big);
+ {
+ __set_errno (ERANGE);
+ return (big * big);
+ }
/* Minimum value. */
if (x < minarg)
diff --git a/libc/sysdeps/ieee754/ldbl-128ibm/s_sinl.c b/libc/sysdeps/ieee754/ldbl-128ibm/s_sinl.c
index 8cc592c61..bd72225e1 100644
--- a/libc/sysdeps/ieee754/ldbl-128ibm/s_sinl.c
+++ b/libc/sysdeps/ieee754/ldbl-128ibm/s_sinl.c
@@ -44,6 +44,7 @@
* TRIG(x) returns trig(x) nearly rounded
*/
+#include <errno.h>
#include "math.h"
#include "math_private.h"
#include <math_ldbl_opt.h>
@@ -67,8 +68,11 @@
return __kernel_sinl(x,z,0);
/* sin(Inf or NaN) is NaN */
- else if (ix>=0x7ff0000000000000LL) return x-x;
-
+ else if (ix>=0x7ff0000000000000LL) {
+ if (ix == 0x7ff0000000000000LL)
+ __set_errno (EDOM);
+ return x-x;
+ }
/* argument reduction needed */
else {
n = __ieee754_rem_pio2l(x,y);
diff --git a/libc/sysdeps/ieee754/ldbl-128ibm/s_tanl.c b/libc/sysdeps/ieee754/ldbl-128ibm/s_tanl.c
index ea5a7f0ff..913f38f24 100644
--- a/libc/sysdeps/ieee754/ldbl-128ibm/s_tanl.c
+++ b/libc/sysdeps/ieee754/ldbl-128ibm/s_tanl.c
@@ -44,6 +44,7 @@
* TRIG(x) returns trig(x) nearly rounded
*/
+#include <errno.h>
#include "math.h"
#include "math_private.h"
#include <math_ldbl_opt.h>
@@ -66,8 +67,11 @@
if(ix <= 0x3fe921fb54442d10LL) return __kernel_tanl(x,z,1);
/* tanl(Inf or NaN) is NaN */
- else if (ix>=0x7ff0000000000000LL) return x-x; /* NaN */
-
+ else if (ix>=0x7ff0000000000000LL) {
+ if (ix == 0x7ff0000000000000LL)
+ __set_errno (EDOM);
+ return x-x; /* NaN */
+ }
/* argument reduction needed */
else {
n = __ieee754_rem_pio2l(x,y);