1998-09-09  Benjamin Kosnik  <bkoz@tintin.cygnus.com>

	* math/libm-test.c (exp10_test): Adapt epsilons for powerpc.
	(csqrt_test): Likewise.
	* sysdeps/powerpc/bits/fenv.h: Add parens. .
This commit is contained in:
Ulrich Drepper 1998-09-09 22:40:55 +00:00
parent 8e140239ae
commit adac845094
3 changed files with 25 additions and 19 deletions

View File

@ -1,3 +1,9 @@
1998-09-09 Benjamin Kosnik <bkoz@tintin.cygnus.com>
* math/libm-test.c (exp10_test): Adapt epsilons for powerpc.
(csqrt_test): Likewise.
* sysdeps/powerpc/bits/fenv.h: Add parens. .
1998-09-09 18:48 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/powerpc/dl-start.S (_start): Pass pointer to

View File

@ -58,7 +58,7 @@
ccos, ccosh, cexp, clog, cpow, csin, csinh, csqrt, ctan, ctanh.
At the moment the following functions aren't tested:
conj, cproj, cimag, creal, drem,
OB conj, cproj, cimag, creal, drem,
j0, j1, jn, y0, y1, yn,
significand,
nan
@ -1206,13 +1206,13 @@ exp10_test (void)
check_isinfp ("exp10 (+inf) == +inf", FUNC(exp10) (plus_infty));
check ("exp10 (-inf) == 0", FUNC(exp10) (minus_infty), 0);
check_eps ("exp10 (3) == 1000", FUNC(exp10) (3), 1000,
CHOOSE(5e-16, 0, 0));
CHOOSE(5e-16, 7e-13, 2e-4));
check_eps ("exp10 (-1) == 0.1", FUNC(exp10) (-1), 0.1,
CHOOSE(6e-18, 0, 0));
CHOOSE(6e-18, 3e-17, 8e-09));
check_isinfp ("exp10 (1e6) == +inf", FUNC(exp10) (1e6));
check ("exp10 (-1e6) == 0", FUNC(exp10) (-1e6), 0);
check_eps ("exp10 (0.7) == 5.0118723...", FUNC(exp10) (0.7),
5.0118723362727228500L, CHOOSE(6e-16, 9e-16, 0));
5.0118723362727228500L, CHOOSE(6e-16, 9e-16, 5e-7));
}
@ -5154,7 +5154,7 @@ csqrt_test (void)
check_eps ("real(csqrt(0.7 + i 1.2)) == 1.02206...", __real__ result,
1.0220676100300264507L, CHOOSE(3e-17L, 3e-16, 2e-7));
check_eps ("imag(csqrt(0.7 + i 1.2)) == 0.58704...", __imag__ result,
0.5870453129635652115L, CHOOSE(7e-18L, 0, 0));
0.5870453129635652115L, CHOOSE(7e-18L, 0, 6e-8));
result = FUNC(csqrt) (BUILD_COMPLEX (-2, -3));
check_eps ("real(csqrt(-2 - i 3)) == 0.89597...", __real__ result,

View File

@ -25,13 +25,13 @@
the appropriate bits in the FPSCR... */
enum
{
FE_INEXACT = 1 << 31-6,
FE_INEXACT = 1 << (31 - 6),
#define FE_INEXACT FE_INEXACT
FE_DIVBYZERO = 1 << 31-5,
FE_DIVBYZERO = 1 << (31 - 5),
#define FE_DIVBYZERO FE_DIVBYZERO
FE_UNDERFLOW = 1 << 31-4,
FE_UNDERFLOW = 1 << (31 - 4),
#define FE_UNDERFLOW FE_UNDERFLOW
FE_OVERFLOW = 1 << 31-3,
FE_OVERFLOW = 1 << (31 - 3),
#define FE_OVERFLOW FE_OVERFLOW
/* ... except for FE_INVALID, for which we use bit 31. FE_INVALID
@ -40,7 +40,7 @@ enum
says that it must be a power of 2. Instead we use bit 2 which
is the summary bit for all the FE_INVALID exceptions, which
kind of makes sense. */
FE_INVALID = 1 << 31-2,
FE_INVALID = 1 << (31 - 2),
#define FE_INVALID FE_INVALID
#ifdef __USE_GNU
@ -51,42 +51,42 @@ enum
enable these exceptions individually. */
/* Operation with SNaN. */
FE_INVALID_SNAN = 1 << 31-7,
FE_INVALID_SNAN = 1 << (31 - 7),
# define FE_INVALID_SNAN FE_INVALID_SNAN
/* Inf - Inf */
FE_INVALID_ISI = 1 << 31-8,
FE_INVALID_ISI = 1 << (31 - 8),
# define FE_INVALID_ISI FE_INVALID_ISI
/* Inf / Inf */
FE_INVALID_IDI = 1 << 31-9,
FE_INVALID_IDI = 1 << (31 - 9),
# define FE_INVALID_IDI FE_INVALID_IDI
/* 0 / 0 */
FE_INVALID_ZDZ = 1 << 31-10,
FE_INVALID_ZDZ = 1 << (31 - 10),
# define FE_INVALID_ZDZ FE_INVALID_ZDZ
/* Inf * 0 */
FE_INVALID_IMZ = 1 << 31-11,
FE_INVALID_IMZ = 1 << (31 - 11),
# define FE_INVALID_IMZ FE_INVALID_IMZ
/* Comparison with NaN or SNaN. */
FE_INVALID_COMPARE = 1 << 31-12,
FE_INVALID_COMPARE = 1 << (31 - 12),
# define FE_INVALID_COMPARE FE_INVALID_COMPARE
/* Invalid operation flag for software (not set by hardware). */
/* Note that some chips don't have this implemented, presumably
because no-one expected anyone to write software for them %-). */
FE_INVALID_SOFTWARE = 1 << 31-21,
FE_INVALID_SOFTWARE = 1 << (31 - 21),
# define FE_INVALID_SOFTWARE FE_INVALID_SOFTWARE
/* Square root of negative number (including -Inf). */
/* Note that some chips don't have this implemented. */
FE_INVALID_SQRT = 1 << 31-22,
FE_INVALID_SQRT = 1 << (31 - 22),
# define FE_INVALID_SQRT FE_INVALID_SQRT
/* Conversion-to-integer of a NaN or a number too large or too small. */
FE_INVALID_INTEGER_CONVERSION = 1 << 31-23,
FE_INVALID_INTEGER_CONVERSION = 1 << (31 - 23),
# define FE_INVALID_INTEGER_CONVERSION FE_INVALID_INTEGER_CONVERSION
# define FE_ALL_INVALID \