mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
Update.
* sysdeps/generic/e_scalb.c: Set invalid exception for invalid parameters. * sysdeps/generic/e_scalbf.c: New file. * sysdeps/generic/e_scalbl.c: New file.
This commit is contained in:
parent
2d7faa721d
commit
d210ca02ec
@ -1,5 +1,10 @@
|
||||
2001-02-19 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/generic/e_scalb.c: Set invalid exception for invalid
|
||||
parameters.
|
||||
* sysdeps/generic/e_scalbf.c: New file.
|
||||
* sysdeps/generic/e_scalbl.c: New file.
|
||||
|
||||
* sysdeps/ia64/fpu/Makefile (libm-sysdep-routines): Add libm_error,
|
||||
libm_frexp4, libm_frexp4f, libm_frexp4l, and all the functions also
|
||||
in libc.
|
||||
|
@ -20,6 +20,7 @@ static char rcsid[] = "$NetBSD: e_scalb.c,v 1.6 1995/05/10 20:46:09 jtc Exp $";
|
||||
* should use scalbn() instead.
|
||||
*/
|
||||
|
||||
#include <fenv.h>
|
||||
#include "math.h"
|
||||
#include "math_private.h"
|
||||
|
||||
@ -48,10 +49,17 @@ static char rcsid[] = "$NetBSD: e_scalb.c,v 1.6 1995/05/10 20:46:09 jtc Exp $";
|
||||
else if (x == 0)
|
||||
return x;
|
||||
else if (!__finite (x))
|
||||
{
|
||||
feraiseexcept (FE_INVALID);
|
||||
return __nan ("");
|
||||
}
|
||||
else return x/(-fn);
|
||||
}
|
||||
if (__rint(fn)!=fn) return __nan ("");
|
||||
if (__rint(fn)!=fn)
|
||||
{
|
||||
feraiseexcept (FE_INVALID);
|
||||
return __nan ("");
|
||||
}
|
||||
if ( fn > 65000.0) return __scalbn(x, 65000);
|
||||
if (-fn > 65000.0) return __scalbn(x,-65000);
|
||||
return __scalbn(x,(int)fn);
|
||||
|
@ -17,6 +17,7 @@
|
||||
static char rcsid[] = "$NetBSD: e_scalbf.c,v 1.3 1995/05/10 20:46:12 jtc Exp $";
|
||||
#endif
|
||||
|
||||
#include <fenv.h>
|
||||
#include "math.h"
|
||||
#include "math_private.h"
|
||||
|
||||
@ -45,10 +46,17 @@ static char rcsid[] = "$NetBSD: e_scalbf.c,v 1.3 1995/05/10 20:46:12 jtc Exp $";
|
||||
else if (x == 0)
|
||||
return x;
|
||||
else if (!__finitef (x))
|
||||
{
|
||||
feraiseexcept (FE_INVALID);
|
||||
return __nanf ("");
|
||||
}
|
||||
else return x/(-fn);
|
||||
}
|
||||
if (__rintf(fn)!=fn) return __nanf ("");
|
||||
if (__rintf(fn)!=fn)
|
||||
{
|
||||
feraiseexcept (FE_INVALID);
|
||||
return __nanf ("");
|
||||
}
|
||||
if ( fn > (float)65000.0) return __scalbnf(x, 65000);
|
||||
if (-fn > (float)65000.0) return __scalbnf(x,-65000);
|
||||
return __scalbnf(x,(int)fn);
|
||||
|
@ -24,6 +24,7 @@ static char rcsid[] = "$NetBSD: $";
|
||||
* should use scalbnl() instead.
|
||||
*/
|
||||
|
||||
#include <fenv.h>
|
||||
#include "math.h"
|
||||
#include "math_private.h"
|
||||
|
||||
@ -52,10 +53,17 @@ static char rcsid[] = "$NetBSD: $";
|
||||
else if (x == 0)
|
||||
return x;
|
||||
else if (!__finitel (x))
|
||||
{
|
||||
feraiseexcept (FE_INVALID);
|
||||
return __nanl ("");
|
||||
}
|
||||
else return x/(-fn);
|
||||
}
|
||||
if (__rintl(fn)!=fn) return __nanl ("");
|
||||
if (__rintl(fn)!=fn)
|
||||
{
|
||||
feraiseexcept (FE_INVALID);
|
||||
return __nanl ("");
|
||||
}
|
||||
if ( fn > 65000.0) return __scalbnl(x, 65000);
|
||||
if (-fn > 65000.0) return __scalbnl(x,-65000);
|
||||
return __scalbnl(x,(int)fn);
|
||||
|
Loading…
Reference in New Issue
Block a user