mirror of git://sourceware.org/git/glibc.git
Fix errno for IBM long double.
After the last addition to the math test suite PPC routines haven't been adjusted so far.
This commit is contained in:
parent
0323b051be
commit
38ae768d88
|
@ -1,5 +1,10 @@
|
||||||
2009-05-22 Andreas Schwab <schwab@linux-m68k.org>
|
2009-05-22 Andreas Schwab <schwab@linux-m68k.org>
|
||||||
|
|
||||||
|
* sysdeps/ieee754/ldbl-128ibm/s_sinl.c: Set errno for ±Inf.
|
||||||
|
* sysdeps/ieee754/ldbl-128ibm/s_cosl.c: Likewise.
|
||||||
|
* sysdeps/ieee754/ldbl-128ibm/s_tanl.c: Likewise.
|
||||||
|
* sysdeps/ieee754/ldbl-128ibm/s_expm1l.c: Set errno for overflow.
|
||||||
|
|
||||||
* sysdeps/powerpc/powerpc32/____longjmp_chk.S: New file.
|
* sysdeps/powerpc/powerpc32/____longjmp_chk.S: New file.
|
||||||
* sysdeps/powerpc/powerpc64/____longjmp_chk.S: New file.
|
* sysdeps/powerpc/powerpc64/____longjmp_chk.S: New file.
|
||||||
* sysdeps/powerpc/powerpc32/__longjmp-common.S: Use CHECK_SP if
|
* sysdeps/powerpc/powerpc32/__longjmp-common.S: Use CHECK_SP if
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
* TRIG(x) returns trig(x) nearly rounded
|
* TRIG(x) returns trig(x) nearly rounded
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
#include <math_ldbl_opt.h>
|
#include <math_ldbl_opt.h>
|
||||||
|
@ -67,9 +68,11 @@
|
||||||
return __kernel_cosl(x,z);
|
return __kernel_cosl(x,z);
|
||||||
|
|
||||||
/* cos(Inf or NaN) is NaN */
|
/* cos(Inf or NaN) is NaN */
|
||||||
else if (ix>=0x7ff0000000000000LL)
|
else if (ix>=0x7ff0000000000000LL) {
|
||||||
|
if (ix == 0x7ff0000000000000LL)
|
||||||
|
__set_errno (EDOM);
|
||||||
return x-x;
|
return x-x;
|
||||||
|
}
|
||||||
/* argument reduction needed */
|
/* argument reduction needed */
|
||||||
else {
|
else {
|
||||||
n = __ieee754_rem_pio2l(x,y);
|
n = __ieee754_rem_pio2l(x,y);
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
License along with this library; if not, write to the Free Software
|
License along with this library; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
#include <math_ldbl_opt.h>
|
#include <math_ldbl_opt.h>
|
||||||
|
@ -120,7 +121,10 @@ __expm1l (long double x)
|
||||||
|
|
||||||
/* Overflow. */
|
/* Overflow. */
|
||||||
if (x > maxlog)
|
if (x > maxlog)
|
||||||
|
{
|
||||||
|
__set_errno (ERANGE);
|
||||||
return (big * big);
|
return (big * big);
|
||||||
|
}
|
||||||
|
|
||||||
/* Minimum value. */
|
/* Minimum value. */
|
||||||
if (x < minarg)
|
if (x < minarg)
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
* TRIG(x) returns trig(x) nearly rounded
|
* TRIG(x) returns trig(x) nearly rounded
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
#include <math_ldbl_opt.h>
|
#include <math_ldbl_opt.h>
|
||||||
|
@ -67,8 +68,11 @@
|
||||||
return __kernel_sinl(x,z,0);
|
return __kernel_sinl(x,z,0);
|
||||||
|
|
||||||
/* sin(Inf or NaN) is NaN */
|
/* 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 */
|
/* argument reduction needed */
|
||||||
else {
|
else {
|
||||||
n = __ieee754_rem_pio2l(x,y);
|
n = __ieee754_rem_pio2l(x,y);
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
* TRIG(x) returns trig(x) nearly rounded
|
* TRIG(x) returns trig(x) nearly rounded
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
#include <math_ldbl_opt.h>
|
#include <math_ldbl_opt.h>
|
||||||
|
@ -66,8 +67,11 @@
|
||||||
if(ix <= 0x3fe921fb54442d10LL) return __kernel_tanl(x,z,1);
|
if(ix <= 0x3fe921fb54442d10LL) return __kernel_tanl(x,z,1);
|
||||||
|
|
||||||
/* tanl(Inf or NaN) is NaN */
|
/* 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 */
|
/* argument reduction needed */
|
||||||
else {
|
else {
|
||||||
n = __ieee754_rem_pio2l(x,y);
|
n = __ieee754_rem_pio2l(x,y);
|
||||||
|
|
Loading…
Reference in New Issue