aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog24
-rw-r--r--FAQ.in10
-rw-r--r--math/libm-test.c1810
-rw-r--r--nis/rpcsvc/nis.h20
-rw-r--r--nis/rpcsvc/nis.x91
-rw-r--r--nis/rpcsvc/nis_object.x68
-rw-r--r--string/envz.h6
-rw-r--r--sunrpc/auth_des.c81
-rw-r--r--sunrpc/rpc/xdr.h37
-rw-r--r--sunrpc/rpc_hout.c15
-rw-r--r--sunrpc/rpc_main.c13
-rw-r--r--sunrpc/rpc_svcout.c14
-rw-r--r--sysdeps/unix/sysv/linux/alpha/setfpucw.c4
13 files changed, 1073 insertions, 1120 deletions
diff --git a/ChangeLog b/ChangeLog
index 2149287..de646ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+1998-12-01 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
+
+ * sunrpc/auth_des.c: Use new XDR int32 functions for integers.
+ * sunrpc/rpc/xdr.h: Add IXDR INT32 functions.
+ * sunrpc/rpc_hout.c: Remove (u_long) casts in defines to avoid
+ conflicts with new solaris version.
+ * sunrpc/rpc_main.c: Fix bug in generating Makefile name (malloc
+ doesn't zero allocated memory).
+ * sunrpc/rpc_svcout.c: Local variables now starts with a _ to avoid
+ conflicts with xdr functions. Solves PR libc/877.
+ * nis/rpcsvc/nis.x: Use always uint32_t.
+ * nis/rpcsvc/nis.h: Likewise.
+ * nis/rpcsvc/nis_object.x: Likewise.
+
+1998-12-01 Ulrich Drepper <drepper@cygnus.com>
+
+ * math/libm-test.c: Various cleanups. Patch by Zack Weinberg.
+
+ * sysdeps/unix/sysv/linux/alpha/setfpucw.c: Use correct type for
+ parameter. Patch by Christian Gafton.
+
+ * string/envz.h: Add prototype for envz_remove.
+ Reported by Andreas Jaeger.
+
1998-11-30 Mark Kettenis <kettenis@phys.uva.nl>
* mach/Versions [libc, GLIBC_2.0]: Add __spin_lock,
diff --git a/FAQ.in b/FAQ.in
index 452d76a..b1bd299 100644
--- a/FAQ.in
+++ b/FAQ.in
@@ -1140,6 +1140,16 @@ taken care in user programs using the firewall structures and therefore
those programs (ipfw is AFAIK the only one) should deal with this problem
themselves.
+?? I get floods of warnings when I use -Wconversion and include
+ <string.h> or <math.h>.
+
+{ZW} <string.h> and <math.h> intentionally use prototypes to override
+argument promotion. -Wconversion warns about all these. You can safely
+ignore the warnings.
+
+-Wconversion isn't really intended for production use, only for shakedown
+compiles after converting an old program to standard C.
+
? Miscellaneous
diff --git a/math/libm-test.c b/math/libm-test.c
index 86616a4..2f57ef2 100644
--- a/math/libm-test.c
+++ b/math/libm-test.c
@@ -17,9 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-
-/*
- Part of testsuite for libm.
+/* Part of testsuite for libm.
This file has to be included by a master file that defines:
@@ -27,16 +25,16 @@
FUNC(function): converts general function name (like cos) to
name with correct suffix (e.g. cosl or cosf)
MATHCONST(x): like FUNC but for constants (e.g convert 0.0 to 0.0L)
- MATHTYPE: floating point type to test
- TEST_MSG: informal message to be displayed
+ MATHTYPE: floating point type to test
+ TEST_MSG: informal message to be displayed
CHOOSE(Clongdouble,Cdouble,Cfloat):
chooses one of the parameters as epsilon for testing
equality
- PRINTF_EXPR Floating point conversion specification to print a variable
- of type MATHTYPE with printf. PRINTF_EXPR just contains
+ PRINTF_EXPR Floating point conversion specification to print a variable
+ of type MATHTYPE with printf. PRINTF_EXPR just contains
the specifier, not the percent and width arguments,
e.g. "f".
- PRINTF_XEXPR Like PRINTF_EXPR, but print in hexadecimal format.
+ PRINTF_XEXPR Like PRINTF_EXPR, but print in hexadecimal format.
*/
/* This program isn't finished yet.
@@ -58,12 +56,12 @@
ccos, ccosh, cexp, clog, cpow, csin, csinh, csqrt, ctan, ctanh.
At the moment the following functions aren't tested:
-OB conj, cproj, cimag, creal, drem,
+ conj, cproj, cimag, creal, drem,
j0, j1, jn, y0, y1, yn,
significand,
nan
- The routines using random variables are still under construction. I don't
+ The routines using random variables are still under construction. I don't
like it the way it's working now and will change it.
Parameter handling is primitive in the moment:
@@ -82,25 +80,25 @@ OB conj, cproj, cimag, creal, drem,
This suite tests some aspects of the correct implementation of
mathematical functions in libm. Some simple, specific parameters
are tested for correctness but there's no exhaustive
- testing. Handling of specific inputs (e.g. infinity, not-a-number)
- is also tested. Correct handling of exceptions is checked
- against. These implemented tests should check all cases that are
+ testing. Handling of specific inputs (e.g. infinity, not-a-number)
+ is also tested. Correct handling of exceptions is checked
+ against. These implemented tests should check all cases that are
specified in ISO C 9X.
Exception testing: At the moment only divide-by-zero and invalid
- exceptions are tested. Overflow/underflow and inexact exceptions
+ exceptions are tested. Overflow/underflow and inexact exceptions
aren't checked at the moment.
- NaN values: There exist signalling and quiet NaNs. This implementation
+ NaN values: There exist signalling and quiet NaNs. This implementation
only uses signalling NaN as parameter but does not differenciate
between the two kinds of NaNs as result.
Inline functions: Inlining functions should give an improvement in
- speed - but not in precission. The inlined functions return
- reasonable values for a reasonable range of input values. The
+ speed - but not in precission. The inlined functions return
+ reasonable values for a reasonable range of input values. The
result is not necessarily correct for all values and exceptions are
- not correctly raised in all cases. Problematic input and return
- values are infinity, not-a-number and minus zero. This suite
+ not correctly raised in all cases. Problematic input and return
+ values are infinity, not-a-number and minus zero. This suite
therefore does not check these specific inputs and the exception
handling for inlined mathematical functions - just the "reasonable"
values are checked.
@@ -112,8 +110,7 @@ OB conj, cproj, cimag, creal, drem,
- Compiler has errors
With e.g. gcc 2.7.2.2 the test for cexp fails because of a compiler error.
-
-*/
+ */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
@@ -130,21 +127,21 @@ OB conj, cproj, cimag, creal, drem,
#include <getopt.h>
/* Possible exceptions */
-#define NO_EXCEPTION 0x0
-#define INVALID_EXCEPTION 0x1
+#define NO_EXCEPTION 0x0
+#define INVALID_EXCEPTION 0x1
#define DIVIDE_BY_ZERO_EXCEPTION 0x2
#define PRINT 1
#define NO_PRINT 0
/* Various constants (we must supply them precalculated for accuracy). */
-#define M_PI_6l .52359877559829887308L
+#define M_PI_6l .52359877559829887308L
#define M_E2l 7.389056098930650227230L
#define M_E3l 20.08553692318766774093L
-static int noErrors; /* number of errors */
-static int noTests; /* number of tests (without testing exceptions) */
-static int noExcTests; /* number of tests for exception flags */
+static int noErrors; /* number of errors */
+static int noTests; /* number of tests (without testing exceptions) */
+static int noExcTests; /* number of tests for exception flags */
static int verbose = 3;
static MATHTYPE minus_zero, plus_zero;
@@ -166,23 +163,22 @@ typedef MATHTYPE (*mathfunc) (MATHTYPE);
isinf (x) : isinfl (x))
- /*
- Test if Floating-Point stack hasn't changed
- */
+/* Test if Floating-Point stack hasn't changed */
static void
fpstack_test (const char *test_name)
{
#ifdef i386
static int old_stack;
int sw;
-asm ("fnstsw":"=a" (sw));
+
+ asm ("fnstsw":"=a" (sw));
sw >>= 11;
sw &= 7;
+
if (sw != old_stack)
{
- printf ("FP-Stack wrong after test %s\n", test_name);
- if (verbose > 2)
- printf ("=======> stack = %d\n", sw);
+ printf ("FP-Stack wrong after test %s (%d, should be %d)\n",
+ test_name, sw, old_stack);
++noErrors;
old_stack = sw;
}
@@ -190,11 +186,9 @@ asm ("fnstsw":"=a" (sw));
}
-/*
- Get a random value x with min_value < x < max_value
+/* Get a random value x with min_value < x < max_value
and min_value, max_value finite,
- max_value and min_value shouldn't be too close together
- */
+ max_value and min_value shouldn't be too close together */
static MATHTYPE
random_value (MATHTYPE min_value, MATHTYPE max_value)
{
@@ -214,13 +208,15 @@ random_value (MATHTYPE min_value, MATHTYPE max_value)
return x;
}
+
/* Get a random value x with x > min_value. */
static MATHTYPE
random_greater (MATHTYPE min_value)
{
- return random_value (min_value, 1e6); /* CHOOSE (LDBL_MAX, DBL_MAX, FLT_MAX) */
+ return random_value (min_value, 1e6); /* CHOOSE(LDBL_MAX, DBL_MAX, FLT_MAX) */
}
+
/* Get a random value x with x < max_value. */
static MATHTYPE
random_less (MATHTYPE max_value)
@@ -246,7 +242,7 @@ output_pass_value (void)
static void
-output_fail_value (const char * test_name)
+output_fail_value (const char *test_name)
{
if (verbose > 0 && verbose < 3)
printf ("Fail: %s\n", test_name);
@@ -258,48 +254,48 @@ output_fail_value (const char * test_name)
/* Test whether a given exception was raised. */
static void
test_single_exception (const char *test_name,
- short int exception,
- short int exc_flag,
- int fe_flag,
- const char *flag_name)
+ short int exception,
+ short int exc_flag,
+ int fe_flag,
+ const char *flag_name)
{
#ifndef TEST_INLINE
if (exception & exc_flag)
{
if (fetestexcept (fe_flag))
- {
- if (verbose > 3)
- printf ("Pass: Exception \"%s\" set\n", flag_name);
- }
+ {
+ if (verbose > 3)
+ printf ("Pass: Exception \"%s\" set\n", flag_name);
+ }
else
- {
- if (verbose && verbose < 3)
- printf ("Fail: %s: Exception \"%s\" not set\n",
+ {
+ if (verbose && verbose < 3)
+ printf ("Fail: %s: Exception \"%s\" not set\n",
test_name, flag_name);
- if (verbose >= 3)
- printf ("Fail: Exception \"%s\" not set\n",
- flag_name);
- ++noErrors;
- }
+ if (verbose >= 3)
+ printf ("Fail: Exception \"%s\" not set\n",
+ flag_name);
+ ++noErrors;
+ }
}
else
{
if (fetestexcept (fe_flag))
- {
- if (verbose && verbose < 3)
- printf ("Fail: %s: Exception \"%s\" set\n",
+ {
+ if (verbose && verbose < 3)
+ printf ("Fail: %s: Exception \"%s\" set\n",
test_name, flag_name);
- if (verbose >= 3)
- printf ("Fail: Exception \"%s\" set\n",
- flag_name);
- ++noErrors;
- }
+ if (verbose >= 3)
+ printf ("Fail: Exception \"%s\" set\n",
+ flag_name);
+ ++noErrors;
+ }
else
- {
- if (verbose > 3)
- printf ("Pass: Exception \"%s\" not set\n",
+ {
+ if (verbose > 3)
+ printf ("Pass: Exception \"%s\" not set\n",
flag_name);
- }
+ }
}
#endif
}
@@ -332,12 +328,12 @@ test_exceptions (const char *test_name, short int exception)
++noExcTests;
#ifdef FE_DIVBYZERO
test_single_exception (test_name, exception,
- DIVIDE_BY_ZERO_EXCEPTION, FE_DIVBYZERO,
- "Divide by zero");
+ DIVIDE_BY_ZERO_EXCEPTION, FE_DIVBYZERO,
+ "Divide by zero");
#endif
#ifdef FE_INVALID
test_single_exception (test_name, exception, INVALID_EXCEPTION, FE_INVALID,
- "Invalid operation");
+ "Invalid operation");
#endif
feclearexcept (FE_ALL_EXCEPT);
}
@@ -360,16 +356,16 @@ check_equal (MATHTYPE computed, MATHTYPE supplied, MATHTYPE eps, MATHTYPE * diff
ret_value = (*diff <= eps &&
- (signbit (computed) == signbit (supplied) || eps != 0.0));
+ (signbit (computed) == signbit (supplied) || eps != 0.0));
- /* Make sure the subtraction/comparison have no influence on the exceptions. */
+ /* Make sure the subtraction/comparison
+ have no influence on the exceptions. */
feclearexcept (FE_ALL_EXCEPT);
return ret_value;
}
-
static void
output_result_bool (const char *test_name, int result)
{
@@ -382,7 +378,7 @@ output_result_bool (const char *test_name, int result)
{
output_fail_value (test_name);
if (verbose > 1)
- printf (" Value: %d\n", result);
+ printf (" Value: %d\n", result);
++noErrors;
}
@@ -455,12 +451,12 @@ output_result (const char *test_name, int result,
if (verbose > 1 && print_values)
{
printf ("Result:\n");
- printf (" is: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
+ printf (" is: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
computed, computed);
- printf (" should be: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
+ printf (" should be: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
expected, expected);
if (print_diff)
- printf (" difference: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR
+ printf (" difference: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR
"\n", difference, difference);
}
++noErrors;
@@ -488,14 +484,14 @@ output_result_ext (const char *test_name, int result,
if (verbose > 1 && print_values)
{
printf ("Result:\n");
- printf (" is: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
+ printf (" is: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
computed, computed);
- printf (" should be: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
+ printf (" should be: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
expected, expected);
if (print_diff)
- printf (" difference: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR
+ printf (" difference: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR
"\n", difference, difference);
- printf ("Parameter: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
+ printf ("Parameter: % .20" PRINTF_EXPR " % .20" PRINTF_XEXPR "\n",
parameter, parameter);
}
++noErrors;
@@ -504,9 +500,8 @@ output_result_ext (const char *test_name, int result,
fpstack_test (test_name);
}
-/*
- check that computed and expected values are the same
- */
+
+/* check that computed and expected values are the same */
static void
check (const char *test_name, MATHTYPE computed, MATHTYPE expected)
{
@@ -521,10 +516,8 @@ check (const char *test_name, MATHTYPE computed, MATHTYPE expected)
}
-/*
- check that computed and expected values are the same,
- outputs the parameter to the function
- */
+/* check that computed and expected values are the same,
+ outputs the parameter to the function */
static void
check_ext (const char *test_name, MATHTYPE computed, MATHTYPE expected,
MATHTYPE parameter)
@@ -540,10 +533,8 @@ check_ext (const char *test_name, MATHTYPE computed, MATHTYPE expected,
}
-/*
- check that computed and expected values are the same and
- checks also for exception flags
- */
+/* check that computed and expected values are the same and
+ checks also for exception flags */
static void
check_exc (const char *test_name, MATHTYPE computed, MATHTYPE expected,
short exception)
@@ -558,9 +549,8 @@ check_exc (const char *test_name, MATHTYPE computed, MATHTYPE expected,
computed, expected, diff, PRINT, PRINT);
}
-/*
- check that computed and expected values are close enough
- */
+
+/* check that computed and expected values are close enough */
static void
check_eps (const char *test_name, MATHTYPE computed, MATHTYPE expected,
MATHTYPE epsilon)
@@ -575,9 +565,8 @@ check_eps (const char *test_name, MATHTYPE computed, MATHTYPE expected,
computed, expected, diff, PRINT, PRINT);
}
-/*
- check a boolean condition
- */
+
+/* check a boolean condition */
static void
check_bool (const char *test_name, int computed)
{
@@ -587,10 +576,7 @@ check_bool (const char *test_name, int computed)
}
-
-/*
- check that computed and expected values are equal (int values)
- */
+/* check that computed and expected values are equal (int values) */
static void
check_int (const char *test_name, int computed, int expected)
{
@@ -610,8 +596,8 @@ check_int (const char *test_name, int computed, int expected)
if (verbose > 1)
{
printf ("Result:\n");
- printf (" is: %d\n", computed);
- printf (" should be: %d\n", expected);
+ printf (" is: %d\n", computed);
+ printf (" should be: %d\n", expected);
}
noErrors++;
}
@@ -620,9 +606,7 @@ check_int (const char *test_name, int computed, int expected)
}
-/*
- check that computed and expected values are equal (long int values)
- */
+/* check that computed and expected values are equal (long int values) */
static void
check_long (const char *test_name, long int computed, long int expected)
{
@@ -643,8 +627,8 @@ check_long (const char *test_name, long int computed, long int expected)
if (verbose > 1)
{
printf ("Result:\n");
- printf (" is: %ld\n", computed);
- printf (" should be: %ld\n", expected);
+ printf (" is: %ld\n", computed);
+ printf (" should be: %ld\n", expected);
}
noErrors++;
}
@@ -652,9 +636,8 @@ check_long (const char *test_name, long int computed, long int expected)
fpstack_test (test_name);
}
-/*
- check that computed and expected values are equal (long long int values)
- */
+
+/* check that computed and expected values are equal (long long int values) */
static void
check_longlong (const char *test_name, long long int computed,
long long int expected)
@@ -676,8 +659,8 @@ check_longlong (const char *test_name, long long int computed,
if (verbose > 1)
{
printf ("Result:\n");
- printf (" is: %lld\n", computed);
- printf (" should be: %lld\n", expected);
+ printf (" is: %lld\n", computed);
+ printf (" should be: %lld\n", expected);
}
noErrors++;
}
@@ -685,9 +668,8 @@ check_longlong (const char *test_name, long long int computed,
fpstack_test (test_name);
}
-/*
- check that computed value is not-a-number
- */
+
+/* check that computed value is not-a-number */
static void
check_isnan (const char *test_name, MATHTYPE computed)
{
@@ -697,9 +679,7 @@ check_isnan (const char *test_name, MATHTYPE computed)
}
-/*
- check that computed value is not-a-number and test for exceptions
- */
+/* check that computed value is not-a-number and test for exceptions */
static void
check_isnan_exc (const char *test_name, MATHTYPE computed,
short exception)
@@ -710,9 +690,7 @@ check_isnan_exc (const char *test_name, MATHTYPE computed,
}
-/*
- check that computed value is not-a-number and test for exceptions
- */
+/* check that computed value is not-a-number and test for exceptions */
static void
check_isnan_maybe_exc (const char *test_name, MATHTYPE computed,
short exception)
@@ -722,9 +700,8 @@ check_isnan_maybe_exc (const char *test_name, MATHTYPE computed,
output_isvalue (test_name, isnan (computed), computed);
}
-/*
- check that computed value is not-a-number and supply parameter
- */
+
+/* check that computed value is not-a-number and supply parameter */
#ifndef TEST_INLINE
static void
check_isnan_ext (const char *test_name, MATHTYPE computed,
@@ -736,16 +713,14 @@ check_isnan_ext (const char *test_name, MATHTYPE computed,
}
#endif
-/*
- check that computed value is not-a-number, test for exceptions
- and supply parameter
- */
+/* check that computed value is not-a-number, test for exceptions
+ and supply parameter */
static void
check_isnan_exc_ext (const char *test_name, MATHTYPE computed,
- short exception, MATHTYPE parameter)
+ short exception, MATHTYPE parameter)
{
output_new_test (test_name);
- test_exceptions (test_name,exception);
+ test_exceptions (test_name, exception);
output_isvalue_ext (test_name, isnan (computed), computed, parameter);
}
@@ -760,6 +735,7 @@ check_isinfp (const char *test_name, MATHTYPE computed)
}
+/* Tests if computed is +Inf and supply parameter */
static void
check_isinfp_ext (const char *test_name, MATHTYPE computed,
MATHTYPE parameter)
@@ -770,7 +746,7 @@ check_isinfp_ext (const char *test_name, MATHTYPE computed,
}
-/* Tests if computed is +Inf */
+/* Tests if computed is +Inf and check exceptions */
static void
check_isinfp_exc (const char *test_name, MATHTYPE computed,
int exception)
@@ -780,6 +756,7 @@ check_isinfp_exc (const char *test_name, MATHTYPE computed,
output_isvalue (test_name, (ISINF (computed) == +1), computed);
}
+
/* Tests if computed is -Inf */
static void
check_isinfn (const char *test_name, MATHTYPE computed)
@@ -790,6 +767,7 @@ check_isinfn (const char *test_name, MATHTYPE computed)
}
+/* Tests if computed is -Inf and supply parameter */
#ifndef TEST_INLINE
static void
check_isinfn_ext (const char *test_name, MATHTYPE computed,
@@ -801,8 +779,7 @@ check_isinfn_ext (const char *test_name, MATHTYPE computed,
}
#endif
-
-/* Tests if computed is -Inf */
+/* Tests if computed is -Inf and check exceptions */
static void
check_isinfn_exc (const char *test_name, MATHTYPE computed,
int exception)
@@ -848,13 +825,12 @@ acos_test (void)
check ("acos (-1) == pi", FUNC(acos) (-1), M_PIl);
check_eps ("acos (0.5) == pi/3", FUNC(acos) (0.5), M_PI_6l * 2.0,
- CHOOSE (1e-18, 0, 0));
+ CHOOSE(1e-18, 0, 0));
check_eps ("acos (-0.5) == 2*pi/3", FUNC(acos) (-0.5), M_PI_6l * 4.0,
- CHOOSE (1e-17, 0, 0));
+ CHOOSE(1e-17, 0, 0));
check_eps ("acos (0.7) == 0.795398830...", FUNC(acos) (0.7),
0.7953988301841435554L, CHOOSE(7e-17L, 0, 0));
-
}
@@ -873,7 +849,7 @@ acosh_test (void)
check ("acosh(1) == 0", FUNC(acosh) (1), 0);
check_eps ("acosh(7) == 2.633915793...", FUNC(acosh) (7),
- 2.6339157938496334172L, CHOOSE (3e-19, 0, 0));
+ 2.6339157938496334172L, CHOOSE(3e-19, 0, 0));
}
@@ -900,7 +876,7 @@ asin_test (void)
CHOOSE(3.5e-18, 0, 2e-7));
check_eps ("asin (-0.5) == -pi/6", FUNC(asin) (-0.5), -M_PI_6l,
CHOOSE(3.5e-18, 0, 2e-7));
- check ("asin (1.0) == pi/2", FUNC(asin) (1.0), M_PI_2l);
+ check ("asin (1.0) == pi/2", FUNC(asin) (1.0), M_PI_2l);
check ("asin (-1.0) == -pi/2", FUNC(asin) (-1.0), -M_PI_2l);
check_eps ("asin (0.7) == 0.775397496...", FUNC(asin) (0.7),
0.7753974966107530637L, CHOOSE(7e-17L, 2e-16, 2e-7));
@@ -910,7 +886,6 @@ asin_test (void)
static void
asinh_test (void)
{
-
check ("asinh(+0) == +0", FUNC(asinh) (0), 0);
#ifndef TEST_INLINE
check ("asinh(-0) == -0", FUNC(asinh) (minus_zero), minus_zero);
@@ -919,7 +894,6 @@ asinh_test (void)
#endif
check_eps ("asinh(0.7) == 0.652666566...", FUNC(asinh) (0.7),
0.652666566082355786L, CHOOSE(4e-17L, 0, 6e-8));
-
}
@@ -933,9 +907,9 @@ atan_test (void)
check ("atan (-inf) == -pi/2", FUNC(atan) (minus_infty), -M_PI_2l);
check_eps ("atan (1) == pi/4", FUNC(atan) (1), M_PI_4l,
- CHOOSE (1e-18, 0, 0));
+ CHOOSE(1e-18, 0, 0));
check_eps ("atan (-1) == -pi/4", FUNC(atan) (1), M_PI_4l,
- CHOOSE (1e-18, 0, 0));
+ CHOOSE(1e-18, 0, 0));
check_eps ("atan (0.7) == 0.610725964...", FUNC(atan) (0.7),
0.6107259643892086165L, CHOOSE(3e-17L, 0, 0));
@@ -990,11 +964,11 @@ atan2_test (void)
x = random_value (-1e4, 1e4);
check ("atan2(+inf, x) == pi/2 for finite x",
- FUNC(atan2) (plus_infty, x), M_PI_2l);
+ FUNC(atan2) (plus_infty, x), M_PI_2l);
x = random_value (-1e4, 1e4);
check ("atan2(-inf, x) == -pi/2 for finite x",
- FUNC(atan2) (minus_infty, x), -M_PI_2l);
+ FUNC(atan2) (minus_infty, x), -M_PI_2l);
x = random_greater (0);
check ("atan2 (y,-inf) == +pi for finite y > 0",
@@ -1017,11 +991,10 @@ atan2_test (void)
FUNC(atan2) (minus_infty, minus_infty), -3 * M_PI_4l);
/* FIXME: Add some specific tests */
- check_eps ("atan2 (0.7,1) == 0.61072...", FUNC(atan2) (0.7,1),
+ check_eps ("atan2 (0.7,1) == 0.61072...", FUNC(atan2) (0.7, 1),
0.6107259643892086165L, CHOOSE(3e-17L, 0, 0));
check_eps ("atan2 (0.4,0.0003) == 1.57004...", FUNC(atan2) (0.4, 0.0003),
1.5700463269355215718L, CHOOSE(2e-19L, 0, 1.2e-7));
-
}
@@ -1043,11 +1016,11 @@ atanh_test (void)
x = random_greater (1.0);
check_isnan_exc_ext ("atanh (x) == NaN plus invalid exception if |x| > 1",
- FUNC(atanh) (x), INVALID_EXCEPTION, x);
+ FUNC(atanh) (x), INVALID_EXCEPTION, x);
x = random_less (1.0);
check_isnan_exc_ext ("atanh (x) == NaN plus invalid exception if |x| > 1",
- FUNC(atanh) (x), INVALID_EXCEPTION, x);
+ FUNC(atanh) (x), INVALID_EXCEPTION, x);
#endif
check_eps ("atanh(0.7) == 0.867300527...", FUNC(atanh) (0.7),
@@ -1067,15 +1040,14 @@ cbrt_test (void)
check_isnan ("cbrt (NaN) == NaN", FUNC(cbrt) (nan_value));
#endif
check_eps ("cbrt (-0.001) == -0.1", FUNC(cbrt) (-0.001), -0.1,
- CHOOSE (5e-18L, 0, 0));
- check_eps ("cbrt (8) == 2", FUNC(cbrt) (8), 2, CHOOSE (5e-17L, 0, 0));
+ CHOOSE(5e-18L, 0, 0));
+ check_eps ("cbrt (8) == 2", FUNC(cbrt) (8), 2, CHOOSE(5e-17L, 0, 0));
check_eps ("cbrt (-27) == -3", FUNC(cbrt) (-27.0), -3.0,
- CHOOSE (3e-16L, 5e-16, 0));
+ CHOOSE(3e-16L, 5e-16, 0));
check_eps ("cbrt (0.970299) == 0.99", FUNC(cbrt) (0.970299), 0.99,
- CHOOSE (2e-17L, 2e-16, 0));
+ CHOOSE(2e-17L, 2e-16, 0));
check_eps ("cbrt (0.7) == .8879040017...", FUNC(cbrt) (0.7),
0.8879040017426007084L, CHOOSE(2e-17L, 6e-16, 0));
-
}
@@ -1095,7 +1067,6 @@ ceil_test (void)
static void
cos_test (void)
{
-
check ("cos (+0) == 1", FUNC(cos) (0), 1);
check ("cos (-0) == 1", FUNC(cos) (minus_zero), 1);
check_isnan_exc ("cos (+inf) == NaN plus invalid exception",
@@ -1106,16 +1077,17 @@ cos_test (void)
INVALID_EXCEPTION);
check_eps ("cos (pi/3) == 0.5", FUNC(cos) (M_PI_6l * 2.0),
- 0.5, CHOOSE (4e-18L, 1e-15L, 1e-7L));
+ 0.5, CHOOSE(4e-18L, 1e-15L, 1e-7L));
check_eps ("cos (2*pi/3) == -0.5", FUNC(cos) (M_PI_6l * 4.0),
- -0.5, CHOOSE (4e-18L, 1e-15L, 1e-7L));
+ -0.5, CHOOSE(4e-18L, 1e-15L, 1e-7L));
check_eps ("cos (pi/2) == 0", FUNC(cos) (M_PI_2l),
- 0, CHOOSE (1e-19L, 1e-16L, 1e-7L));
+ 0, CHOOSE(1e-19L, 1e-16L, 1e-7L));
check_eps ("cos (0.7) == 0.7648421872...", FUNC(cos) (0.7),
0.7648421872844884262L, CHOOSE(3e-17, 2e-16, 6e-8));
}
+
static void
cosh_test (void)
{
@@ -1180,12 +1152,12 @@ exp_test (void)
check_isinfp ("exp (+inf) == +inf", FUNC(exp) (plus_infty));
check ("exp (-inf) == 0", FUNC(exp) (minus_infty), 0);
#endif
- check_eps ("exp (1) == e", FUNC(exp) (1), M_El, CHOOSE (4e-18L, 0, 0));
+ check_eps ("exp (1) == e", FUNC(exp) (1), M_El, CHOOSE(4e-18L, 0, 0));
check_eps ("exp (2) == e^2", FUNC(exp) (2), M_E2l,
- CHOOSE (1e-18, 0, 0));
+ CHOOSE(1e-18, 0, 0));
check_eps ("exp (3) == e^3", FUNC(exp) (3), M_E3l,
- CHOOSE (1.5e-17, 0, 0));
+ CHOOSE(1.5e-17, 0, 0));
check_eps ("exp (0.7) == 2.0137527074...", FUNC(exp) (0.7),
2.0137527074704765216L, CHOOSE(9e-17L, 0, 0));
}
@@ -1251,15 +1223,13 @@ expm1_test (void)
#endif
check_eps ("expm1 (1) == e-1", FUNC(expm1) (1), M_El - 1.0,
- CHOOSE (4e-18L, 0, 2e-7));
+ CHOOSE(4e-18L, 0, 2e-7));
check_eps ("expm1 (0.7) == 1.01375...", FUNC(expm1) (0.7),
1.0137527074704765216L, CHOOSE(9e-17L, 0, 0));
}
-
-
static void
check_frexp (const char *test_name, MATHTYPE computed, MATHTYPE expected,
int comp_int, int exp_int)
@@ -1282,10 +1252,10 @@ check_frexp (const char *test_name, MATHTYPE computed, MATHTYPE expected,
if (verbose > 1)
{
printf ("Result:\n");
- printf (" is: %.20" PRINTF_EXPR " *2^%d %.20"
+ printf (" is: %.20" PRINTF_EXPR " *2^%d %.20"
PRINTF_XEXPR "*2^%d\n",
computed, comp_int, computed, comp_int);
- printf (" should be: %.20" PRINTF_EXPR " *2^%d %.20"
+ printf (" should be: %.20" PRINTF_EXPR " *2^%d %.20"
PRINTF_XEXPR "*2^%d\n",
expected, exp_int, expected, exp_int);
printf (" difference: %.20" PRINTF_EXPR " %.20" PRINTF_XEXPR "\n",
@@ -1324,29 +1294,11 @@ frexp_test (void)
check_frexp ("frexp: 12.8 == 0.8 * 2^4", result, 0.8L, x_int, 4);
result = FUNC(frexp) (-27.34L, &x_int);
- check_frexp ("frexp: -27.34 == -0.854375 * 2^5", result, -0.854375L, x_int, 5);
-
+ check_frexp ("frexp: -27.34 == -0.854375 * 2^5",
+ result, -0.854375L, x_int, 5);
}
-#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 1)
-/* All floating-point numbers can be put in one of these categories. */
-enum
-{
- FP_NAN,
-#define FP_NAN FP_NAN
- FP_INFINITE,
-#define FP_INFINITE FP_INFINITE
- FP_ZERO,
-#define FP_ZERO FP_ZERO
- FP_SUBNORMAL,
-#define FP_SUBNORMAL FP_SUBNORMAL
- FP_NORMAL
-#define FP_NORMAL FP_NORMAL
-};
-#endif
-
-
static void
fpclassify_test (void)
{
@@ -1390,7 +1342,6 @@ isnormal_test (void)
check_bool ("isnormal (+inf) == 0", isnormal (plus_infty) == 0);
check_bool ("isnormal (-inf) == 0", isnormal (minus_infty) == 0);
check_bool ("isnormal (NaN) == 0", isnormal (nan_value) == 0);
-
}
@@ -1409,7 +1360,6 @@ signbit_test (void)
x = random_greater (0);
check_bool ("signbit (x) == 0 for x > 0", signbit (x) == 0);
-
}
@@ -1431,7 +1381,7 @@ gamma_test (void)
check_isinfp_exc ("gamma (x) == +inf plus divide by zero exception for integer x <= 0",
FUNC(gamma) (-3), DIVIDE_BY_ZERO_EXCEPTION);
check_isnan_exc ("gamma (-inf) == NaN plus invalid exception",
- FUNC(gamma) (minus_infty), INVALID_EXCEPTION);
+ FUNC(gamma) (minus_infty), INVALID_EXCEPTION);
signgam = 0;
check ("gamma (1) == 0", FUNC(gamma) (1), 0);
@@ -1443,12 +1393,12 @@ gamma_test (void)
signgam = 0;
check_eps ("gamma (0.5) == log(sqrt(pi))", FUNC(gamma) (0.5),
- FUNC(log) (FUNC(sqrt) (M_PIl)), CHOOSE (0, 1e-15, 1e-7));
+ FUNC(log) (FUNC(sqrt) (M_PIl)), CHOOSE(0, 1e-15, 1e-7));
check_int ("gamma (0.5) sets signgam to 1", signgam, 1);
signgam = 0;
check_eps ("gamma (-0.5) == log(2*sqrt(pi))", FUNC(gamma) (-0.5),
- FUNC(log) (2*FUNC(sqrt) (M_PIl)), CHOOSE (0, 1e-15, 0));
+ FUNC(log) (2*FUNC(sqrt) (M_PIl)), CHOOSE(0, 1e-15, 0));
check_int ("gamma (-0.5) sets signgam to -1", signgam, -1);
}
@@ -1464,22 +1414,19 @@ tgamma_test (void)
return;
feclearexcept (FE_ALL_EXCEPT);
-
check_isinfp ("tgamma (+inf) == +inf", FUNC(tgamma) (plus_infty));
check_isnan_exc ("tgamma (0) == NaN plus invalid exception",
- FUNC(tgamma) (0), INVALID_EXCEPTION);
+ FUNC(tgamma) (0), INVALID_EXCEPTION);
check_isnan_exc_ext ("tgamma (x) == NaN plus invalid exception for integer x <= 0",
- FUNC(tgamma) (-2), INVALID_EXCEPTION, -2);
+ FUNC(tgamma) (-2), INVALID_EXCEPTION, -2);
check_isnan_exc ("tgamma (-inf) == NaN plus invalid exception",
- FUNC(tgamma) (minus_infty), INVALID_EXCEPTION);
+ FUNC(tgamma) (minus_infty), INVALID_EXCEPTION);
-#ifdef TODO
check_eps ("tgamma (0.5) == sqrt(pi)", FUNC(tgamma) (0.5),
- FUNC(sqrt) (M_PIl), CHOOSE (0, 5e-16, 2e-7));
-#endif
+ FUNC(sqrt) (M_PIl), CHOOSE(0, 5e-16, 2e-7));
check_eps ("tgamma (-0.5) == -2*sqrt(pi)", FUNC(tgamma) (-0.5),
- -2*FUNC(sqrt) (M_PIl), CHOOSE (0, 5e-16, 3e-7));
+ -2*FUNC(sqrt) (M_PIl), CHOOSE(0, 5e-16, 3e-7));
check ("tgamma (1) == 1", FUNC(tgamma) (1), 1);
check ("tgamma (4) == 6", FUNC(tgamma) (4), 6);
@@ -1508,7 +1455,7 @@ lgamma_test (void)
check_isinfp_exc ("lgamma (x) == +inf plus divide by zero exception for integer x <= 0",
FUNC(lgamma) (-3), DIVIDE_BY_ZERO_EXCEPTION);
check_isnan_exc ("lgamma (-inf) == NaN plus invalid exception",
- FUNC(lgamma) (minus_infty), INVALID_EXCEPTION);
+ FUNC(lgamma) (minus_infty), INVALID_EXCEPTION);
signgam = 0;
check ("lgamma (1) == 0", FUNC(lgamma) (1), 0);
@@ -1520,12 +1467,12 @@ lgamma_test (void)
signgam = 0;
check_eps ("lgamma (0.5) == log(sqrt(pi))", FUNC(lgamma) (0.5),
- FUNC(log) (FUNC(sqrt) (M_PIl)), CHOOSE (0, 1e-15, 1e-7));
+ FUNC(log) (FUNC(sqrt) (M_PIl)), CHOOSE(0, 1e-15, 1e-7));
check_int ("lgamma (0.5) sets signgam to 1", signgam, 1);
signgam = 0;
check_eps ("lgamma (-0.5) == log(2*sqrt(pi))", FUNC(lgamma) (-0.5),
- FUNC(log) (2*FUNC(sqrt) (M_PIl)), CHOOSE (0, 1e-15, 0));
+ FUNC(log) (2*FUNC(sqrt) (M_PIl)), CHOOSE(0, 1e-15, 0));
check_int ("lgamma (-0.5) sets signgam to -1", signgam, -1);
@@ -1538,7 +1485,6 @@ lgamma_test (void)
check_eps ("lgamma (1.2) == -0.08537...", FUNC(lgamma) (1.2),
-0.853740900033158497197e-1L, CHOOSE(0, 2e-17, 2e-8));
check_int ("lgamma (1.2) sets signgam to 1", signgam, 1);
-
}
@@ -1554,13 +1500,12 @@ ilogb_test (void)
/* XXX We have a problem here: the standard does not tell us whether
exceptions are allowed/required. ignore them for now. */
- i = FUNC (ilogb) (0.0);
+ i = FUNC(ilogb) (0.0);
feclearexcept (FE_ALL_EXCEPT);
check_int ("ilogb (0) == FP_ILOGB0", i, FP_ILOGB0);
i = FUNC(ilogb) (nan_value);
feclearexcept (FE_ALL_EXCEPT);
check_int ("ilogb (NaN) == FP_ILOGBNAN", i, FP_ILOGBNAN);
-
}
@@ -1580,7 +1525,6 @@ ldexp_test (void)
x = random_greater (0.0);
check_ext ("ldexp (x, 0) == x", FUNC(ldexp) (x, 0L), x, x);
-
}
@@ -1598,13 +1542,13 @@ log_test (void)
FUNC(log) (-1), INVALID_EXCEPTION);
check_isinfp ("log (+inf) == +inf", FUNC(log) (plus_infty));
- check_eps ("log (e) == 1", FUNC(log) (M_El), 1, CHOOSE (1e-18L, 0, 9e-8L));
+ check_eps ("log (e) == 1", FUNC(log) (M_El), 1, CHOOSE(1e-18L, 0, 9e-8L));
check_eps ("log (1/e) == -1", FUNC(log) (1.0 / M_El), -1,
- CHOOSE (2e-18L, 0, 0));
+ CHOOSE(2e-18L, 0, 0));
check_eps ("log (2) == M_LN2", FUNC(log) (2), M_LN2l,
- CHOOSE (6e-20L, 0, 0));
+ CHOOSE(6e-20L, 0, 0));
check_eps ("log (10) == M_LN10", FUNC(log) (10), M_LN10l,
- CHOOSE (1e-18L, 0, 0));
+ CHOOSE(1e-18L, 0, 0));
check_eps ("log (0.7) == -0.3566749439...", FUNC(log) (0.7),
-0.35667494393873237891L, CHOOSE(7e-17L, 6e-17, 3e-8));
}
@@ -1626,14 +1570,14 @@ log10_test (void)
check_isinfp ("log10 (+inf) == +inf", FUNC(log10) (plus_infty));
check_eps ("log10 (0.1) == -1", FUNC(log10) (0.1L), -1,
- CHOOSE (1e-18L, 0, 0));
+ CHOOSE(1e-18L, 0, 0));
check_eps ("log10 (10) == 1", FUNC(log10) (10.0), 1,
- CHOOSE (1e-18L, 0, 0));
+ CHOOSE(1e-18L, 0, 0));
check_eps ("log10 (100) == 2", FUNC(log10) (100.0), 2,
- CHOOSE (1e-18L, 0, 0));
+ CHOOSE(1e-18L, 0, 0));
check ("log10 (10000) == 4", FUNC(log10) (10000.0), 4);
check_eps ("log10 (e) == M_LOG10E", FUNC(log10) (M_El), M_LOG10El,
- CHOOSE (1e-18, 0, 9e-8));
+ CHOOSE(1e-18, 0, 9e-8));
check_eps ("log10 (0.7) == -0.1549019599...", FUNC(log10) (0.7),
-0.15490195998574316929L, CHOOSE(3e-17L, 3e-17, 2e-8));
}
@@ -1653,7 +1597,7 @@ log1p_test (void)
check_isinfp ("log1p (+inf) == +inf", FUNC(log1p) (plus_infty));
check_eps ("log1p (e-1) == 1", FUNC(log1p) (M_El - 1.0), 1,
- CHOOSE (1e-18L, 0, 6e-8));
+ CHOOSE(1e-18L, 0, 6e-8));
check_eps ("log1p (-0.3) == -0.35667...", FUNC(log1p) (-0.3),
-0.35667494393873237891L, CHOOSE(2e-17L, 6e-17, 3e-8));
@@ -1676,13 +1620,12 @@ log2_test (void)
check_isinfp ("log2 (+inf) == +inf", FUNC(log2) (plus_infty));
check_eps ("log2 (e) == M_LOG2E", FUNC(log2) (M_El), M_LOG2El,
- CHOOSE (1e-18L, 0, 0));
+ CHOOSE(1e-18L, 0, 0));
check ("log2 (2) == 1", FUNC(log2) (2.0), 1);
- check_eps ("log2 (16) == 4", FUNC(log2) (16.0), 4, CHOOSE (1e-18L, 0, 0));
+ check_eps ("log2 (16) == 4", FUNC(log2) (16.0), 4, CHOOSE(1e-18L, 0, 0));
check ("log2 (256) == 8", FUNC(log2) (256.0), 8);
check_eps ("log2 (0.7) == -0.5145731728...", FUNC(log2) (0.7),
-0.51457317282975824043L, CHOOSE(1e-16L, 2e-16, 6e-8));
-
}
@@ -1702,7 +1645,6 @@ logb_test (void)
check ("logb (e) == 1", FUNC(logb) (M_El), 1);
check ("logb (1024) == 10", FUNC(logb) (1024), 10);
check ("logb (-2000) == 10", FUNC(logb) (-2000), 10);
-
}
@@ -1861,9 +1803,9 @@ sin_test (void)
INVALID_EXCEPTION);
check_eps ("sin (pi/6) == 0.5", FUNC(sin) (M_PI_6l),
- 0.5, CHOOSE (4e-18L, 0, 0));
+ 0.5, CHOOSE(4e-18L, 0, 0));
check_eps ("sin (-pi/6) == -0.5", FUNC(sin) (-M_PI_6l),
- -0.5, CHOOSE (4e-18L, 0, 0));
+ -0.5, CHOOSE(4e-18L, 0, 0));
check ("sin (pi/2) == 1", FUNC(sin) (M_PI_2l), 1);
check ("sin (-pi/2) == -1", FUNC(sin) (-M_PI_2l), -1);
check_eps ("sin (0.7) == 0.6442176872...", FUNC(sin) (0.7),
@@ -1909,10 +1851,10 @@ sincos_test (void)
FUNC(sincos) (plus_infty, &sin_res, &cos_res);
fegetenv (&fenv);
check_isnan_exc ("sincos (+inf, &sin, &cos) puts NaN in sin plus invalid exception",
- sin_res, INVALID_EXCEPTION);
+ sin_res, INVALID_EXCEPTION);
fesetenv (&fenv);
check_isnan_exc ("sincos (+inf, &sin, &cos) puts NaN in cos plus invalid exception",
- cos_res, INVALID_EXCEPTION);
+ cos_res, INVALID_EXCEPTION);
FUNC(sincos) (minus_infty, &sin_res, &cos_res);
fegetenv (&fenv);
@@ -1927,15 +1869,15 @@ sincos_test (void)
check ("sincos (pi/2, &sin, &cos) puts 1 in sin", sin_res, 1);
fesetenv (&fenv);
check_eps ("sincos (pi/2, &sin, &cos) puts 0 in cos", cos_res, 0,
- CHOOSE (1e-18L, 1e-16, 1e-7));
+ CHOOSE(1e-18L, 1e-16, 1e-7));
FUNC(sincos) (M_PI_6l, &sin_res, &cos_res);
check_eps ("sincos (pi/6, &sin, &cos) puts 0.5 in sin", sin_res, 0.5,
- CHOOSE (5e-18L, 0, 0));
+ CHOOSE(5e-18L, 0, 0));
FUNC(sincos) (M_PI_6l*2.0, &sin_res, &cos_res);
check_eps ("sincos (pi/3, &sin, &cos) puts 0.5 in cos", cos_res, 0.5,
- CHOOSE (5e-18L, 1e-15, 1e-7));
+ CHOOSE(5e-18L, 1e-15, 1e-7));
FUNC(sincos) (0.7, &sin_res, &cos_res);
check_eps ("sincos (0.7, &sin, &cos) puts 0.6442176872... in sin", sin_res,
@@ -1956,7 +1898,7 @@ tan_test (void)
FUNC(tan) (minus_infty), INVALID_EXCEPTION);
check_eps ("tan (pi/4) == 1", FUNC(tan) (M_PI_4l), 1,
- CHOOSE (2e-18L, 1e-15L, 2e-7));
+ CHOOSE(2e-18L, 1e-15L, 2e-7));
check_eps ("tan (0.7) == 0.8422883804...", FUNC(tan) (0.7),
0.84228838046307944813L, CHOOSE(8e-17L, 0, 0));
}
@@ -2176,11 +2118,11 @@ pow_test (void)
x = random_value (-1.0, 1.0);
check_ext ("pow (x, +inf) == +0 for |x| < 1",
- FUNC(pow) (x, plus_infty), 0.0, x);
+ FUNC(pow) (x, plus_infty), 0.0, x);
x = random_greater (1.0);
check_ext ("pow (x, -inf) == +0 for |x| > 1",
- FUNC(pow) (x, minus_infty), 0.0, x);
+ FUNC(pow) (x, minus_infty), 0.0, x);
x = random_value (-1.0, 1.0);
check_isinfp_ext ("pow (x, -inf) == +inf for |x| < 1",
@@ -2343,34 +2285,32 @@ fmod_test (void)
x = random_greater (0);
check_ext ("fmod (-0, y) == -0 for y != 0", FUNC(fmod) (minus_zero, x),
- minus_zero, x);
+ minus_zero, x);
check_isnan_exc_ext ("fmod (+inf, y) == NaN plus invalid exception",
- FUNC(fmod) (plus_infty, x), INVALID_EXCEPTION, x);
+ FUNC(fmod) (plus_infty, x), INVALID_EXCEPTION, x);
check_isnan_exc_ext ("fmod (-inf, y) == NaN plus invalid exception",
- FUNC(fmod) (minus_infty, x), INVALID_EXCEPTION, x);
+ FUNC(fmod) (minus_infty, x), INVALID_EXCEPTION, x);
check_isnan_exc_ext ("fmod (x, +0) == NaN plus invalid exception",
- FUNC(fmod) (x, 0), INVALID_EXCEPTION, x);
+ FUNC(fmod) (x, 0), INVALID_EXCEPTION, x);
check_isnan_exc_ext ("fmod (x, -0) == NaN plus invalid exception",
- FUNC(fmod) (x, minus_zero), INVALID_EXCEPTION, x);
+ FUNC(fmod) (x, minus_zero), INVALID_EXCEPTION, x);
x = random_greater (0);
check_ext ("fmod (x, +inf) == x for x not infinite",
- FUNC(fmod) (x, plus_infty), x, x);
+ FUNC(fmod) (x, plus_infty), x, x);
x = random_greater (0);
check_ext ("fmod (x, -inf) == x for x not infinite",
- FUNC(fmod) (x, minus_infty), x, x);
+ FUNC(fmod) (x, minus_infty), x, x);
check_eps ("fmod (6.5, 2.3) == 1.9", FUNC(fmod) (6.5, 2.3), 1.9,
- CHOOSE(5e-16, 1e-15, 2e-7));
+ CHOOSE(5e-16, 1e-15, 2e-7));
check_eps ("fmod (-6.5, 2.3) == -1.9", FUNC(fmod) (-6.5, 2.3), -1.9,
- CHOOSE(5e-16, 1e-15, 2e-7));
+ CHOOSE(5e-16, 1e-15, 2e-7));
check_eps ("fmod (6.5, -2.3) == 1.9", FUNC(fmod) (6.5, -2.3), 1.9,
- CHOOSE(5e-16, 1e-15, 2e-7));
+ CHOOSE(5e-16, 1e-15, 2e-7));
check_eps ("fmod (-6.5, -2.3) == -1.9", FUNC(fmod) (-6.5, -2.3), -1.9,
- CHOOSE(5e-16, 1e-15, 2e-7));
-
-
+ CHOOSE(5e-16, 1e-15, 2e-7));
}
@@ -2386,8 +2326,8 @@ nextafter_test (void)
check ("nextafter (-0, -0) = -0", FUNC(nextafter) (minus_zero, minus_zero),
minus_zero);
- check ("nextafter (9, 9) = 9", FUNC(nextafter) (9, 9), 9);
- check ("nextafter (-9, -9) = -9", FUNC(nextafter) (-9, -9), -9);
+ check ("nextafter (9, 9) = 9", FUNC(nextafter) (9, 9), 9);
+ check ("nextafter (-9, -9) = -9", FUNC(nextafter) (-9, -9), -9);
check_isinfp ("nextafter (+inf, +inf) = +inf",
FUNC(nextafter) (plus_infty, plus_infty));
check_isinfn ("nextafter (-inf, -inf) = -inf",
@@ -2486,7 +2426,7 @@ sqrt_test (void)
x = random_less (0.0);
check_isnan_exc_ext ("sqrt (x) == NaN plus invalid exception for x < 0",
- FUNC(sqrt) (x), INVALID_EXCEPTION, x);
+ FUNC(sqrt) (x), INVALID_EXCEPTION, x);
x = random_value (0, 10000);
check_ext ("sqrt (x*x) == x", FUNC(sqrt) (x*x), x, x);
@@ -2495,11 +2435,12 @@ sqrt_test (void)
check ("sqrt (0.25) == 0.5", FUNC(sqrt) (0.25), 0.5);
check ("sqrt (6642.25) == 81.5", FUNC(sqrt) (6642.25), 81.5);
check_eps ("sqrt (15239.903) == 123.45", FUNC(sqrt) (15239.903), 123.45,
- CHOOSE (3e-6L, 3e-6, 8e-6));
+ CHOOSE(3e-6L, 3e-6, 8e-6));
check_eps ("sqrt (0.7) == 0.8366600265", FUNC(sqrt) (0.7),
0.83666002653407554798L, CHOOSE(3e-17L, 0, 0));
}
+
static void
remainder_test (void)
{
@@ -2507,19 +2448,19 @@ remainder_test (void)
result = FUNC(remainder) (1, 0);
check_isnan_exc ("remainder(1, +0) == NaN plus invalid exception",
- result, INVALID_EXCEPTION);
+ result, INVALID_EXCEPTION);
result = FUNC(remainder) (1, minus_zero);
check_isnan_exc ("remainder(1, -0) == NaN plus invalid exception",
- result, INVALID_EXCEPTION);
+ result, INVALID_EXCEPTION);
result = FUNC(remainder) (plus_infty, 1);
check_isnan_exc ("remainder(+inf, 1) == NaN plus invalid exception",
- result, INVALID_EXCEPTION);
+ result, INVALID_EXCEPTION);
result = FUNC(remainder) (minus_infty, 1);
check_isnan_exc ("remainder(-inf, 1) == NaN plus invalid exception",
- result, INVALID_EXCEPTION);
+ result, INVALID_EXCEPTION);
result = FUNC(remainder) (1.625, 1.0);
check ("remainder(1.625, 1.0) == -0.375", result, -0.375);
@@ -2549,19 +2490,19 @@ remquo_test (void)
result = FUNC(remquo) (1, 0, &quo);
check_isnan_exc ("remquo(1, +0, &x) == NaN plus invalid exception",
- result, INVALID_EXCEPTION);
+ result, INVALID_EXCEPTION);
result = FUNC(remquo) (1, minus_zero, &quo);
check_isnan_exc ("remquo(1, -0, &x) == NaN plus invalid exception",
- result, INVALID_EXCEPTION);
+ result, INVALID_EXCEPTION);
result = FUNC(remquo) (plus_infty, 1, &quo);
check_isnan_exc ("remquo(+inf, 1, &x) == NaN plus invalid exception",
- result, INVALID_EXCEPTION);
+ result, INVALID_EXCEPTION);
result = FUNC(remquo) (minus_infty, 1, &quo);
check_isnan_exc ("remquo(-inf, 1, &x) == NaN plus invalid exception",
- result, INVALID_EXCEPTION);
+ result, INVALID_EXCEPTION);
result = FUNC(remquo) (1.625, 1.0, &quo);
check ("remquo(1.625, 1.0, &x) == -0.375", result, -0.375);
@@ -2594,159 +2535,154 @@ cexp_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC(cexp) (BUILD_COMPLEX (plus_zero, plus_zero));
+ result = FUNC(cexp) (BUILD_COMPLEX(plus_zero, plus_zero));
check ("real(cexp(0 + 0i)) = 1", __real__ result, 1);
check ("imag(cexp(0 + 0i)) = 0", __imag__ result, 0);
- result = FUNC(cexp) (BUILD_COMPLEX (minus_zero, plus_zero));
+ result = FUNC(cexp) (BUILD_COMPLEX(minus_zero, plus_zero));
check ("real(cexp(-0 + 0i)) = 1", __real__ result, 1);
check ("imag(cexp(-0 + 0i)) = 0", __imag__ result, 0);
- result = FUNC(cexp) (BUILD_COMPLEX (plus_zero, minus_zero));
+ result = FUNC(cexp) (BUILD_COMPLEX(plus_zero, minus_zero));
check ("real(cexp(0 - 0i)) = 1", __real__ result, 1);
check ("imag(cexp(0 - 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(cexp) (BUILD_COMPLEX (minus_zero, minus_zero));
+ result = FUNC(cexp) (BUILD_COMPLEX(minus_zero, minus_zero));
check ("real(cexp(-0 - 0i)) = 1", __real__ result, 1);
check ("imag(cexp(-0 - 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(cexp) (BUILD_COMPLEX (plus_infty, plus_zero));
+ result = FUNC(cexp) (BUILD_COMPLEX(plus_infty, plus_zero));
check_isinfp ("real(cexp(+inf + 0i)) = +inf", __real__ result);
check ("imag(cexp(+inf + 0i)) = 0", __imag__ result, 0);
- result = FUNC(cexp) (BUILD_COMPLEX (plus_infty, minus_zero));
+ result = FUNC(cexp) (BUILD_COMPLEX(plus_infty, minus_zero));
check_isinfp ("real(cexp(+inf - 0i)) = +inf", __real__ result);
check ("imag(cexp(+inf - 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(cexp) (BUILD_COMPLEX (minus_infty, plus_zero));
+ result = FUNC(cexp) (BUILD_COMPLEX(minus_infty, plus_zero));
check ("real(cexp(-inf + 0i)) = 0", __real__ result, 0);
check ("imag(cexp(-inf + 0i)) = 0", __imag__ result, 0);
- result = FUNC(cexp) (BUILD_COMPLEX (minus_infty, minus_zero));
+ result = FUNC(cexp) (BUILD_COMPLEX(minus_infty, minus_zero));
check ("real(cexp(-inf - 0i)) = 0", __real__ result, 0);
check ("imag(cexp(-inf - 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(cexp) (BUILD_COMPLEX (0.0, plus_infty));
+ result = FUNC(cexp) (BUILD_COMPLEX(0.0, plus_infty));
check_isnan_exc ("real(cexp(0 + i inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cexp(0 + i inf)) = NaN plus invalid exception",
__imag__ result);
-#if defined __GNUC__ && __GNUC__ <= 2 && __GNUC_MINOR__ <= 7
- if (verbose)
- printf ("The following test for cexp might fail due to a gcc compiler error!\n");
-#endif
-
- result = FUNC(cexp) (BUILD_COMPLEX (minus_zero, plus_infty));
+ result = FUNC(cexp) (BUILD_COMPLEX(minus_zero, plus_infty));
check_isnan_exc ("real(cexp(-0 + i inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cexp(-0 + i inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (0.0, minus_infty));
+ result = FUNC(cexp) (BUILD_COMPLEX(0.0, minus_infty));
check_isnan_exc ("real(cexp(0 - i inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cexp(0 - i inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (minus_zero, minus_infty));
+ result = FUNC(cexp) (BUILD_COMPLEX(minus_zero, minus_infty));
check_isnan_exc ("real(cexp(-0 - i inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cexp(-0 - i inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (100.0, plus_infty));
+ result = FUNC(cexp) (BUILD_COMPLEX(100.0, plus_infty));
check_isnan_exc ("real(cexp(100.0 + i inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cexp(100.0 + i inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (-100.0, plus_infty));
+ result = FUNC(cexp) (BUILD_COMPLEX(-100.0, plus_infty));
check_isnan_exc ("real(cexp(-100.0 + i inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cexp(-100.0 + i inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (100.0, minus_infty));
+ result = FUNC(cexp) (BUILD_COMPLEX(100.0, minus_infty));
check_isnan_exc ("real(cexp(100.0 - i inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cexp(100.0 - i inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (-100.0, minus_infty));
+ result = FUNC(cexp) (BUILD_COMPLEX(-100.0, minus_infty));
check_isnan_exc ("real(cexp(-100.0 - i inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cexp(-100.0 - i inf)) = NaN", __imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (minus_infty, 2.0));
+ result = FUNC(cexp) (BUILD_COMPLEX(minus_infty, 2.0));
check ("real(cexp(-inf + 2.0i)) = -0", __real__ result, minus_zero);
check ("imag(cexp(-inf + 2.0i)) = 0", __imag__ result, 0);
- result = FUNC(cexp) (BUILD_COMPLEX (minus_infty, 4.0));
+ result = FUNC(cexp) (BUILD_COMPLEX(minus_infty, 4.0));
check ("real(cexp(-inf + 4.0i)) = -0", __real__ result, minus_zero);
check ("imag(cexp(-inf + 4.0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(cexp) (BUILD_COMPLEX (plus_infty, 2.0));
+ result = FUNC(cexp) (BUILD_COMPLEX(plus_infty, 2.0));
check_isinfn ("real(cexp(+inf + 2.0i)) = -inf", __real__ result);
check_isinfp ("imag(cexp(+inf + 2.0i)) = +inf", __imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (plus_infty, 4.0));
+ result = FUNC(cexp) (BUILD_COMPLEX(plus_infty, 4.0));
check_isinfn ("real(cexp(+inf + 4.0i)) = -inf", __real__ result);
check_isinfn ("imag(cexp(+inf + 4.0i)) = -inf", __imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (plus_infty, plus_infty));
+ result = FUNC(cexp) (BUILD_COMPLEX(plus_infty, plus_infty));
check_isinfp_exc ("real(cexp(+inf + i inf)) = +inf plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cexp(+inf + i inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (plus_infty, minus_infty));
+ result = FUNC(cexp) (BUILD_COMPLEX(plus_infty, minus_infty));
check_isinfp_exc ("real(cexp(+inf - i inf)) = +inf plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cexp(+inf - i inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (minus_infty, plus_infty));
+ result = FUNC(cexp) (BUILD_COMPLEX(minus_infty, plus_infty));
check ("real(cexp(-inf + i inf)) = 0", __real__ result, 0);
check ("imag(cexp(-inf + i inf)) = 0", __imag__ result, 0);
- result = FUNC(cexp) (BUILD_COMPLEX (minus_infty, minus_infty));
+ result = FUNC(cexp) (BUILD_COMPLEX(minus_infty, minus_infty));
check ("real(cexp(-inf - i inf)) = 0", __real__ result, 0);
check ("imag(cexp(-inf - i inf)) = -0", __imag__ result, minus_zero);
- result = FUNC(cexp) (BUILD_COMPLEX (minus_infty, nan_value));
+ result = FUNC(cexp) (BUILD_COMPLEX(minus_infty, nan_value));
check ("real(cexp(-inf + i NaN)) = 0", __real__ result, 0);
check ("imag(cexp(-inf + i NaN)) = 0", fabs (__imag__ result), 0);
- result = FUNC(cexp) (BUILD_COMPLEX (plus_infty, nan_value));
+ result = FUNC(cexp) (BUILD_COMPLEX(plus_infty, nan_value));
check_isinfp ("real(cexp(+inf + i NaN)) = +inf", __real__ result);
check_isnan ("imag(cexp(+inf + i NaN)) = NaN", __imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (nan_value, 0.0));
+ result = FUNC(cexp) (BUILD_COMPLEX(nan_value, 0.0));
check_isnan_maybe_exc ("real(cexp(NaN + i0)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cexp(NaN + i0)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (nan_value, 1.0));
+ result = FUNC(cexp) (BUILD_COMPLEX(nan_value, 1.0));
check_isnan_maybe_exc ("real(cexp(NaN + 1i)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cexp(NaN + 1i)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (nan_value, plus_infty));
+ result = FUNC(cexp) (BUILD_COMPLEX(nan_value, plus_infty));
check_isnan_maybe_exc ("real(cexp(NaN + i inf)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cexp(NaN + i inf)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (0, nan_value));
+ result = FUNC(cexp) (BUILD_COMPLEX(0, nan_value));
check_isnan_maybe_exc ("real(cexp(0 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cexp(0 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (1, nan_value));
+ result = FUNC(cexp) (BUILD_COMPLEX(1, nan_value));
check_isnan_maybe_exc ("real(cexp(1 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cexp(1 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (nan_value, nan_value));
+ result = FUNC(cexp) (BUILD_COMPLEX(nan_value, nan_value));
check_isnan ("real(cexp(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(cexp(NaN + i NaN)) = NaN", __imag__ result);
- result = FUNC(cexp) (BUILD_COMPLEX (0.7, 1.2));
+ result = FUNC(cexp) (BUILD_COMPLEX(0.7, 1.2));
check_eps ("real(cexp(0.7 + i 1.2)) == 0.72969...", __real__ result,
0.7296989091503236012L, CHOOSE(6e-17L, 2e-16, 2e-7));
check_eps ("imag(cexp(0.7 + i 1.2)) == 1.87689...", __imag__ result,
1.8768962328348102821L, CHOOSE(2e-16L, 2.5e-16, 3e-7));
- result = FUNC(cexp) (BUILD_COMPLEX (-2, -3));
+ result = FUNC(cexp) (BUILD_COMPLEX(-2, -3));
check_eps ("real(cexp(-2 - i 3)) == -0.13398...", __real__ result,
-0.1339809149295426134L, CHOOSE(6.8e-20L, 0, 2e-8));
check_eps ("imag(cexp(-2 - i 3)) == -0.01909...", __imag__ result,
@@ -2759,175 +2695,175 @@ csin_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC(csin) (BUILD_COMPLEX (0.0, 0.0));
+ result = FUNC(csin) (BUILD_COMPLEX(0.0, 0.0));
check ("real(csin(0 + 0i)) = 0", __real__ result, 0);
check ("imag(csin(0 + 0i)) = 0", __imag__ result, 0);
- result = FUNC(csin) (BUILD_COMPLEX (minus_zero, 0.0));
+ result = FUNC(csin) (BUILD_COMPLEX(minus_zero, 0.0));
check ("real(csin(-0 + 0i)) = -0", __real__ result, minus_zero);
check ("imag(csin(-0 + 0i)) = 0", __imag__ result, 0);
- result = FUNC(csin) (BUILD_COMPLEX (0.0, minus_zero));
+ result = FUNC(csin) (BUILD_COMPLEX(0.0, minus_zero));
check ("real(csin(0 - 0i)) = 0", __real__ result, 0);
check ("imag(csin(0 - 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(csin) (BUILD_COMPLEX (minus_zero, minus_zero));
+ result = FUNC(csin) (BUILD_COMPLEX(minus_zero, minus_zero));
check ("real(csin(-0 - 0i)) = -0", __real__ result, minus_zero);
check ("imag(csin(-0 - 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(csin) (BUILD_COMPLEX (0.0, plus_infty));
+ result = FUNC(csin) (BUILD_COMPLEX(0.0, plus_infty));
check ("real(csin(0 + i Inf)) = 0", __real__ result, 0);
check_isinfp ("imag(csin(0 + i Inf)) = +Inf", __imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (minus_zero, plus_infty));
+ result = FUNC(csin) (BUILD_COMPLEX(minus_zero, plus_infty));
check ("real(csin(-0 + i Inf)) = -0", __real__ result, minus_zero);
check_isinfp ("imag(csin(-0 + i Inf)) = +Inf", __imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (0.0, minus_infty));
+ result = FUNC(csin) (BUILD_COMPLEX(0.0, minus_infty));
check ("real(csin(0 - i Inf)) = 0", __real__ result, 0);
check_isinfn ("imag(csin(0 - i Inf)) = -Inf", __imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (minus_zero, minus_infty));
+ result = FUNC(csin) (BUILD_COMPLEX(minus_zero, minus_infty));
check ("real(csin(-0 - i Inf)) = -0", __real__ result, minus_zero);
- check_isinfn("imag(csin(-0 - i Inf)) = -Inf", __imag__ result);
+ check_isinfn ("imag(csin(-0 - i Inf)) = -Inf", __imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (plus_infty, 0.0));
+ result = FUNC(csin) (BUILD_COMPLEX(plus_infty, 0.0));
check_isnan_exc ("real(csin(+Inf + 0i)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check ("imag(csin(+Inf + 0i)) = +-0 plus invalid exception",
FUNC(fabs) (__imag__ result), 0);
- result = FUNC(csin) (BUILD_COMPLEX (minus_infty, 0.0));
+ result = FUNC(csin) (BUILD_COMPLEX(minus_infty, 0.0));
check_isnan_exc ("real(csin(-Inf + 0i)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check ("imag(csin(-Inf + 0i)) = +-0 plus invalid exception",
FUNC(fabs) (__imag__ result), 0);
- result = FUNC(csin) (BUILD_COMPLEX (plus_infty, minus_zero));
+ result = FUNC(csin) (BUILD_COMPLEX(plus_infty, minus_zero));
check_isnan_exc ("real(csin(+Inf - 0i)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check ("imag(csin(+Inf - 0i)) = +-0 plus invalid exception",
FUNC(fabs) (__imag__ result), 0.0);
- result = FUNC(csin) (BUILD_COMPLEX (minus_infty, minus_zero));
+ result = FUNC(csin) (BUILD_COMPLEX(minus_infty, minus_zero));
check_isnan_exc ("real(csin(-Inf - 0i)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check ("imag(csin(-Inf - 0i)) = +-0 plus invalid exception",
FUNC(fabs) (__imag__ result), 0.0);
- result = FUNC(csin) (BUILD_COMPLEX (plus_infty, plus_infty));
+ result = FUNC(csin) (BUILD_COMPLEX(plus_infty, plus_infty));
check_isnan_exc ("real(csin(+Inf + i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isinfp ("imag(csin(+Inf + i Inf)) = +-Inf plus invalid exception",
FUNC(fabs) (__imag__ result));
- result = FUNC(csin) (BUILD_COMPLEX (minus_infty, plus_infty));
+ result = FUNC(csin) (BUILD_COMPLEX(minus_infty, plus_infty));
check_isnan_exc ("real(csin(-Inf + i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isinfp ("imag(csin(-Inf + i Inf)) = +-Inf plus invalid exception",
FUNC(fabs) (__imag__ result));
- result = FUNC(csin) (BUILD_COMPLEX (plus_infty, minus_infty));
+ result = FUNC(csin) (BUILD_COMPLEX(plus_infty, minus_infty));
check_isnan_exc ("real(csin(Inf - i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isinfp ("imag(csin(Inf - i Inf)) = +-Inf plus invalid exception",
FUNC(fabs) (__imag__ result));
- result = FUNC(csin) (BUILD_COMPLEX (minus_infty, minus_infty));
+ result = FUNC(csin) (BUILD_COMPLEX(minus_infty, minus_infty));
check_isnan_exc ("real(csin(-Inf - i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isinfp ("imag(csin(-Inf - i Inf)) = +-Inf plus invalid exception",
FUNC(fabs) (__imag__ result));
- result = FUNC(csin) (BUILD_COMPLEX (plus_infty, 6.75));
+ result = FUNC(csin) (BUILD_COMPLEX(plus_infty, 6.75));
check_isnan_exc ("real(csin(+Inf + i 6.75)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csin(+Inf + i6.75)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (plus_infty, -6.75));
+ result = FUNC(csin) (BUILD_COMPLEX(plus_infty, -6.75));
check_isnan_exc ("real(csin(+Inf - i 6.75)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csin(+Inf - i6.75)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (minus_infty, 6.75));
+ result = FUNC(csin) (BUILD_COMPLEX(minus_infty, 6.75));
check_isnan_exc ("real(csin(-Inf + i6.75)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csin(-Inf + i6.75)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (minus_infty, -6.75));
+ result = FUNC(csin) (BUILD_COMPLEX(minus_infty, -6.75));
check_isnan_exc ("real(csin(-Inf - i6.75)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csin(-Inf - i6.75)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (4.625, plus_infty));
+ result = FUNC(csin) (BUILD_COMPLEX(4.625, plus_infty));
check_isinfn ("real(csin(4.625 + i Inf)) = -Inf", __real__ result);
check_isinfn ("imag(csin(4.625 + i Inf)) = -Inf", __imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (4.625, minus_infty));
+ result = FUNC(csin) (BUILD_COMPLEX(4.625, minus_infty));
check_isinfn ("real(csin(4.625 - i Inf)) = -Inf", __real__ result);
check_isinfp ("imag(csin(4.625 - i Inf)) = +Inf", __imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (-4.625, plus_infty));
+ result = FUNC(csin) (BUILD_COMPLEX(-4.625, plus_infty));
check_isinfp ("real(csin(-4.625 + i Inf)) = +Inf", __real__ result);
check_isinfn ("imag(csin(-4.625 + i Inf)) = -Inf", __imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (-4.625, minus_infty));
+ result = FUNC(csin) (BUILD_COMPLEX(-4.625, minus_infty));
check_isinfp ("real(csin(-4.625 - i Inf)) = +Inf", __real__ result);
check_isinfp ("imag(csin(-4.625 - i Inf)) = +Inf", __imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (nan_value, 0.0));
+ result = FUNC(csin) (BUILD_COMPLEX(nan_value, 0.0));
check_isnan ("real(csin(NaN + i0)) = NaN", __real__ result);
check ("imag(csin(NaN + i0)) = +-0", FUNC(fabs) (__imag__ result), 0);
- result = FUNC(csin) (BUILD_COMPLEX (nan_value, minus_zero));
+ result = FUNC(csin) (BUILD_COMPLEX(nan_value, minus_zero));
check_isnan ("real(csin(NaN - i0)) = NaN", __real__ result);
check ("imag(csin(NaN - i0)) = +-0", FUNC(fabs) (__imag__ result), 0);
- result = FUNC(csin) (BUILD_COMPLEX (nan_value, plus_infty));
+ result = FUNC(csin) (BUILD_COMPLEX(nan_value, plus_infty));
check_isnan ("real(csin(NaN + i Inf)) = NaN", __real__ result);
check_isinfp ("imag(csin(NaN + i Inf)) = +-Inf",
FUNC(fabs) (__imag__ result));
- result = FUNC(csin) (BUILD_COMPLEX (nan_value, minus_infty));
+ result = FUNC(csin) (BUILD_COMPLEX(nan_value, minus_infty));
check_isnan ("real(csin(NaN - i Inf)) = NaN", __real__ result);
check_isinfp ("real(csin(NaN - i Inf)) = +-Inf",
FUNC(fabs) (__imag__ result));
- result = FUNC(csin) (BUILD_COMPLEX (nan_value, 9.0));
+ result = FUNC(csin) (BUILD_COMPLEX(nan_value, 9.0));
check_isnan_maybe_exc ("real(csin(NaN + i9.0)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csin(NaN + i9.0)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (nan_value, -9.0));
+ result = FUNC(csin) (BUILD_COMPLEX(nan_value, -9.0));
check_isnan_maybe_exc ("real(csin(NaN - i9.0)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csin(NaN - i9.0)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (0.0, nan_value));
+ result = FUNC(csin) (BUILD_COMPLEX(0.0, nan_value));
check ("real(csin(0 + i NaN))", __real__ result, 0.0);
check_isnan ("imag(csin(0 + i NaN)) = NaN", __imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (minus_zero, nan_value));
+ result = FUNC(csin) (BUILD_COMPLEX(minus_zero, nan_value));
check ("real(csin(-0 + i NaN)) = -0", __real__ result, minus_zero);
check_isnan ("imag(csin(-0 + NaN)) = NaN", __imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (10.0, nan_value));
+ result = FUNC(csin) (BUILD_COMPLEX(10.0, nan_value));
check_isnan_maybe_exc ("real(csin(10 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csin(10 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (nan_value, -10.0));
+ result = FUNC(csin) (BUILD_COMPLEX(nan_value, -10.0));
check_isnan_maybe_exc ("real(csin(-10 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csin(-10 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (plus_infty, nan_value));
+ result = FUNC(csin) (BUILD_COMPLEX(plus_infty, nan_value));
check_isnan_maybe_exc ("real(csin(+Inf + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csin(+Inf + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (minus_infty, nan_value));
+ result = FUNC(csin) (BUILD_COMPLEX(minus_infty, nan_value));
check_isnan_maybe_exc ("real(csin(-Inf + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csin(-Inf + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (nan_value, nan_value));
+ result = FUNC(csin) (BUILD_COMPLEX(nan_value, nan_value));
check_isnan ("real(csin(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(csin(NaN + i NaN)) = NaN", __imag__ result);
- result = FUNC(csin) (BUILD_COMPLEX (0.7, 1.2));
+ result = FUNC(csin) (BUILD_COMPLEX(0.7, 1.2));
check_eps ("real(csin(0.7 + i 1.2)) = 1.166456341...", __real__ result,
1.1664563419657581376L, CHOOSE(2e-16L, 0, 0));
check_eps ("imag(csin(0.7 + i 1.2)) = 1.154499724...", __imag__ result,
1.1544997246948547371L, CHOOSE(2e-17L, 0, 2e-7));
- result = FUNC(csin) (BUILD_COMPLEX (-2, -3));
+ result = FUNC(csin) (BUILD_COMPLEX(-2, -3));
check_eps ("real(csin(-2 - i 3)) == -9.15449...", __real__ result,
-9.1544991469114295734L, CHOOSE(4e-18L, 0, 1e-6));
check_eps ("imag(csin(-2 - i 3)) == -4.16890...", __imag__ result,
@@ -2940,175 +2876,175 @@ csinh_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC(csinh) (BUILD_COMPLEX (0.0, 0.0));
+ result = FUNC(csinh) (BUILD_COMPLEX(0.0, 0.0));
check ("real(csinh(0 + 0i)) = 0", __real__ result, 0);
check ("imag(csinh(0 + 0i)) = 0", __imag__ result, 0);
- result = FUNC(csinh) (BUILD_COMPLEX (minus_zero, 0.0));
+ result = FUNC(csinh) (BUILD_COMPLEX(minus_zero, 0.0));
check ("real(csinh(-0 + 0i)) = -0", __real__ result, minus_zero);
check ("imag(csinh(-0 + 0i)) = 0", __imag__ result, 0);
- result = FUNC(csinh) (BUILD_COMPLEX (0.0, minus_zero));
+ result = FUNC(csinh) (BUILD_COMPLEX(0.0, minus_zero));
check ("real(csinh(0 - 0i)) = 0", __real__ result, 0);
check ("imag(csinh(0 - 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(csinh) (BUILD_COMPLEX (minus_zero, minus_zero));
+ result = FUNC(csinh) (BUILD_COMPLEX(minus_zero, minus_zero));
check ("real(csinh(-0 - 0i)) = -0", __real__ result, minus_zero);
check ("imag(csinh(-0 - 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(csinh) (BUILD_COMPLEX (0.0, plus_infty));
+ result = FUNC(csinh) (BUILD_COMPLEX(0.0, plus_infty));
check_exc ("real(csinh(0 + i Inf)) = +-0 plus invalid exception",
FUNC(fabs) (__real__ result), 0, INVALID_EXCEPTION);
check_isnan ("imag(csinh(0 + i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (minus_zero, plus_infty));
+ result = FUNC(csinh) (BUILD_COMPLEX(minus_zero, plus_infty));
check_exc ("real(csinh(-0 + i Inf)) = +-0 plus invalid exception",
FUNC(fabs) (__real__ result), 0, INVALID_EXCEPTION);
check_isnan ("imag(csinh(-0 + i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (0.0, minus_infty));
+ result = FUNC(csinh) (BUILD_COMPLEX(0.0, minus_infty));
check_exc ("real(csinh(0 - i Inf)) = +-0 plus invalid exception",
FUNC(fabs) (__real__ result), 0, INVALID_EXCEPTION);
check_isnan ("imag(csinh(0 - i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (minus_zero, minus_infty));
+ result = FUNC(csinh) (BUILD_COMPLEX(minus_zero, minus_infty));
check_exc ("real(csinh(-0 - i Inf)) = +-0 plus invalid exception",
FUNC(fabs) (__real__ result), 0, INVALID_EXCEPTION);
check_isnan ("imag(csinh(-0 - i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (plus_infty, 0.0));
+ result = FUNC(csinh) (BUILD_COMPLEX(plus_infty, 0.0));
check_isinfp ("real(csinh(+Inf + 0i)) = +Inf", __real__ result);
check ("imag(csinh(+Inf + 0i)) = 0", __imag__ result, 0);
- result = FUNC(csinh) (BUILD_COMPLEX (minus_infty, 0.0));
+ result = FUNC(csinh) (BUILD_COMPLEX(minus_infty, 0.0));
check_isinfn ("real(csinh(-Inf + 0i)) = -Inf", __real__ result);
check ("imag(csinh(-Inf + 0i)) = 0", __imag__ result, 0);
- result = FUNC(csinh) (BUILD_COMPLEX (plus_infty, minus_zero));
+ result = FUNC(csinh) (BUILD_COMPLEX(plus_infty, minus_zero));
check_isinfp ("real(csinh(+Inf - 0i)) = +Inf", __real__ result);
check ("imag(csinh(+Inf - 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(csinh) (BUILD_COMPLEX (minus_infty, minus_zero));
+ result = FUNC(csinh) (BUILD_COMPLEX(minus_infty, minus_zero));
check_isinfn ("real(csinh(-Inf - 0i)) = -Inf", __real__ result);
check ("imag(csinh(-Inf - 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(csinh) (BUILD_COMPLEX (plus_infty, plus_infty));
+ result = FUNC(csinh) (BUILD_COMPLEX(plus_infty, plus_infty));
check_isinfp_exc ("real(csinh(+Inf + i Inf)) = +-Inf plus invalid exception",
FUNC(fabs) (__real__ result), INVALID_EXCEPTION);
check_isnan ("imag(csinh(+Inf + i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (minus_infty, plus_infty));
+ result = FUNC(csinh) (BUILD_COMPLEX(minus_infty, plus_infty));
check_isinfp_exc ("real(csinh(-Inf + i Inf)) = +-Inf plus invalid exception",
FUNC(fabs) (__real__ result), INVALID_EXCEPTION);
check_isnan ("imag(csinh(-Inf + i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (plus_infty, minus_infty));
+ result = FUNC(csinh) (BUILD_COMPLEX(plus_infty, minus_infty));
check_isinfp_exc ("real(csinh(Inf - i Inf)) = +-Inf plus invalid exception",
FUNC(fabs) (__real__ result), INVALID_EXCEPTION);
check_isnan ("imag(csinh(Inf - i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (minus_infty, minus_infty));
+ result = FUNC(csinh) (BUILD_COMPLEX(minus_infty, minus_infty));
check_isinfp_exc ("real(csinh(-Inf - i Inf)) = +-Inf plus invalid exception",
FUNC(fabs) (__real__ result), INVALID_EXCEPTION);
check_isnan ("imag(csinh(-Inf - i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (plus_infty, 4.625));
+ result = FUNC(csinh) (BUILD_COMPLEX(plus_infty, 4.625));
check_isinfn ("real(csinh(+Inf + i4.625)) = -Inf", __real__ result);
check_isinfn ("imag(csinh(+Inf + i4.625)) = -Inf", __imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (minus_infty, 4.625));
+ result = FUNC(csinh) (BUILD_COMPLEX(minus_infty, 4.625));
check_isinfp ("real(csinh(-Inf + i4.625)) = +Inf", __real__ result);
check_isinfn ("imag(csinh(-Inf + i4.625)) = -Inf", __imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (plus_infty, -4.625));
+ result = FUNC(csinh) (BUILD_COMPLEX(plus_infty, -4.625));
check_isinfn ("real(csinh(+Inf - i4.625)) = -Inf", __real__ result);
check_isinfp ("imag(csinh(+Inf - i4.625)) = +Inf", __imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (minus_infty, -4.625));
+ result = FUNC(csinh) (BUILD_COMPLEX(minus_infty, -4.625));
check_isinfp ("real(csinh(-Inf - i4.625)) = +Inf", __real__ result);
check_isinfp ("imag(csinh(-Inf - i4.625)) = +Inf", __imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (6.75, plus_infty));
+ result = FUNC(csinh) (BUILD_COMPLEX(6.75, plus_infty));
check_isnan_exc ("real(csinh(6.75 + i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csinh(6.75 + i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (-6.75, plus_infty));
+ result = FUNC(csinh) (BUILD_COMPLEX(-6.75, plus_infty));
check_isnan_exc ("real(csinh(-6.75 + i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csinh(-6.75 + i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (6.75, minus_infty));
+ result = FUNC(csinh) (BUILD_COMPLEX(6.75, minus_infty));
check_isnan_exc ("real(csinh(6.75 - i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csinh(6.75 - i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (-6.75, minus_infty));
+ result = FUNC(csinh) (BUILD_COMPLEX(-6.75, minus_infty));
check_isnan_exc ("real(csinh(-6.75 - i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csinh(-6.75 - i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (0.0, nan_value));
+ result = FUNC(csinh) (BUILD_COMPLEX(0.0, nan_value));
check ("real(csinh(0 + i NaN)) = +-0", FUNC(fabs) (__real__ result), 0);
check_isnan ("imag(csinh(0 + i NaN)) = NaN", __imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (minus_zero, nan_value));
+ result = FUNC(csinh) (BUILD_COMPLEX(minus_zero, nan_value));
check ("real(csinh(-0 + i NaN)) = +-0", FUNC(fabs) (__real__ result), 0);
check_isnan ("imag(csinh(-0 + i NaN)) = NaN", __imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (plus_infty, nan_value));
+ result = FUNC(csinh) (BUILD_COMPLEX(plus_infty, nan_value));
check_isinfp ("real(csinh(+Inf + i NaN)) = +-Inf",
FUNC(fabs) (__real__ result));
check_isnan ("imag(csinh(+Inf + i NaN)) = NaN", __imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (minus_infty, nan_value));
+ result = FUNC(csinh) (BUILD_COMPLEX(minus_infty, nan_value));
check_isinfp ("real(csinh(-Inf + i NaN)) = +-Inf",
FUNC(fabs) (__real__ result));
check_isnan ("imag(csinh(-Inf + i NaN)) = NaN", __imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (9.0, nan_value));
+ result = FUNC(csinh) (BUILD_COMPLEX(9.0, nan_value));
check_isnan_maybe_exc ("real(csinh(9.0 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csinh(9.0 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (-9.0, nan_value));
+ result = FUNC(csinh) (BUILD_COMPLEX(-9.0, nan_value));
check_isnan_maybe_exc ("real(csinh(-9.0 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csinh(-9.0 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (nan_value, 0.0));
+ result = FUNC(csinh) (BUILD_COMPLEX(nan_value, 0.0));
check_isnan ("real(csinh(NaN + i0)) = NaN", __real__ result);
check ("imag(csinh(NaN + i0)) = 0", __imag__ result, 0.0);
- result = FUNC(csinh) (BUILD_COMPLEX (nan_value, minus_zero));
+ result = FUNC(csinh) (BUILD_COMPLEX(nan_value, minus_zero));
check_isnan ("real(csinh(NaN - i0)) = NaN", __real__ result);
check ("imag(csinh(NaN - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(csinh) (BUILD_COMPLEX (nan_value, 10.0));
+ result = FUNC(csinh) (BUILD_COMPLEX(nan_value, 10.0));
check_isnan_maybe_exc ("real(csinh(NaN + i10)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csinh(NaN + i10)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (nan_value, -10.0));
+ result = FUNC(csinh) (BUILD_COMPLEX(nan_value, -10.0));
check_isnan_maybe_exc ("real(csinh(NaN - i10)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csinh(NaN - i10)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (nan_value, plus_infty));
+ result = FUNC(csinh) (BUILD_COMPLEX(nan_value, plus_infty));
check_isnan_maybe_exc ("real(csinh(NaN + i Inf)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csinh(NaN + i Inf)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (nan_value, minus_infty));
+ result = FUNC(csinh) (BUILD_COMPLEX(nan_value, minus_infty));
check_isnan_maybe_exc ("real(csinh(NaN - i Inf)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csinh(NaN - i Inf)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (nan_value, nan_value));
+ result = FUNC(csinh) (BUILD_COMPLEX(nan_value, nan_value));
check_isnan ("real(csinh(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(csinh(NaN + i NaN)) = NaN", __imag__ result);
- result = FUNC(csinh) (BUILD_COMPLEX (0.7, 1.2));
+ result = FUNC(csinh) (BUILD_COMPLEX(0.7, 1.2));
check_eps ("real(csinh(0.7 + i 1.2)) = 0.274878686...", __real__ result,
0.27487868678117583582L, CHOOSE(2e-17L, 6e-17, 3e-8));
check_eps ("imag(csinh(0.7 + i 1.2)) = 1.169866572...", __imag__ result,
1.1698665727426565139L, CHOOSE(6e-17L, 0, 2e-7));
- result = FUNC(csinh) (BUILD_COMPLEX (-2, -3));
+ result = FUNC(csinh) (BUILD_COMPLEX(-2, -3));
check_eps ("real(csinh(-2 - i 3)) == -3.59056...", __real__ result,
3.5905645899857799520L, CHOOSE(7e-19L, 5e-16, 3e-7));
check_eps ("imag(csinh(-2 - i 3)) == -0.53092...", __imag__ result,
@@ -3121,173 +3057,173 @@ ccos_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC(ccos) (BUILD_COMPLEX (0.0, 0.0));
+ result = FUNC(ccos) (BUILD_COMPLEX(0.0, 0.0));
check ("real(ccos(0 + 0i)) = 1.0", __real__ result, 1.0);
check ("imag(ccos(0 + 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(ccos) (BUILD_COMPLEX (minus_zero, 0.0));
+ result = FUNC(ccos) (BUILD_COMPLEX(minus_zero, 0.0));
check ("real(ccos(-0 + 0i)) = 1.0", __real__ result, 1.0);
check ("imag(ccos(-0 + 0i)) = 0", __imag__ result, 0.0);
- result = FUNC(ccos) (BUILD_COMPLEX (0.0, minus_zero));
+ result = FUNC(ccos) (BUILD_COMPLEX(0.0, minus_zero));
check ("real(ccos(0 - 0i)) = 1.0", __real__ result, 1.0);
check ("imag(ccos(0 - 0i)) = 0", __imag__ result, 0.0);
- result = FUNC(ccos) (BUILD_COMPLEX (minus_zero, minus_zero));
+ result = FUNC(ccos) (BUILD_COMPLEX(minus_zero, minus_zero));
check ("real(ccos(-0 - 0i)) = 1.0", __real__ result, 1.0);
check ("imag(ccos(-0 - 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(ccos) (BUILD_COMPLEX (plus_infty, 0.0));
+ result = FUNC(ccos) (BUILD_COMPLEX(plus_infty, 0.0));
check_isnan_exc ("real(ccos(+Inf + i0)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check ("imag(ccos(Inf + i0)) = +-0 plus invalid exception",
FUNC(fabs) (__imag__ result), 0);
- result = FUNC(ccos) (BUILD_COMPLEX (plus_infty, minus_zero));
+ result = FUNC(ccos) (BUILD_COMPLEX(plus_infty, minus_zero));
check_isnan_exc ("real(ccos(Inf - i0)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check ("imag(ccos(Inf - i0)) = +-0 plus invalid exception",
FUNC(fabs) (__imag__ result), 0);
- result = FUNC(ccos) (BUILD_COMPLEX (minus_infty, 0.0));
+ result = FUNC(ccos) (BUILD_COMPLEX(minus_infty, 0.0));
check_isnan_exc ("real(ccos(-Inf + i0)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check ("imag(ccos(-Inf + i0)) = +-0 plus invalid exception",
FUNC(fabs) (__imag__ result), 0);
- result = FUNC(ccos) (BUILD_COMPLEX (minus_infty, minus_zero));
+ result = FUNC(ccos) (BUILD_COMPLEX(minus_infty, minus_zero));
check_isnan_exc ("real(ccos(-Inf - i0)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check ("imag(ccos(-Inf - i0)) = +-0 plus invalid exception",
FUNC(fabs) (__imag__ result), 0);
- result = FUNC(ccos) (BUILD_COMPLEX (0.0, plus_infty));
+ result = FUNC(ccos) (BUILD_COMPLEX(0.0, plus_infty));
check_isinfp ("real(ccos(0 + i Inf)) = +Inf", __real__ result);
check ("imag(ccos(0 + i Inf)) = -0", __imag__ result, minus_zero);
- result = FUNC(ccos) (BUILD_COMPLEX (0.0, minus_infty));
+ result = FUNC(ccos) (BUILD_COMPLEX(0.0, minus_infty));
check_isinfp ("real(ccos(0 - i Inf)) = +Inf", __real__ result);
check ("imag(ccos(0 - i Inf)) = 0", __imag__ result, 0);
- result = FUNC(ccos) (BUILD_COMPLEX (minus_zero, plus_infty));
+ result = FUNC(ccos) (BUILD_COMPLEX(minus_zero, plus_infty));
check_isinfp ("real(ccos(-0 + i Inf)) = +Inf", __real__ result);
check ("imag(ccos(-0 + i Inf)) = 0", __imag__ result, 0.0);
- result = FUNC(ccos) (BUILD_COMPLEX (minus_zero, minus_infty));
+ result = FUNC(ccos) (BUILD_COMPLEX(minus_zero, minus_infty));
check_isinfp ("real(ccos(-0 - i Inf)) = +Inf", __real__ result);
check ("imag(ccos(-0 - i Inf)) = -0", __imag__ result, minus_zero);
- result = FUNC(ccos) (BUILD_COMPLEX (plus_infty, plus_infty));
+ result = FUNC(ccos) (BUILD_COMPLEX(plus_infty, plus_infty));
check_isinfp_exc ("real(ccos(+Inf + i Inf)) = +Inf plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccos(+Inf + i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (minus_infty, plus_infty));
+ result = FUNC(ccos) (BUILD_COMPLEX(minus_infty, plus_infty));
check_isinfp_exc ("real(ccos(-Inf + i Inf)) = +Inf plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccos(-Inf + i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (plus_infty, minus_infty));
+ result = FUNC(ccos) (BUILD_COMPLEX(plus_infty, minus_infty));
check_isinfp_exc ("real(ccos(Inf - i Inf)) = +Inf plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccos(Inf - i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (minus_infty, minus_infty));
+ result = FUNC(ccos) (BUILD_COMPLEX(minus_infty, minus_infty));
check_isinfp_exc ("real(ccos(-Inf - i Inf)) = +Inf plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccos(-Inf - i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (4.625, plus_infty));
+ result = FUNC(ccos) (BUILD_COMPLEX(4.625, plus_infty));
check_isinfn ("real(ccos(4.625 + i Inf)) = -Inf", __real__ result);
check_isinfp ("imag(ccos(4.625 + i Inf)) = +Inf", __imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (4.625, minus_infty));
+ result = FUNC(ccos) (BUILD_COMPLEX(4.625, minus_infty));
check_isinfn ("real(ccos(4.625 - i Inf)) = -Inf", __real__ result);
check_isinfn ("imag(ccos(4.625 - i Inf)) = -Inf", __imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (-4.625, plus_infty));
+ result = FUNC(ccos) (BUILD_COMPLEX(-4.625, plus_infty));
check_isinfn ("real(ccos(-4.625 + i Inf)) = -Inf", __real__ result);
check_isinfn ("imag(ccos(-4.625 + i Inf)) = -Inf", __imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (-4.625, minus_infty));
+ result = FUNC(ccos) (BUILD_COMPLEX(-4.625, minus_infty));
check_isinfn ("real(ccos(-4.625 - i Inf)) = -Inf", __real__ result);
check_isinfp ("imag(ccos(-4.625 - i Inf)) = +Inf", __imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (plus_infty, 6.75));
+ result = FUNC(ccos) (BUILD_COMPLEX(plus_infty, 6.75));
check_isnan_exc ("real(ccos(+Inf + i6.75)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccos(+Inf + i6.75)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (plus_infty, -6.75));
+ result = FUNC(ccos) (BUILD_COMPLEX(plus_infty, -6.75));
check_isnan_exc ("real(ccos(+Inf - i6.75)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccos(+Inf - i6.75)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (minus_infty, 6.75));
+ result = FUNC(ccos) (BUILD_COMPLEX(minus_infty, 6.75));
check_isnan_exc ("real(ccos(-Inf + i6.75)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccos(-Inf + i6.75)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (minus_infty, -6.75));
+ result = FUNC(ccos) (BUILD_COMPLEX(minus_infty, -6.75));
check_isnan_exc ("real(ccos(-Inf - i6.75)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccos(-Inf - i6.75)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (nan_value, 0.0));
+ result = FUNC(ccos) (BUILD_COMPLEX(nan_value, 0.0));
check_isnan ("real(ccos(NaN + i0)) = NaN", __real__ result);
check ("imag(ccos(NaN + i0)) = +-0", FUNC(fabs) (__imag__ result), 0);
- result = FUNC(ccos) (BUILD_COMPLEX (nan_value, minus_zero));
+ result = FUNC(ccos) (BUILD_COMPLEX(nan_value, minus_zero));
check_isnan ("real(ccos(NaN - i0)) = NaN", __real__ result);
check ("imag(ccos(NaN - i0)) = +-0", FUNC(fabs) (__imag__ result), 0);
- result = FUNC(ccos) (BUILD_COMPLEX (nan_value, plus_infty));
+ result = FUNC(ccos) (BUILD_COMPLEX(nan_value, plus_infty));
check_isinfp ("real(ccos(NaN + i Inf)) = +Inf", __real__ result);
check_isnan ("imag(ccos(NaN + i Inf)) = NaN", __imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (nan_value, minus_infty));
+ result = FUNC(ccos) (BUILD_COMPLEX(nan_value, minus_infty));
check_isinfp ("real(ccos(NaN - i Inf)) = +Inf", __real__ result);
check_isnan ("imag(ccos(NaN - i Inf)) = NaN", __imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (nan_value, 9.0));
+ result = FUNC(ccos) (BUILD_COMPLEX(nan_value, 9.0));
check_isnan_maybe_exc ("real(ccos(NaN + i9.0)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccos(NaN + i9.0)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (nan_value, -9.0));
+ result = FUNC(ccos) (BUILD_COMPLEX(nan_value, -9.0));
check_isnan_maybe_exc ("real(ccos(NaN - i9.0)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccos(NaN - i9.0)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (0.0, nan_value));
+ result = FUNC(ccos) (BUILD_COMPLEX(0.0, nan_value));
check_isnan ("real(ccos(0 + i NaN)) = NaN", __real__ result);
check ("imag(ccos(0 + i NaN)) = +-0", FUNC(fabs) (__imag__ result), 0.0);
- result = FUNC(ccos) (BUILD_COMPLEX (minus_zero, nan_value));
+ result = FUNC(ccos) (BUILD_COMPLEX(minus_zero, nan_value));
check_isnan ("real(ccos(-0 + i NaN)) = NaN", __real__ result);
check ("imag(ccos(-0 + i NaN)) = +-0", FUNC(fabs) (__imag__ result), 0.0);
- result = FUNC(ccos) (BUILD_COMPLEX (10.0, nan_value));
+ result = FUNC(ccos) (BUILD_COMPLEX(10.0, nan_value));
check_isnan_maybe_exc ("real(ccos(10 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccos(10 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (-10.0, nan_value));
+ result = FUNC(ccos) (BUILD_COMPLEX(-10.0, nan_value));
check_isnan_maybe_exc ("real(ccos(-10 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccos(-10 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (plus_infty, nan_value));
+ result = FUNC(ccos) (BUILD_COMPLEX(plus_infty, nan_value));
check_isnan_maybe_exc ("real(ccos(+Inf + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccos(+Inf + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (minus_infty, nan_value));
+ result = FUNC(ccos) (BUILD_COMPLEX(minus_infty, nan_value));
check_isnan_maybe_exc ("real(ccos(-Inf + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccos(-Inf + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (nan_value, nan_value));
+ result = FUNC(ccos) (BUILD_COMPLEX(nan_value, nan_value));
check_isnan ("real(ccos(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(ccos(NaN + i NaN)) = NaN", __imag__ result);
- result = FUNC(ccos) (BUILD_COMPLEX (0.7, 1.2));
+ result = FUNC(ccos) (BUILD_COMPLEX(0.7, 1.2));
check_eps ("real(ccos(0.7 + i 1.2)) = 1.384865764...", __real__ result,
1.3848657645312111080L, CHOOSE(4e-18L, 3e-16, 2e-7));
check_eps ("imag(ccos(0.7 + i 1.2)) = -0.972421703...", __imag__ result,
-0.97242170335830028619L, CHOOSE(2e-16L, 2e-16, 0));
- result = FUNC(ccos) (BUILD_COMPLEX (-2, -3));
+ result = FUNC(ccos) (BUILD_COMPLEX(-2, -3));
check_eps ("real(ccos(-2 - i 3)) == -4.18962...", __real__ result,
-4.1896256909688072301L, CHOOSE(2e-17L, 0, 5e-7));
check_eps ("imag(ccos(-2 - i 3)) == -9.10922...", __imag__ result,
@@ -3300,174 +3236,174 @@ ccosh_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC(ccosh) (BUILD_COMPLEX (0.0, 0.0));
+ result = FUNC(ccosh) (BUILD_COMPLEX(0.0, 0.0));
check ("real(ccosh(0 + 0i)) = 1.0", __real__ result, 1.0);
check ("imag(ccosh(0 + 0i)) = 0", __imag__ result, 0);
- result = FUNC(ccosh) (BUILD_COMPLEX (minus_zero, 0.0));
+ result = FUNC(ccosh) (BUILD_COMPLEX(minus_zero, 0.0));
check ("real(ccosh(-0 + 0i)) = 1.0", __real__ result, 1.0);
check ("imag(ccosh(-0 + 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(ccosh) (BUILD_COMPLEX (0.0, minus_zero));
+ result = FUNC(ccosh) (BUILD_COMPLEX(0.0, minus_zero));
check ("real(ccosh(0 - 0i)) = 1.0", __real__ result, 1.0);
check ("imag(ccosh(0 - 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(ccosh) (BUILD_COMPLEX (minus_zero, minus_zero));
+ result = FUNC(ccosh) (BUILD_COMPLEX(minus_zero, minus_zero));
check ("real(ccosh(-0 - 0i)) = 1.0", __real__ result, 1.0);
check ("imag(ccosh(-0 - 0i)) = 0", __imag__ result, 0.0);
- result = FUNC(ccosh) (BUILD_COMPLEX (0.0, plus_infty));
+ result = FUNC(ccosh) (BUILD_COMPLEX(0.0, plus_infty));
check_isnan_exc ("real(ccosh(0 + i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check ("imag(ccosh(0 + i Inf)) = +-0 plus invalid exception",
FUNC(fabs) (__imag__ result), 0);
- result = FUNC(ccosh) (BUILD_COMPLEX (minus_zero, plus_infty));
+ result = FUNC(ccosh) (BUILD_COMPLEX(minus_zero, plus_infty));
check_isnan_exc ("real(ccosh(-0 + i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check ("imag(ccosh(-0 + i Inf)) = +-0 plus invalid exception",
FUNC(fabs) (__imag__ result), 0);
- result = FUNC(ccosh) (BUILD_COMPLEX (0.0, minus_infty));
+ result = FUNC(ccosh) (BUILD_COMPLEX(0.0, minus_infty));
check_isnan_exc ("real(ccosh(0 - i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check ("imag(ccosh(0 - i Inf)) = +-0 plus invalid exception",
FUNC(fabs) (__imag__ result), 0);
- result = FUNC(ccosh) (BUILD_COMPLEX (minus_zero, minus_infty));
+ result = FUNC(ccosh) (BUILD_COMPLEX(minus_zero, minus_infty));
check_isnan_exc ("real(ccosh(-0 - i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check ("imag(ccosh(-0 - i Inf)) = +-0 plus invalid exception",
FUNC(fabs) (__imag__ result), 0);
- result = FUNC(ccosh) (BUILD_COMPLEX (plus_infty, 0.0));
+ result = FUNC(ccosh) (BUILD_COMPLEX(plus_infty, 0.0));
check_isinfp ("real(ccosh(+Inf + 0i)) = +Inf", __real__ result);
check ("imag(ccosh(+Inf + 0i)) = 0", __imag__ result, 0);
- result = FUNC(ccosh) (BUILD_COMPLEX (minus_infty, 0.0));
+ result = FUNC(ccosh) (BUILD_COMPLEX(minus_infty, 0.0));
check_isinfp ("real(ccosh(-Inf + 0i)) = +Inf", __real__ result);
check ("imag(ccosh(-Inf + 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(ccosh) (BUILD_COMPLEX (plus_infty, minus_zero));
+ result = FUNC(ccosh) (BUILD_COMPLEX(plus_infty, minus_zero));
check_isinfp ("real(ccosh(+Inf - 0i)) = +Inf", __real__ result);
check ("imag(ccosh(+Inf - 0i)) = -0", __imag__ result, minus_zero);
- result = FUNC(ccosh) (BUILD_COMPLEX (minus_infty, minus_zero));
+ result = FUNC(ccosh) (BUILD_COMPLEX(minus_infty, minus_zero));
check_isinfp ("real(ccosh(-Inf - 0i)) = +Inf", __real__ result);
check ("imag(ccosh(-Inf - 0i)) = 0", __imag__ result, 0.0);
- result = FUNC(ccosh) (BUILD_COMPLEX (plus_infty, plus_infty));
+ result = FUNC(ccosh) (BUILD_COMPLEX(plus_infty, plus_infty));
check_isinfp_exc ("real(ccosh(+Inf + i Inf)) = +Inf plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccosh(+Inf + i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (minus_infty, plus_infty));
+ result = FUNC(ccosh) (BUILD_COMPLEX(minus_infty, plus_infty));
check_isinfp_exc ("real(ccosh(-Inf + i Inf)) = +Inf plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccosh(-Inf + i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (plus_infty, minus_infty));
+ result = FUNC(ccosh) (BUILD_COMPLEX(plus_infty, minus_infty));
check_isinfp_exc ("real(ccosh(Inf - i Inf)) = +Inf plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccosh(Inf - i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (minus_infty, minus_infty));
+ result = FUNC(ccosh) (BUILD_COMPLEX(minus_infty, minus_infty));
check_isinfp_exc ("real(ccosh(-Inf - i Inf)) = +Inf plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccosh(-Inf - i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (plus_infty, 4.625));
+ result = FUNC(ccosh) (BUILD_COMPLEX(plus_infty, 4.625));
check_isinfn ("real(ccosh(+Inf + i4.625)) = -Inf", __real__ result);
check_isinfn ("imag(ccosh(+Inf + i4.625)) = -Inf", __imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (minus_infty, 4.625));
+ result = FUNC(ccosh) (BUILD_COMPLEX(minus_infty, 4.625));
check_isinfn ("real(ccosh(-Inf + i4.625)) = -Inf", __real__ result);
check_isinfp ("imag(ccosh(-Inf + i4.625)) = Inf", __imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (plus_infty, -4.625));
+ result = FUNC(ccosh) (BUILD_COMPLEX(plus_infty, -4.625));
check_isinfn ("real(ccosh(+Inf - i4.625)) = -Inf", __real__ result);
check_isinfp ("imag(ccosh(+Inf - i4.625)) = +Inf", __imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (minus_infty, -4.625));
+ result = FUNC(ccosh) (BUILD_COMPLEX(minus_infty, -4.625));
check_isinfn ("real(ccosh(-Inf - i4.625)) = -Inf", __real__ result);
check_isinfn ("imag(ccosh(-Inf - i4.625)) = -Inf", __imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (6.75, plus_infty));
+ result = FUNC(ccosh) (BUILD_COMPLEX(6.75, plus_infty));
check_isnan_exc ("real(ccosh(6.75 + i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccosh(6.75 + i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (-6.75, plus_infty));
+ result = FUNC(ccosh) (BUILD_COMPLEX(-6.75, plus_infty));
check_isnan_exc ("real(ccosh(-6.75 + i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccosh(-6.75 + i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (6.75, minus_infty));
+ result = FUNC(ccosh) (BUILD_COMPLEX(6.75, minus_infty));
check_isnan_exc ("real(ccosh(6.75 - i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccosh(6.75 - i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (-6.75, minus_infty));
+ result = FUNC(ccosh) (BUILD_COMPLEX(-6.75, minus_infty));
check_isnan_exc ("real(ccosh(-6.75 - i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccosh(-6.75 - i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (0.0, nan_value));
+ result = FUNC(ccosh) (BUILD_COMPLEX(0.0, nan_value));
check_isnan ("real(ccosh(0 + i NaN)) = NaN", __real__ result);
check ("imag(ccosh(0 + i NaN)) = +-0", FUNC(fabs) (__imag__ result), 0);
- result = FUNC(ccosh) (BUILD_COMPLEX (minus_zero, nan_value));
+ result = FUNC(ccosh) (BUILD_COMPLEX(minus_zero, nan_value));
check_isnan ("real(ccosh(-0 + i NaN)) = NaN", __real__ result);
check ("imag(ccosh(-0 + i NaN)) = +-0", FUNC(fabs) (__imag__ result), 0);
- result = FUNC(ccosh) (BUILD_COMPLEX (plus_infty, nan_value));
+ result = FUNC(ccosh) (BUILD_COMPLEX(plus_infty, nan_value));
check_isinfp ("real(ccosh(+Inf + i NaN)) = +Inf", __real__ result);
check_isnan ("imag(ccosh(+Inf + i NaN)) = NaN", __imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (minus_infty, nan_value));
+ result = FUNC(ccosh) (BUILD_COMPLEX(minus_infty, nan_value));
check_isinfp ("real(ccosh(-Inf + i NaN)) = +Inf", __real__ result);
check_isnan ("imag(ccosh(-Inf + i NaN)) = NaN", __imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (9.0, nan_value));
+ result = FUNC(ccosh) (BUILD_COMPLEX(9.0, nan_value));
check_isnan_maybe_exc ("real(ccosh(9.0 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccosh(9.0 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (-9.0, nan_value));
+ result = FUNC(ccosh) (BUILD_COMPLEX(-9.0, nan_value));
check_isnan_maybe_exc ("real(ccosh(-9.0 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccosh(-9.0 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (nan_value, 0.0));
+ result = FUNC(ccosh) (BUILD_COMPLEX(nan_value, 0.0));
check_isnan ("real(ccosh(NaN + i0)) = NaN", __real__ result);
check ("imag(ccosh(NaN + i0)) = +-0", FUNC(fabs) (__imag__ result), 0.0);
- result = FUNC(ccosh) (BUILD_COMPLEX (nan_value, minus_zero));
+ result = FUNC(ccosh) (BUILD_COMPLEX(nan_value, minus_zero));
check_isnan ("real(ccosh(NaN - i0)) = NaN", __real__ result);
check ("imag(ccosh(NaN - i0)) = +-0", FUNC(fabs) (__imag__ result), 0.0);
- result = FUNC(ccosh) (BUILD_COMPLEX (nan_value, 10.0));
+ result = FUNC(ccosh) (BUILD_COMPLEX(nan_value, 10.0));
check_isnan_maybe_exc ("real(ccosh(NaN + i10)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccosh(NaN + i10)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (nan_value, -10.0));
+ result = FUNC(ccosh) (BUILD_COMPLEX(nan_value, -10.0));
check_isnan_maybe_exc ("real(ccosh(NaN - i10)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccosh(NaN - i10)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (nan_value, plus_infty));
+ result = FUNC(ccosh) (BUILD_COMPLEX(nan_value, plus_infty));
check_isnan_maybe_exc ("real(ccosh(NaN + i Inf)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccosh(NaN + i Inf)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (nan_value, minus_infty));
+ result = FUNC(ccosh) (BUILD_COMPLEX(nan_value, minus_infty));
check_isnan_maybe_exc ("real(ccosh(NaN - i Inf)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ccosh(NaN - i Inf)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (nan_value, nan_value));
+ result = FUNC(ccosh) (BUILD_COMPLEX(nan_value, nan_value));
check_isnan ("real(ccosh(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(ccosh(NaN + i NaN)) = NaN", __imag__ result);
- result = FUNC(ccosh) (BUILD_COMPLEX (0.7, 1.2));
+ result = FUNC(ccosh) (BUILD_COMPLEX(0.7, 1.2));
check_eps ("real(ccosh(0.7 + i 1.2)) == 0.45482...", __real__ result,
0.4548202223691477654L, CHOOSE(5e-17L, 6e-17, 9e-8));
check_eps ("imag(ccosh(0.7 + i 1.2)) == 0.70702...", __imag__ result,
0.7070296600921537682L, CHOOSE(7e-17L, 2e-16, 0));
- result = FUNC(ccosh) (BUILD_COMPLEX (-2, -3));
- check_eps ("real(ccosh(-2 - i 3)) == -3.72454...", __real__ result,
+ result = FUNC(ccosh) (BUILD_COMPLEX(-2, -3));
+ check_eps ("real(ccosh(-2 - i 3)) == -3.72454...", __real__ result,
-3.7245455049153225654L, CHOOSE(7e-19L, 0, 3e-7));
check_eps ("imag(ccosh(-2 - i 3)) == -0.51182...", __imag__ result,
0.5118225699873846088L, CHOOSE(3e-19L, 2e-16, 6e-8));
@@ -3479,136 +3415,136 @@ cacos_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC(cacos) (BUILD_COMPLEX (0, 0));
+ result = FUNC(cacos) (BUILD_COMPLEX(0, 0));
check ("real(cacos(0 + i0)) = pi/2", __real__ result, M_PI_2l);
check ("imag(cacos(0 + i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(cacos) (BUILD_COMPLEX (minus_zero, 0));
+ result = FUNC(cacos) (BUILD_COMPLEX(minus_zero, 0));
check ("real(cacos(-0 + i0)) = pi/2", __real__ result, M_PI_2l);
check ("imag(cacos(-0 + i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(cacos) (BUILD_COMPLEX (0, minus_zero));
+ result = FUNC(cacos) (BUILD_COMPLEX(0, minus_zero));
check ("real(cacos(0 - i0)) = pi/2", __real__ result, M_PI_2l);
check ("imag(cacos(0 - i0)) = 0", __imag__ result, 0);
- result = FUNC(cacos) (BUILD_COMPLEX (minus_zero, minus_zero));
+ result = FUNC(cacos) (BUILD_COMPLEX(minus_zero, minus_zero));
check ("real(cacos(-0 - i0)) = pi/2", __real__ result, M_PI_2l);
check ("imag(cacos(-0 - i0)) = 0", __imag__ result, 0);
- result = FUNC(cacos) (BUILD_COMPLEX (minus_infty, plus_infty));
+ result = FUNC(cacos) (BUILD_COMPLEX(minus_infty, plus_infty));
check ("real(cacos(-Inf + i Inf)) = 3*pi/4", __real__ result,
M_PIl - M_PI_4l);
check_isinfn ("imag(cacos(-Inf + i Inf)) = -Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (minus_infty, minus_infty));
+ result = FUNC(cacos) (BUILD_COMPLEX(minus_infty, minus_infty));
check ("real(cacos(-Inf - i Inf)) = 3*pi/4", __real__ result,
- M_PIl - M_PI_4l);
+ M_PIl - M_PI_4l);
check_isinfp ("imag(cacos(-Inf - i Inf)) = +Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (plus_infty, plus_infty));
+ result = FUNC(cacos) (BUILD_COMPLEX(plus_infty, plus_infty));
check ("real(cacos(+Inf + i Inf)) = pi/4", __real__ result, M_PI_4l);
check_isinfn ("imag(cacos(+Inf + i Inf)) = -Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (plus_infty, minus_infty));
+ result = FUNC(cacos) (BUILD_COMPLEX(plus_infty, minus_infty));
check ("real(cacos(+Inf - i Inf)) = pi/4", __real__ result, M_PI_4l);
check_isinfp ("imag(cacos(+Inf - i Inf)) = +Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (-10.0, plus_infty));
+ result = FUNC(cacos) (BUILD_COMPLEX(-10.0, plus_infty));
check ("real(cacos(-10.0 + i Inf)) = pi/2", __real__ result, M_PI_2l);
check_isinfn ("imag(cacos(-10.0 + i Inf)) = -Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (-10.0, minus_infty));
+ result = FUNC(cacos) (BUILD_COMPLEX(-10.0, minus_infty));
check ("real(cacos(-10.0 - i Inf)) = pi/2", __real__ result, M_PI_2l);
check_isinfp ("imag(cacos(-10.0 - i Inf)) = +Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (0, plus_infty));
+ result = FUNC(cacos) (BUILD_COMPLEX(0, plus_infty));
check ("real(cacos(0 + i Inf)) = pi/2", __real__ result, M_PI_2l);
check_isinfn ("imag(cacos(0 + i Inf)) = -Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (0, minus_infty));
+ result = FUNC(cacos) (BUILD_COMPLEX(0, minus_infty));
check ("real(cacos(0 - i Inf)) = pi/2", __real__ result, M_PI_2l);
check_isinfp ("imag(cacos(0 - i Inf)) = +Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (0.1, plus_infty));
+ result = FUNC(cacos) (BUILD_COMPLEX(0.1, plus_infty));
check ("real(cacos(0.1 + i Inf)) = pi/2", __real__ result, M_PI_2l);
check_isinfn ("imag(cacos(0.1 + i Inf)) = -Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (0.1, minus_infty));
+ result = FUNC(cacos) (BUILD_COMPLEX(0.1, minus_infty));
check ("real(cacos(0.1 - i Inf)) = pi/2", __real__ result, M_PI_2l);
check_isinfp ("imag(cacos(0.1 - i Inf)) = +Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (minus_infty, 0));
+ result = FUNC(cacos) (BUILD_COMPLEX(minus_infty, 0));
check ("real(cacos(-Inf + i0)) = pi", __real__ result, M_PIl);
check_isinfn ("imag(cacos(-Inf + i0)) = -Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (minus_infty, minus_zero));
+ result = FUNC(cacos) (BUILD_COMPLEX(minus_infty, minus_zero));
check ("real(cacos(-Inf - i0)) = pi", __real__ result, M_PIl);
check_isinfp ("imag(cacos(-Inf - i0)) = +Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (minus_infty, 100));
+ result = FUNC(cacos) (BUILD_COMPLEX(minus_infty, 100));
check ("real(cacos(-Inf + i100)) = pi", __real__ result, M_PIl);
check_isinfn ("imag(cacos(-Inf + i100)) = -Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (minus_infty, -100));
+ result = FUNC(cacos) (BUILD_COMPLEX(minus_infty, -100));
check ("real(cacos(-Inf - i100)) = pi", __real__ result, M_PIl);
check_isinfp ("imag(cacos(-Inf - i100)) = +Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (plus_infty, 0));
+ result = FUNC(cacos) (BUILD_COMPLEX(plus_infty, 0));
check ("real(cacos(+Inf + i0)) = 0", __real__ result, 0);
check_isinfn ("imag(cacos(+Inf + i0)) = -Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (plus_infty, minus_zero));
+ result = FUNC(cacos) (BUILD_COMPLEX(plus_infty, minus_zero));
check ("real(cacos(+Inf - i0)) = 0", __real__ result, 0);
check_isinfp ("imag(cacos(+Inf - i0)) = +Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (plus_infty, 0.5));
+ result = FUNC(cacos) (BUILD_COMPLEX(plus_infty, 0.5));
check ("real(cacos(+Inf + i0.5)) = 0", __real__ result, 0);
check_isinfn ("imag(cacos(+Inf + i0.5)) = -Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (plus_infty, -0.5));
+ result = FUNC(cacos) (BUILD_COMPLEX(plus_infty, -0.5));
check ("real(cacos(+Inf - i0.5)) = 0", __real__ result, 0);
check_isinfp ("imag(cacos(+Inf - i0.5)) = +Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (plus_infty, nan_value));
+ result = FUNC(cacos) (BUILD_COMPLEX(plus_infty, nan_value));
check_isnan ("real(cacos(+Inf + i NaN)) = NaN", __real__ result);
check_isinfp ("imag(cacos(+Inf + i NaN)) = +-Inf",
FUNC(fabs) (__imag__ result));
- result = FUNC(cacos) (BUILD_COMPLEX (minus_infty, nan_value));
+ result = FUNC(cacos) (BUILD_COMPLEX(minus_infty, nan_value));
check_isnan ("real(cacos(-Inf + i NaN)) = NaN", __real__ result);
check_isinfp ("imag(cacos(-Inf + i NaN)) = +-Inf",
FUNC(fabs) (__imag__ result));
- result = FUNC(cacos) (BUILD_COMPLEX (0, nan_value));
+ result = FUNC(cacos) (BUILD_COMPLEX(0, nan_value));
check ("real(cacos(0 + i NaN)) = pi/2", __real__ result, M_PI_2l);
check_isnan ("imag(cacos(0 + i NaN)) = NaN", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (minus_zero, nan_value));
+ result = FUNC(cacos) (BUILD_COMPLEX(minus_zero, nan_value));
check ("real(cacos(-0 + i NaN)) = pi/2", __real__ result, M_PI_2l);
check_isnan ("imag(cacos(-0 + i NaN)) = NaN", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (nan_value, plus_infty));
+ result = FUNC(cacos) (BUILD_COMPLEX(nan_value, plus_infty));
check_isnan ("real(cacos(NaN + i Inf)) = NaN", __real__ result);
check_isinfn ("imag(cacos(NaN + i Inf)) = -Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (nan_value, minus_infty));
+ result = FUNC(cacos) (BUILD_COMPLEX(nan_value, minus_infty));
check_isnan ("real(cacos(NaN - i Inf)) = NaN", __real__ result);
check_isinfp ("imag(cacos(NaN - i Inf)) = +Inf", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (10.5, nan_value));
+ result = FUNC(cacos) (BUILD_COMPLEX(10.5, nan_value));
check_isnan_maybe_exc ("real(cacos(10.5 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cacos(10.5 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (-10.5, nan_value));
+ result = FUNC(cacos) (BUILD_COMPLEX(-10.5, nan_value));
check_isnan_maybe_exc ("real(cacos(-10.5 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cacos(-10.5 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (nan_value, 0.75));
+ result = FUNC(cacos) (BUILD_COMPLEX(nan_value, 0.75));
check_isnan_maybe_exc ("real(cacos(NaN + i0.75)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cacos(NaN + i0.75)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (-10.5, nan_value));
+ result = FUNC(cacos) (BUILD_COMPLEX(-10.5, nan_value));
check_isnan_maybe_exc ("real(cacos(NaN - i0.75)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cacos(NaN - i0.75)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (nan_value, nan_value));
+ result = FUNC(cacos) (BUILD_COMPLEX(nan_value, nan_value));
check_isnan ("real(cacos(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(cacos(NaN + i NaN)) = NaN", __imag__ result);
- result = FUNC(cacos) (BUILD_COMPLEX (0.7, 1.2));
+ result = FUNC(cacos) (BUILD_COMPLEX(0.7, 1.2));
check_eps ("real(cacos(0.7 + i 1.2)) == 1.13518...", __real__ result,
1.1351827477151551089L, CHOOSE(2e-17L, 3e-16, 2e-7));
check_eps ("imag(cacos(0.7 + i 1.2)) == -1.09276...", __imag__ result,
-1.0927647857577371459L, CHOOSE(4e-17L, 3e-16, 3e-7));
- result = FUNC(cacos) (BUILD_COMPLEX (-2, -3));
+ result = FUNC(cacos) (BUILD_COMPLEX(-2, -3));
check_eps ("real(cacos(-2 - i 3)) == 2.14144...", __real__ result,
2.1414491111159960199L, CHOOSE(3e-19L, 0, 0));
check_eps ("imag(cacos(-2 - i 3)) == -1.98338...", __imag__ result,
@@ -3621,138 +3557,138 @@ cacosh_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC(cacosh) (BUILD_COMPLEX (0, 0));
+ result = FUNC(cacosh) (BUILD_COMPLEX(0, 0));
check ("real(cacosh(0 + i0)) = 0", __real__ result, 0);
check ("imag(cacosh(0 + i0)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(cacosh) (BUILD_COMPLEX (minus_zero, 0));
+ result = FUNC(cacosh) (BUILD_COMPLEX(minus_zero, 0));
check ("real(cacosh(-0 + i0)) = 0", __real__ result, 0);
check ("imag(cacosh(-0 + i0)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(cacosh) (BUILD_COMPLEX (0, minus_zero));
+ result = FUNC(cacosh) (BUILD_COMPLEX(0, minus_zero));
check ("real(cacosh(0 - i0)) = 0", __real__ result, 0);
check ("imag(cacosh(0 - i0)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(cacosh) (BUILD_COMPLEX (minus_zero, minus_zero));
+ result = FUNC(cacosh) (BUILD_COMPLEX(minus_zero, minus_zero));
check ("real(cacosh(-0 - i0)) = 0", __real__ result, 0);
check ("imag(cacosh(-0 - i0)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(cacosh) (BUILD_COMPLEX (minus_infty, plus_infty));
+ result = FUNC(cacosh) (BUILD_COMPLEX(minus_infty, plus_infty));
check_isinfp ("real(cacosh(-Inf + i Inf)) = +Inf", __real__ result);
check ("imag(cacosh(-Inf + i Inf)) = 3*pi/4", __imag__ result,
M_PIl - M_PI_4l);
- result = FUNC(cacosh) (BUILD_COMPLEX (minus_infty, minus_infty));
+ result = FUNC(cacosh) (BUILD_COMPLEX(minus_infty, minus_infty));
check_isinfp ("real(cacosh(-Inf - i Inf)) = +Inf", __real__ result);
check ("imag(cacosh(-Inf - i Inf)) = -3*pi/4", __imag__ result,
M_PI_4l - M_PIl);
- result = FUNC(cacosh) (BUILD_COMPLEX (plus_infty, plus_infty));
+ result = FUNC(cacosh) (BUILD_COMPLEX(plus_infty, plus_infty));
check_isinfp ("real(cacosh(+Inf + i Inf)) = +Inf", __real__ result);
check ("imag(cacosh(+Inf + i Inf)) = pi/4", __imag__ result, M_PI_4l);
- result = FUNC(cacosh) (BUILD_COMPLEX (plus_infty, minus_infty));
+ result = FUNC(cacosh) (BUILD_COMPLEX(plus_infty, minus_infty));
check_isinfp ("real(cacosh(+Inf - i Inf)) = +Inf", __real__ result);
check ("imag(cacosh(+Inf - i Inf)) = -pi/4", __imag__ result, -M_PI_4l);
- result = FUNC(cacosh) (BUILD_COMPLEX (-10.0, plus_infty));
+ result = FUNC(cacosh) (BUILD_COMPLEX(-10.0, plus_infty));
check_isinfp ("real(cacosh(-10.0 + i Inf)) = +Inf", __real__ result);
check ("imag(cacosh(-10.0 + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(cacosh) (BUILD_COMPLEX (-10.0, minus_infty));
+ result = FUNC(cacosh) (BUILD_COMPLEX(-10.0, minus_infty));
check_isinfp ("real(cacosh(-10.0 - i Inf)) = +Inf", __real__ result);
check ("imag(cacosh(-10.0 - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(cacosh) (BUILD_COMPLEX (0, plus_infty));
+ result = FUNC(cacosh) (BUILD_COMPLEX(0, plus_infty));
check_isinfp ("real(cacosh(0 + i Inf)) = +Inf", __real__ result);
check ("imag(cacosh(0 + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(cacosh) (BUILD_COMPLEX (0, minus_infty));
+ result = FUNC(cacosh) (BUILD_COMPLEX(0, minus_infty));
check_isinfp ("real(cacosh(0 - i Inf)) = +Inf", __real__ result);
check ("imag(cacosh(0 - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(cacosh) (BUILD_COMPLEX (0.1, plus_infty));
+ result = FUNC(cacosh) (BUILD_COMPLEX(0.1, plus_infty));
check_isinfp ("real(cacosh(0.1 + i Inf)) = +Inf", __real__ result);
check ("imag(cacosh(0.1 + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(cacosh) (BUILD_COMPLEX (0.1, minus_infty));
+ result = FUNC(cacosh) (BUILD_COMPLEX(0.1, minus_infty));
check_isinfp ("real(cacosh(0.1 - i Inf)) = +Inf", __real__ result);
check ("imag(cacosh(0.1 - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(cacosh) (BUILD_COMPLEX (minus_infty, 0));
+ result = FUNC(cacosh) (BUILD_COMPLEX(minus_infty, 0));
check_isinfp ("real(cacosh(-Inf + i0)) = +Inf", __real__ result);
check ("imag(cacosh(-Inf + i0)) = pi", __imag__ result, M_PIl);
- result = FUNC(cacosh) (BUILD_COMPLEX (minus_infty, minus_zero));
+ result = FUNC(cacosh) (BUILD_COMPLEX(minus_infty, minus_zero));
check_isinfp ("real(cacosh(-Inf - i0)) = +Inf", __real__ result);
check ("imag(cacosh(-Inf - i0)) = -pi", __imag__ result, -M_PIl);
- result = FUNC(cacosh) (BUILD_COMPLEX (minus_infty, 100));
+ result = FUNC(cacosh) (BUILD_COMPLEX(minus_infty, 100));
check_isinfp ("real(cacosh(-Inf + i100)) = +Inf", __real__ result);
check ("imag(cacosh(-Inf + i100)) = pi", __imag__ result, M_PIl);
- result = FUNC(cacosh) (BUILD_COMPLEX (minus_infty, -100));
+ result = FUNC(cacosh) (BUILD_COMPLEX(minus_infty, -100));
check_isinfp ("real(cacosh(-Inf - i100)) = +Inf", __real__ result);
check ("imag(cacosh(-Inf - i100)) = -pi", __imag__ result, -M_PIl);
- result = FUNC(cacosh) (BUILD_COMPLEX (plus_infty, 0));
+ result = FUNC(cacosh) (BUILD_COMPLEX(plus_infty, 0));
check_isinfp ("real(cacosh(+Inf + i0)) = +Inf", __real__ result);
check ("imag(cacosh(+Inf + i0)) = 0", __imag__ result, 0);
- result = FUNC(cacosh) (BUILD_COMPLEX (plus_infty, minus_zero));
+ result = FUNC(cacosh) (BUILD_COMPLEX(plus_infty, minus_zero));
check_isinfp ("real(cacosh(+Inf - i0)) = +Inf", __real__ result);
check ("imag(cacosh(+Inf - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(cacosh) (BUILD_COMPLEX (plus_infty, 0.5));
+ result = FUNC(cacosh) (BUILD_COMPLEX(plus_infty, 0.5));
check_isinfp ("real(cacosh(+Inf + i0.5)) = +Inf", __real__ result);
check ("imag(cacosh(+Inf + i0.5)) = 0", __imag__ result, 0);
- result = FUNC(cacosh) (BUILD_COMPLEX (plus_infty, -0.5));
+ result = FUNC(cacosh) (BUILD_COMPLEX(plus_infty, -0.5));
check_isinfp ("real(cacosh(+Inf - i0.5)) = +Inf", __real__ result);
check ("imag(cacosh(+Inf - i0.5)) = -0", __imag__ result, minus_zero);
- result = FUNC(cacosh) (BUILD_COMPLEX (plus_infty, nan_value));
+ result = FUNC(cacosh) (BUILD_COMPLEX(plus_infty, nan_value));
check_isinfp ("real(cacosh(+Inf + i NaN)) = +Inf", __real__ result);
check_isnan ("imag(cacosh(+Inf + i NaN)) = NaN", __imag__ result);
- result = FUNC(cacosh) (BUILD_COMPLEX (minus_infty, nan_value));
+ result = FUNC(cacosh) (BUILD_COMPLEX(minus_infty, nan_value));
check_isinfp ("real(cacosh(-Inf + i NaN)) = +Inf", __real__ result);
check_isnan ("imag(cacosh(-Inf + i NaN)) = NaN", __imag__ result);
- result = FUNC(cacosh) (BUILD_COMPLEX (0, nan_value));
+ result = FUNC(cacosh) (BUILD_COMPLEX(0, nan_value));
check_isnan ("real(cacosh(0 + i NaN)) = NaN", __real__ result);
check_isnan ("imag(cacosh(0 + i NaN)) = NaN", __imag__ result);
- result = FUNC(cacosh) (BUILD_COMPLEX (minus_zero, nan_value));
+ result = FUNC(cacosh) (BUILD_COMPLEX(minus_zero, nan_value));
check_isnan ("real(cacosh(-0 + i NaN)) = NaN", __real__ result);
check_isnan ("imag(cacosh(-0 + i NaN)) = NaN", __imag__ result);
- result = FUNC(cacosh) (BUILD_COMPLEX (nan_value, plus_infty));
+ result = FUNC(cacosh) (BUILD_COMPLEX(nan_value, plus_infty));
check_isinfp ("real(cacosh(NaN + i Inf)) = +Inf", __real__ result);
check_isnan ("imag(cacosh(NaN + i Inf)) = NaN", __imag__ result);
- result = FUNC(cacosh) (BUILD_COMPLEX (nan_value, minus_infty));
+ result = FUNC(cacosh) (BUILD_COMPLEX(nan_value, minus_infty));
check_isinfp ("real(cacosh(NaN - i Inf)) = +Inf", __real__ result);
check_isnan ("imag(cacosh(NaN - i Inf)) = NaN", __imag__ result);
- result = FUNC(cacosh) (BUILD_COMPLEX (10.5, nan_value));
+ result = FUNC(cacosh) (BUILD_COMPLEX(10.5, nan_value));
check_isnan_maybe_exc ("real(cacosh(10.5 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cacosh(10.5 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(cacosh) (BUILD_COMPLEX (-10.5, nan_value));
+ result = FUNC(cacosh) (BUILD_COMPLEX(-10.5, nan_value));
check_isnan_maybe_exc ("real(cacosh(-10.5 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cacosh(-10.5 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(cacosh) (BUILD_COMPLEX (nan_value, 0.75));
+ result = FUNC(cacosh) (BUILD_COMPLEX(nan_value, 0.75));
check_isnan_maybe_exc ("real(cacosh(NaN + i0.75)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cacosh(NaN + i0.75)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(cacosh) (BUILD_COMPLEX (-10.5, nan_value));
+ result = FUNC(cacosh) (BUILD_COMPLEX(-10.5, nan_value));
check_isnan_maybe_exc ("real(cacosh(NaN - i0.75)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(cacosh(NaN - i0.75)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(cacosh) (BUILD_COMPLEX (nan_value, nan_value));
+ result = FUNC(cacosh) (BUILD_COMPLEX(nan_value, nan_value));
check_isnan ("real(cacosh(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(cacosh(NaN + i NaN)) = NaN", __imag__ result);
- result = FUNC(cacosh) (BUILD_COMPLEX (0.7, 1.2));
+ result = FUNC(cacosh) (BUILD_COMPLEX(0.7, 1.2));
check_eps ("real(cacosh(0.7 + i 1.2)) == 1.09276...", __real__ result,
1.0927647857577371459L, CHOOSE(4e-17L, 3e-16, 2e-7));
check_eps ("imag(cacosh(0.7 + i 1.2)) == 1.13518...", __imag__ result,
- 1.1351827477151551089L, CHOOSE(2e-17L, 0, 1.2e-7));
+ 1.1351827477151551089L, CHOOSE(2e-17L, 0, 1.2e-7));
- result = FUNC(cacosh) (BUILD_COMPLEX (-2, -3));
+ result = FUNC(cacosh) (BUILD_COMPLEX(-2, -3));
check_eps ("real(cacosh(-2 - i 3)) == -1.98338...", __real__ result,
- -1.9833870299165354323L, CHOOSE (2e-18L, 3e-16, 9e-7));
+ -1.9833870299165354323L, CHOOSE(2e-18L, 3e-16, 9e-7));
check_eps ("imag(cacosh(-2 - i 3)) == 2.14144...", __imag__ result,
- 2.1414491111159960199L, CHOOSE (4.5e-19, 5e-16, 1e-6));
+ 2.1414491111159960199L, CHOOSE(4.5e-19, 5e-16, 1e-6));
}
@@ -3761,139 +3697,139 @@ casin_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC(casin) (BUILD_COMPLEX (0, 0));
+ result = FUNC(casin) (BUILD_COMPLEX(0, 0));
check ("real(casin(0 + i0)) = 0", __real__ result, 0);
check ("imag(casin(0 + i0)) = 0", __imag__ result, 0);
- result = FUNC(casin) (BUILD_COMPLEX (minus_zero, 0));
+ result = FUNC(casin) (BUILD_COMPLEX(minus_zero, 0));
check ("real(casin(-0 + i0)) = -0", __real__ result, minus_zero);
check ("imag(casin(-0 + i0)) = 0", __imag__ result, 0);
- result = FUNC(casin) (BUILD_COMPLEX (0, minus_zero));
+ result = FUNC(casin) (BUILD_COMPLEX(0, minus_zero));
check ("real(casin(0 - i0)) = 0", __real__ result, 0);
check ("imag(casin(0 - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(casin) (BUILD_COMPLEX (minus_zero, minus_zero));
+ result = FUNC(casin) (BUILD_COMPLEX(minus_zero, minus_zero));
check ("real(casin(-0 - i0)) = -0", __real__ result, minus_zero);
check ("imag(casin(-0 - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(casin) (BUILD_COMPLEX (plus_infty, plus_infty));
+ result = FUNC(casin) (BUILD_COMPLEX(plus_infty, plus_infty));
check ("real(casin(+Inf + i Inf)) = pi/4", __real__ result, M_PI_4l);
check_isinfp ("imag(casin(+Inf + i Inf)) = +Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (plus_infty, minus_infty));
+ result = FUNC(casin) (BUILD_COMPLEX(plus_infty, minus_infty));
check ("real(casin(+Inf - i Inf)) = pi/4", __real__ result, M_PI_4l);
check_isinfn ("imag(casin(+Inf - i Inf)) = -Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (minus_infty, plus_infty));
+ result = FUNC(casin) (BUILD_COMPLEX(minus_infty, plus_infty));
check ("real(casin(-Inf + i Inf)) = -pi/4", __real__ result, -M_PI_4l);
check_isinfp ("imag(casin(-Inf + i Inf)) = +Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (minus_infty, minus_infty));
+ result = FUNC(casin) (BUILD_COMPLEX(minus_infty, minus_infty));
check ("real(casin(-Inf - i Inf)) = -pi/4", __real__ result, -M_PI_4l);
check_isinfn ("imag(casin(-Inf - i Inf)) = -Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (-10.0, plus_infty));
+ result = FUNC(casin) (BUILD_COMPLEX(-10.0, plus_infty));
check ("real(casin(-10.0 + i Inf)) = -0", __real__ result, minus_zero);
check_isinfp ("imag(casin(-10.0 + i Inf)) = +Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (-10.0, minus_infty));
+ result = FUNC(casin) (BUILD_COMPLEX(-10.0, minus_infty));
check ("real(casin(-10.0 - i Inf)) = -0", __real__ result, minus_zero);
check_isinfn ("imag(casin(-10.0 - i Inf)) = -Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (0, plus_infty));
+ result = FUNC(casin) (BUILD_COMPLEX(0, plus_infty));
check ("real(casin(0 + i Inf)) = 0", __real__ result, 0.0);
check_isinfp ("imag(casin(0 + i Inf)) = +Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (0, minus_infty));
+ result = FUNC(casin) (BUILD_COMPLEX(0, minus_infty));
check ("real(casin(0 - i Inf)) = 0", __real__ result, 0.0);
check_isinfn ("imag(casin(0 - i Inf)) = -Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (minus_zero, plus_infty));
+ result = FUNC(casin) (BUILD_COMPLEX(minus_zero, plus_infty));
check ("real(casin(-0 + i Inf)) = -0", __real__ result, minus_zero);
check_isinfp ("imag(casin(-0 + i Inf)) = +Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (minus_zero, minus_infty));
+ result = FUNC(casin) (BUILD_COMPLEX(minus_zero, minus_infty));
check ("real(casin(-0 - i Inf)) = -0", __real__ result, minus_zero);
check_isinfn ("imag(casin(-0 - i Inf)) = -Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (0.1, plus_infty));
+ result = FUNC(casin) (BUILD_COMPLEX(0.1, plus_infty));
check ("real(casin(0.1 + i Inf)) = 0", __real__ result, 0);
check_isinfp ("imag(casin(0.1 + i Inf)) = +Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (0.1, minus_infty));
+ result = FUNC(casin) (BUILD_COMPLEX(0.1, minus_infty));
check ("real(casin(0.1 - i Inf)) = 0", __real__ result, 0);
check_isinfn ("imag(casin(0.1 - i Inf)) = -Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (minus_infty, 0));
+ result = FUNC(casin) (BUILD_COMPLEX(minus_infty, 0));
check ("real(casin(-Inf + i0)) = -pi/2", __real__ result, -M_PI_2l);
check_isinfp ("imag(casin(-Inf + i0)) = +Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (minus_infty, minus_zero));
+ result = FUNC(casin) (BUILD_COMPLEX(minus_infty, minus_zero));
check ("real(casin(-Inf - i0)) = -pi/2", __real__ result, -M_PI_2l);
check_isinfn ("imag(casin(-Inf - i0)) = -Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (minus_infty, 100));
+ result = FUNC(casin) (BUILD_COMPLEX(minus_infty, 100));
check ("real(casin(-Inf + i100)) = -pi/2", __real__ result, -M_PI_2l);
check_isinfp ("imag(casin(-Inf + i100)) = +Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (minus_infty, -100));
+ result = FUNC(casin) (BUILD_COMPLEX(minus_infty, -100));
check ("real(casin(-Inf - i100)) = -pi/2", __real__ result, -M_PI_2l);
check_isinfn ("imag(casin(-Inf - i100)) = -Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (plus_infty, 0));
+ result = FUNC(casin) (BUILD_COMPLEX(plus_infty, 0));
check ("real(casin(+Inf + i0)) = pi/2", __real__ result, M_PI_2l);
check_isinfp ("imag(casin(+Inf + i0)) = +Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (plus_infty, minus_zero));
+ result = FUNC(casin) (BUILD_COMPLEX(plus_infty, minus_zero));
check ("real(casin(+Inf - i0)) = pi/2", __real__ result, M_PI_2l);
check_isinfn ("imag(casin(+Inf - i0)) = -Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (plus_infty, 0.5));
+ result = FUNC(casin) (BUILD_COMPLEX(plus_infty, 0.5));
check ("real(casin(+Inf + i0.5)) = pi/2", __real__ result, M_PI_2l);
check_isinfp ("imag(casin(+Inf + i0.5)) = +Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (plus_infty, -0.5));
+ result = FUNC(casin) (BUILD_COMPLEX(plus_infty, -0.5));
check ("real(casin(+Inf - i0.5)) = pi/2", __real__ result, M_PI_2l);
check_isinfn ("imag(casin(+Inf - i0.5)) = -Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (nan_value, plus_infty));
+ result = FUNC(casin) (BUILD_COMPLEX(nan_value, plus_infty));
check_isnan ("real(casin(NaN + i Inf)) = NaN", __real__ result);
check_isinfp ("imag(casin(NaN + i Inf)) = +Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (nan_value, minus_infty));
+ result = FUNC(casin) (BUILD_COMPLEX(nan_value, minus_infty));
check_isnan ("real(casin(NaN - i Inf)) = NaN", __real__ result);
check_isinfn ("imag(casin(NaN - i Inf)) = -Inf", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (0.0, nan_value));
+ result = FUNC(casin) (BUILD_COMPLEX(0.0, nan_value));
check ("real(casin(0 + i NaN)) = 0", __real__ result, 0.0);
check_isnan ("imag(casin(0 + i NaN)) = NaN", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (minus_zero, nan_value));
+ result = FUNC(casin) (BUILD_COMPLEX(minus_zero, nan_value));
check ("real(casin(-0 + i NaN)) = -0", __real__ result, minus_zero);
check_isnan ("imag(casin(-0 + i NaN)) = NaN", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (plus_infty, nan_value));
+ result = FUNC(casin) (BUILD_COMPLEX(plus_infty, nan_value));
check_isnan ("real(casin(+Inf + i NaN)) = NaN", __real__ result);
check_isinfp ("imag(casin(+Inf + i NaN)) = +-Inf",
FUNC(fabs) (__imag__ result));
- result = FUNC(casin) (BUILD_COMPLEX (minus_infty, nan_value));
+ result = FUNC(casin) (BUILD_COMPLEX(minus_infty, nan_value));
check_isnan ("real(casin(-Inf + i NaN)) = NaN", __real__ result);
check_isinfp ("imag(casin(-Inf + NaN)) = +-Inf",
FUNC(fabs) (__imag__ result));
- result = FUNC(casin) (BUILD_COMPLEX (nan_value, 10.5));
+ result = FUNC(casin) (BUILD_COMPLEX(nan_value, 10.5));
check_isnan_maybe_exc ("real(casin(NaN + i10.5)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(casin(NaN + i10.5)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (nan_value, -10.5));
+ result = FUNC(casin) (BUILD_COMPLEX(nan_value, -10.5));
check_isnan_maybe_exc ("real(casin(NaN - i10.5)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(casin(NaN - i10.5)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (0.75, nan_value));
+ result = FUNC(casin) (BUILD_COMPLEX(0.75, nan_value));
check_isnan_maybe_exc ("real(casin(0.75 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(casin(0.75 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (-0.75, nan_value));
+ result = FUNC(casin) (BUILD_COMPLEX(-0.75, nan_value));
check_isnan_maybe_exc ("real(casin(-0.75 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(casin(-0.75 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (nan_value, nan_value));
+ result = FUNC(casin) (BUILD_COMPLEX(nan_value, nan_value));
check_isnan ("real(casin(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(casin(NaN + i NaN)) = NaN", __imag__ result);
- result = FUNC(casin) (BUILD_COMPLEX (0.7, 1.2));
+ result = FUNC(casin) (BUILD_COMPLEX(0.7, 1.2));
check_eps ("real(casin(0.7 + i 1.2)) == 0.43561...", __real__ result,
0.4356135790797415103L, CHOOSE(2e-17L, 2e-16, 2e-7));
check_eps ("imag(casin(0.7 + i 1.2)) == 1.09276...", __imag__ result,
1.0927647857577371459L, CHOOSE(4e-17L, 3e-16, 3e-7));
- result = FUNC(casin) (BUILD_COMPLEX (-2, -3));
+ result = FUNC(casin) (BUILD_COMPLEX(-2, -3));
check_eps ("real(casin(-2 - i 3)) == -0.57065...", __real__ result,
-0.5706527843210994007L, CHOOSE(4e-19L, 0, 0));
check_eps ("imag(casin(-2 - i 3)) == -1.98338...", __imag__ result,
@@ -3906,139 +3842,139 @@ casinh_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC(casinh) (BUILD_COMPLEX (0, 0));
+ result = FUNC(casinh) (BUILD_COMPLEX(0, 0));
check ("real(casinh(0 + i0)) = 0", __real__ result, 0);
check ("imag(casinh(0 + i0)) = 0", __imag__ result, 0);
- result = FUNC(casinh) (BUILD_COMPLEX (minus_zero, 0));
+ result = FUNC(casinh) (BUILD_COMPLEX(minus_zero, 0));
check ("real(casinh(-0 + i0)) = -0", __real__ result, minus_zero);
check ("imag(casinh(-0 + i0)) = 0", __imag__ result, 0);
- result = FUNC(casinh) (BUILD_COMPLEX (0, minus_zero));
+ result = FUNC(casinh) (BUILD_COMPLEX(0, minus_zero));
check ("real(casinh(0 - i0)) = 0", __real__ result, 0);
check ("imag(casinh(0 - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(casinh) (BUILD_COMPLEX (minus_zero, minus_zero));
+ result = FUNC(casinh) (BUILD_COMPLEX(minus_zero, minus_zero));
check ("real(casinh(-0 - i0)) = -0", __real__ result, minus_zero);
check ("imag(casinh(-0 - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(casinh) (BUILD_COMPLEX (plus_infty, plus_infty));
+ result = FUNC(casinh) (BUILD_COMPLEX(plus_infty, plus_infty));
check_isinfp ("real(casinh(+Inf + i Inf)) = +Inf", __real__ result);
check ("imag(casinh(+Inf + i Inf)) = pi/4", __imag__ result, M_PI_4l);
- result = FUNC(casinh) (BUILD_COMPLEX (plus_infty, minus_infty));
+ result = FUNC(casinh) (BUILD_COMPLEX(plus_infty, minus_infty));
check_isinfp ("real(casinh(+Inf - i Inf)) = +Inf", __real__ result);
check ("imag(casinh(+Inf - i Inf)) = -pi/4", __imag__ result, -M_PI_4l);
- result = FUNC(casinh) (BUILD_COMPLEX (minus_infty, plus_infty));
+ result = FUNC(casinh) (BUILD_COMPLEX(minus_infty, plus_infty));
check_isinfn ("real(casinh(-Inf + i Inf)) = -Inf", __real__ result);
check ("imag(casinh(-Inf + i Inf)) = pi/4", __imag__ result, M_PI_4l);
- result = FUNC(casinh) (BUILD_COMPLEX (minus_infty, minus_infty));
+ result = FUNC(casinh) (BUILD_COMPLEX(minus_infty, minus_infty));
check_isinfn ("real(casinh(-Inf - i Inf)) = -Inf", __real__ result);
check ("imag(casinh(-Inf - i Inf)) = -pi/4", __imag__ result, -M_PI_4l);
- result = FUNC(casinh) (BUILD_COMPLEX (-10.0, plus_infty));
+ result = FUNC(casinh) (BUILD_COMPLEX(-10.0, plus_infty));
check_isinfn ("real(casinh(-10.0 + i Inf)) = -Inf", __real__ result);
check ("imag(casinh(-10.0 + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(casinh) (BUILD_COMPLEX (-10.0, minus_infty));
+ result = FUNC(casinh) (BUILD_COMPLEX(-10.0, minus_infty));
check_isinfn ("real(casinh(-10.0 - i Inf)) = -Inf", __real__ result);
check ("imag(casinh(-10.0 - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(casinh) (BUILD_COMPLEX (0, plus_infty));
+ result = FUNC(casinh) (BUILD_COMPLEX(0, plus_infty));
check_isinfp ("real(casinh(0 + i Inf)) = +Inf", __real__ result);
check ("imag(casinh(0 + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(casinh) (BUILD_COMPLEX (0, minus_infty));
+ result = FUNC(casinh) (BUILD_COMPLEX(0, minus_infty));
check_isinfp ("real(casinh(0 - i Inf)) = +Inf", __real__ result);
check ("imag(casinh(0 - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(casinh) (BUILD_COMPLEX (minus_zero, plus_infty));
+ result = FUNC(casinh) (BUILD_COMPLEX(minus_zero, plus_infty));
check_isinfn ("real(casinh(-0 + i Inf)) = -Inf", __real__ result);
check ("imag(casinh(-0 + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(casinh) (BUILD_COMPLEX (minus_zero, minus_infty));
+ result = FUNC(casinh) (BUILD_COMPLEX(minus_zero, minus_infty));
check_isinfn ("real(casinh(-0 - i Inf)) = -Inf", __real__ result);
check ("imag(casinh(-0 - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(casinh) (BUILD_COMPLEX (0.1, plus_infty));
+ result = FUNC(casinh) (BUILD_COMPLEX(0.1, plus_infty));
check_isinfp ("real(casinh(0.1 + i Inf)) = +Inf", __real__ result);
check ("imag(casinh(0.1 + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(casinh) (BUILD_COMPLEX (0.1, minus_infty));
+ result = FUNC(casinh) (BUILD_COMPLEX(0.1, minus_infty));
check_isinfp ("real(casinh(0.1 - i Inf)) = +Inf", __real__ result);
check ("imag(casinh(0.1 - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(casinh) (BUILD_COMPLEX (minus_infty, 0));
+ result = FUNC(casinh) (BUILD_COMPLEX(minus_infty, 0));
check_isinfn ("real(casinh(-Inf + i0)) = -Inf", __real__ result);
check ("imag(casinh(-Inf + i0)) = 0", __imag__ result, 0);
- result = FUNC(casinh) (BUILD_COMPLEX (minus_infty, minus_zero));
+ result = FUNC(casinh) (BUILD_COMPLEX(minus_infty, minus_zero));
check_isinfn ("real(casinh(-Inf - i0)) = -Inf", __real__ result);
check ("imag(casinh(-Inf - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(casinh) (BUILD_COMPLEX (minus_infty, 100));
+ result = FUNC(casinh) (BUILD_COMPLEX(minus_infty, 100));
check_isinfn ("real(casinh(-Inf + i100)) = -Inf", __real__ result);
check ("imag(casinh(-Inf + i100)) = 0", __imag__ result, 0);
- result = FUNC(casinh) (BUILD_COMPLEX (minus_infty, -100));
+ result = FUNC(casinh) (BUILD_COMPLEX(minus_infty, -100));
check_isinfn ("real(casinh(-Inf - i100)) = -Inf", __real__ result);
check ("imag(casinh(-Inf - i100)) = -0", __imag__ result, minus_zero);
- result = FUNC(casinh) (BUILD_COMPLEX (plus_infty, 0));
+ result = FUNC(casinh) (BUILD_COMPLEX(plus_infty, 0));
check_isinfp ("real(casinh(+Inf + i0)) = +Inf", __real__ result);
check ("imag(casinh(+Inf + i0)) = 0", __imag__ result, 0);
- result = FUNC(casinh) (BUILD_COMPLEX (plus_infty, minus_zero));
+ result = FUNC(casinh) (BUILD_COMPLEX(plus_infty, minus_zero));
check_isinfp ("real(casinh(+Inf - i0)) = +Inf", __real__ result);
check ("imag(casinh(+Inf - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(casinh) (BUILD_COMPLEX (plus_infty, 0.5));
+ result = FUNC(casinh) (BUILD_COMPLEX(plus_infty, 0.5));
check_isinfp ("real(casinh(+Inf + i0.5)) = +Inf", __real__ result);
check ("imag(casinh(+Inf + i0.5)) = 0", __imag__ result, 0);
- result = FUNC(casinh) (BUILD_COMPLEX (plus_infty, -0.5));
+ result = FUNC(casinh) (BUILD_COMPLEX(plus_infty, -0.5));
check_isinfp ("real(casinh(+Inf - i0.5)) = +Inf", __real__ result);
check ("imag(casinh(+Inf - i0.5)) = -0", __imag__ result, minus_zero);
- result = FUNC(casinh) (BUILD_COMPLEX (plus_infty, nan_value));
+ result = FUNC(casinh) (BUILD_COMPLEX(plus_infty, nan_value));
check_isinfp ("real(casinh(+Inf + i NaN)) = +Inf", __real__ result);
check_isnan ("imag(casinh(+Inf + i NaN)) = NaN", __imag__ result);
- result = FUNC(casinh) (BUILD_COMPLEX (minus_infty, nan_value));
+ result = FUNC(casinh) (BUILD_COMPLEX(minus_infty, nan_value));
check_isinfn ("real(casinh(-Inf + i NaN)) = -Inf", __real__ result);
check_isnan ("imag(casinh(-Inf + i NaN)) = NaN", __imag__ result);
- result = FUNC(casinh) (BUILD_COMPLEX (nan_value, 0));
+ result = FUNC(casinh) (BUILD_COMPLEX(nan_value, 0));
check_isnan ("real(casinh(NaN + i0)) = NaN", __real__ result);
check ("imag(casinh(NaN + i0)) = 0", __imag__ result, 0);
- result = FUNC(casinh) (BUILD_COMPLEX (nan_value, minus_zero));
+ result = FUNC(casinh) (BUILD_COMPLEX(nan_value, minus_zero));
check_isnan ("real(casinh(NaN - i0)) = NaN", __real__ result);
check ("imag(casinh(NaN - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(casinh) (BUILD_COMPLEX (nan_value, plus_infty));
+ result = FUNC(casinh) (BUILD_COMPLEX(nan_value, plus_infty));
check_isinfp ("real(casinh(NaN + i Inf)) = +-Inf",
FUNC(fabs) (__real__ result));
check_isnan ("imag(casinh(NaN + i Inf)) = NaN", __imag__ result);
- result = FUNC(casinh) (BUILD_COMPLEX (nan_value, minus_infty));
+ result = FUNC(casinh) (BUILD_COMPLEX(nan_value, minus_infty));
check_isinfp ("real(casinh(NaN - i Inf)) = +-Inf",
FUNC(fabs) (__real__ result));
check_isnan ("imag(casinh(NaN - i Inf)) = NaN", __imag__ result);
- result = FUNC(casinh) (BUILD_COMPLEX (10.5, nan_value));
+ result = FUNC(casinh) (BUILD_COMPLEX(10.5, nan_value));
check_isnan_maybe_exc ("real(casinh(10.5 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(casinh(10.5 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(casinh) (BUILD_COMPLEX (-10.5, nan_value));
+ result = FUNC(casinh) (BUILD_COMPLEX(-10.5, nan_value));
check_isnan_maybe_exc ("real(casinh(-10.5 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(casinh(-10.5 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(casinh) (BUILD_COMPLEX (nan_value, 0.75));
+ result = FUNC(casinh) (BUILD_COMPLEX(nan_value, 0.75));
check_isnan_maybe_exc ("real(casinh(NaN + i0.75)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(casinh(NaN + i0.75)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(casinh) (BUILD_COMPLEX (-0.75, nan_value));
+ result = FUNC(casinh) (BUILD_COMPLEX(-0.75, nan_value));
check_isnan_maybe_exc ("real(casinh(NaN - i0.75)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(casinh(NaN - i0.75)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(casinh) (BUILD_COMPLEX (nan_value, nan_value));
+ result = FUNC(casinh) (BUILD_COMPLEX(nan_value, nan_value));
check_isnan ("real(casinh(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(casinh(NaN + i NaN)) = NaN", __imag__ result);
- result = FUNC(casinh) (BUILD_COMPLEX (0.7, 1.2));
+ result = FUNC(casinh) (BUILD_COMPLEX(0.7, 1.2));
check_eps ("real(casinh(0.7 + i 1.2)) == 0.97865...", __real__ result,
0.9786545955936738768L, CHOOSE(5e-17L, 2e-16, 0));
check_eps ("imag(casinh(0.7 + i 1.2)) == 0.91135...", __imag__ result,
0.9113541895315601156L, CHOOSE(7e-19L, 2e-16, 2e-7));
- result = FUNC(casinh) (BUILD_COMPLEX (-2, -3));
+ result = FUNC(casinh) (BUILD_COMPLEX(-2, -3));
check_eps ("real(casinh(-2 - i 3)) == -1.96863...", __real__ result,
-1.9686379257930962917L, CHOOSE(7e-19L, 2e-15, 3e-6));
check_eps ("imag(casinh(-2 - i 3)) == -0.96465...", __imag__ result,
@@ -4051,144 +3987,144 @@ catan_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC(catan) (BUILD_COMPLEX (0, 0));
+ result = FUNC(catan) (BUILD_COMPLEX(0, 0));
check ("real(catan(0 + i0)) = 0", __real__ result, 0);
check ("imag(catan(0 + i0)) = 0", __imag__ result, 0);
- result = FUNC(catan) (BUILD_COMPLEX (minus_zero, 0));
+ result = FUNC(catan) (BUILD_COMPLEX(minus_zero, 0));
check ("real(catan(-0 + i0)) = -0", __real__ result, minus_zero);
check ("imag(catan(-0 + i0)) = 0", __imag__ result, 0);
- result = FUNC(catan) (BUILD_COMPLEX (0, minus_zero));
+ result = FUNC(catan) (BUILD_COMPLEX(0, minus_zero));
check ("real(catan(0 - i0)) = 0", __real__ result, 0);
check ("imag(catan(0 - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(catan) (BUILD_COMPLEX (minus_zero, minus_zero));
+ result = FUNC(catan) (BUILD_COMPLEX(minus_zero, minus_zero));
check ("real(catan(-0 - i0)) = -0", __real__ result, minus_zero);
check ("imag(catan(-0 - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(catan) (BUILD_COMPLEX (plus_infty, plus_infty));
+ result = FUNC(catan) (BUILD_COMPLEX(plus_infty, plus_infty));
check ("real(catan(+Inf + i Inf)) = pi/2", __real__ result, M_PI_2l);
check ("imag(catan(+Inf + i Inf)) = 0", __imag__ result, 0);
- result = FUNC(catan) (BUILD_COMPLEX (plus_infty, minus_infty));
+ result = FUNC(catan) (BUILD_COMPLEX(plus_infty, minus_infty));
check ("real(catan(+Inf - i Inf)) = pi/2", __real__ result, M_PI_2l);
check ("imag(catan(+Inf - i Inf)) = -0", __imag__ result, minus_zero);
- result = FUNC(catan) (BUILD_COMPLEX (minus_infty, plus_infty));
+ result = FUNC(catan) (BUILD_COMPLEX(minus_infty, plus_infty));
check ("real(catan(-Inf + i Inf)) = -pi/2", __real__ result, -M_PI_2l);
check ("imag(catan(-Inf + i Inf)) = 0", __imag__ result, 0.0);
- result = FUNC(catan) (BUILD_COMPLEX (minus_infty, minus_infty));
+ result = FUNC(catan) (BUILD_COMPLEX(minus_infty, minus_infty));
check ("real(catan(-Inf - i Inf)) = -pi/2", __real__ result, -M_PI_2l);
check ("imag(catan(-Inf - i Inf)) = -0", __imag__ result, minus_zero);
- result = FUNC(catan) (BUILD_COMPLEX (plus_infty, -10.0));
+ result = FUNC(catan) (BUILD_COMPLEX(plus_infty, -10.0));
check ("real(catan(+Inf - i10.0)) = pi/2", __real__ result, M_PI_2l);
check ("imag(catan(+Inf - i10.0)) = -0", __imag__ result, minus_zero);
- result = FUNC(catan) (BUILD_COMPLEX (minus_infty, -10.0));
+ result = FUNC(catan) (BUILD_COMPLEX(minus_infty, -10.0));
check ("real(catan(-Inf - i10.0)) = -pi/2", __real__ result, -M_PI_2l);
check ("imag(catan(-Inf - i10.0)) = -0", __imag__ result, minus_zero);
- result = FUNC(catan) (BUILD_COMPLEX (plus_infty, minus_zero));
+ result = FUNC(catan) (BUILD_COMPLEX(plus_infty, minus_zero));
check ("real(catan(Inf - i0)) = pi/2", __real__ result, M_PI_2l);
check ("imag(catan(Inf - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(catan) (BUILD_COMPLEX (minus_infty, minus_zero));
+ result = FUNC(catan) (BUILD_COMPLEX(minus_infty, minus_zero));
check ("real(catan(-Inf - i0)) = -pi/2", __real__ result, -M_PI_2l);
check ("imag(catan(-Inf - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(catan) (BUILD_COMPLEX (plus_infty, 0.0));
+ result = FUNC(catan) (BUILD_COMPLEX(plus_infty, 0.0));
check ("real(catan(Inf + i0)) = pi/2", __real__ result, M_PI_2l);
check ("imag(catan(Inf + i0)) = 0", __imag__ result, 0.0);
- result = FUNC(catan) (BUILD_COMPLEX (minus_infty, 0.0));
+ result = FUNC(catan) (BUILD_COMPLEX(minus_infty, 0.0));
check ("real(catan(-Inf + i0)) = -pi/2", __real__ result, -M_PI_2l);
check ("imag(catan(-Inf + i0)) = 0", __imag__ result, 0.0);
- result = FUNC(catan) (BUILD_COMPLEX (plus_infty, 0.1));
+ result = FUNC(catan) (BUILD_COMPLEX(plus_infty, 0.1));
check ("real(catan(+Inf + i0.1)) = pi/2", __real__ result, M_PI_2l);
check ("imag(catan(+Inf + i0.1)) = 0", __imag__ result, 0);
- result = FUNC(catan) (BUILD_COMPLEX (minus_infty, 0.1));
+ result = FUNC(catan) (BUILD_COMPLEX(minus_infty, 0.1));
check ("real(catan(-Inf + i0.1)) = -pi/2", __real__ result, -M_PI_2l);
check ("imag(catan(-Inf + i0.1)) = 0", __imag__ result, 0);
- result = FUNC(catan) (BUILD_COMPLEX (0.0, minus_infty));
+ result = FUNC(catan) (BUILD_COMPLEX(0.0, minus_infty));
check ("real(catan(0 - i Inf)) = pi/2", __real__ result, M_PI_2l);
check ("imag(catan(0 - i Inf)) = -0", __imag__ result, minus_zero);
- result = FUNC(catan) (BUILD_COMPLEX (minus_zero, minus_infty));
+ result = FUNC(catan) (BUILD_COMPLEX(minus_zero, minus_infty));
check ("real(catan(-0 - i Inf)) = -pi/2", __real__ result, -M_PI_2l);
check ("imag(catan(-0 - i Inf)) = -0", __imag__ result, minus_zero);
- result = FUNC(catan) (BUILD_COMPLEX (100.0, minus_infty));
+ result = FUNC(catan) (BUILD_COMPLEX(100.0, minus_infty));
check ("real(catan(100 - i Inf)) = pi/2", __real__ result, M_PI_2l);
check ("imag(catan(100 - i Inf)) = -0", __imag__ result, minus_zero);
- result = FUNC(catan) (BUILD_COMPLEX (-100.0, minus_infty));
+ result = FUNC(catan) (BUILD_COMPLEX(-100.0, minus_infty));
check ("real(catan(-100 - i Inf)) = -pi/2", __real__ result, -M_PI_2l);
check ("imag(catan(-100 - i Inf)) = -0", __imag__ result, minus_zero);
- result = FUNC(catan) (BUILD_COMPLEX (0.0, plus_infty));
+ result = FUNC(catan) (BUILD_COMPLEX(0.0, plus_infty));
check ("real(catan(0 + i Inf)) = pi/2", __real__ result, M_PI_2l);
check ("imag(catan(0 + i Inf)) = 0", __imag__ result, 0);
- result = FUNC(catan) (BUILD_COMPLEX (minus_zero, plus_infty));
+ result = FUNC(catan) (BUILD_COMPLEX(minus_zero, plus_infty));
check ("real(catan(-0 + i Inf)) = -pi/2", __real__ result, -M_PI_2l);
check ("imag(catan(-0 + i Inf)) = 0", __imag__ result, 0);
- result = FUNC(catan) (BUILD_COMPLEX (0.5, plus_infty));
+ result = FUNC(catan) (BUILD_COMPLEX(0.5, plus_infty));
check ("real(catan(0.5 + i Inf)) = pi/2", __real__ result, M_PI_2l);
check ("imag(catan(0.5 + i Inf)) = 0", __imag__ result, 0);
- result = FUNC(catan) (BUILD_COMPLEX (-0.5, plus_infty));
+ result = FUNC(catan) (BUILD_COMPLEX(-0.5, plus_infty));
check ("real(catan(-0.5 + i Inf)) = -pi/2", __real__ result, -M_PI_2l);
check ("imag(catan(-0.5 + i Inf)) = 0", __imag__ result, 0);
- result = FUNC(catan) (BUILD_COMPLEX (nan_value, 0.0));
+ result = FUNC(catan) (BUILD_COMPLEX(nan_value, 0.0));
check_isnan ("real(catan(NaN + i0)) = NaN", __real__ result);
check ("imag(catan(NaN + i0)) = 0", __imag__ result, 0.0);
- result = FUNC(catan) (BUILD_COMPLEX (nan_value, minus_zero));
+ result = FUNC(catan) (BUILD_COMPLEX(nan_value, minus_zero));
check_isnan ("real(catan(NaN - i0)) = NaN", __real__ result);
check ("imag(catan(NaN - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(catan) (BUILD_COMPLEX (nan_value, plus_infty));
+ result = FUNC(catan) (BUILD_COMPLEX(nan_value, plus_infty));
check_isnan ("real(catan(NaN + i Inf)) = NaN", __real__ result);
check ("imag(catan(NaN + i Inf)) = 0", __imag__ result, 0);
- result = FUNC(catan) (BUILD_COMPLEX (nan_value, minus_infty));
+ result = FUNC(catan) (BUILD_COMPLEX(nan_value, minus_infty));
check_isnan ("real(catan(NaN - i Inf)) = NaN", __real__ result);
check ("imag(catan(NaN - i Inf)) = -0", __imag__ result, minus_zero);
- result = FUNC(catan) (BUILD_COMPLEX (0.0, nan_value));
+ result = FUNC(catan) (BUILD_COMPLEX(0.0, nan_value));
check_isnan ("real(catan(0 + i NaN)) = NaN", __real__ result);
check_isnan ("imag(catan(0 + i NaN)) = NaN", __imag__ result);
- result = FUNC(catan) (BUILD_COMPLEX (minus_zero, nan_value));
+ result = FUNC(catan) (BUILD_COMPLEX(minus_zero, nan_value));
check_isnan ("real(catan(-0 + i NaN)) = NaN", __real__ result);
check_isnan ("imag(catan(-0 + i NaN)) = NaN", __imag__ result);
- result = FUNC(catan) (BUILD_COMPLEX (plus_infty, nan_value));
+ result = FUNC(catan) (BUILD_COMPLEX(plus_infty, nan_value));
check ("real(catan(+Inf + i NaN)) = pi/2", __real__ result, M_PI_2l);
check ("imag(catan(+Inf + i NaN)) = +-0", FUNC(fabs) (__imag__ result), 0);
- result = FUNC(catan) (BUILD_COMPLEX (minus_infty, nan_value));
+ result = FUNC(catan) (BUILD_COMPLEX(minus_infty, nan_value));
check ("real(catan(-Inf + i NaN)) = -pi/2", __real__ result, -M_PI_2l);
check ("imag(catan(-Inf + i NaN)) = +-0", FUNC(fabs) (__imag__ result), 0);
- result = FUNC(catan) (BUILD_COMPLEX (nan_value, 10.5));
+ result = FUNC(catan) (BUILD_COMPLEX(nan_value, 10.5));
check_isnan_maybe_exc ("real(catan(NaN + i10.5)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(catan(NaN + i10.5)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(catan) (BUILD_COMPLEX (nan_value, -10.5));
+ result = FUNC(catan) (BUILD_COMPLEX(nan_value, -10.5));
check_isnan_maybe_exc ("real(catan(NaN - i10.5)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(catan(NaN - i10.5)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(catan) (BUILD_COMPLEX (0.75, nan_value));
+ result = FUNC(catan) (BUILD_COMPLEX(0.75, nan_value));
check_isnan_maybe_exc ("real(catan(0.75 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(catan(0.75 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(catan) (BUILD_COMPLEX (-0.75, nan_value));
+ result = FUNC(catan) (BUILD_COMPLEX(-0.75, nan_value));
check_isnan_maybe_exc ("real(catan(-0.75 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(catan(-0.75 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(catan) (BUILD_COMPLEX (nan_value, nan_value));
+ result = FUNC(catan) (BUILD_COMPLEX(nan_value, nan_value));
check_isnan ("real(catan(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(catan(NaN + i NaN)) = NaN", __imag__ result);
- result = FUNC(catan) (BUILD_COMPLEX (0.7, 1.2));
+ result = FUNC(catan) (BUILD_COMPLEX(0.7, 1.2));
check_eps ("real(catan(0.7 + i 1.2)) == 1.07857...", __real__ result,
- 1.0785743834118921877L, CHOOSE (3e-17, 0, 5e-7));
+ 1.0785743834118921877L, CHOOSE(3e-17, 0, 5e-7));
check_eps ("imag(catan(0.7 + i 1.2)) == 0.57705...", __imag__ result,
0.5770573776534306764L, CHOOSE(3e-17L, 2e-16, 6e-8));
- result = FUNC(catan) (BUILD_COMPLEX (-2, -3));
+ result = FUNC(catan) (BUILD_COMPLEX(-2, -3));
check_eps ("real(catan(-2 - i 3)) == -1.40992...", __real__ result,
-1.4099210495965755225L, CHOOSE(0, 0, 4e-7));
check_eps ("imag(catan(-2 - i 3)) == -0.22907...", __imag__ result,
@@ -4201,148 +4137,148 @@ catanh_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC(catanh) (BUILD_COMPLEX (0, 0));
+ result = FUNC(catanh) (BUILD_COMPLEX(0, 0));
check ("real(catanh(0 + i0)) = 0", __real__ result, 0);
check ("imag(catanh(0 + i0)) = 0", __imag__ result, 0);
- result = FUNC(catanh) (BUILD_COMPLEX (minus_zero, 0));
+ result = FUNC(catanh) (BUILD_COMPLEX(minus_zero, 0));
check ("real(catanh(-0 + i0)) = -0", __real__ result, minus_zero);
check ("imag(catanh(-0 + i0)) = 0", __imag__ result, 0);
- result = FUNC(catanh) (BUILD_COMPLEX (0, minus_zero));
+ result = FUNC(catanh) (BUILD_COMPLEX(0, minus_zero));
check ("real(catanh(0 - i0)) = 0", __real__ result, 0);
check ("imag(catanh(0 - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(catanh) (BUILD_COMPLEX (minus_zero, minus_zero));
+ result = FUNC(catanh) (BUILD_COMPLEX(minus_zero, minus_zero));
check ("real(catanh(-0 - i0)) = -0", __real__ result, minus_zero);
check ("imag(catanh(-0 - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(catanh) (BUILD_COMPLEX (plus_infty, plus_infty));
+ result = FUNC(catanh) (BUILD_COMPLEX(plus_infty, plus_infty));
check ("real(catanh(+Inf + i Inf)) = 0", __real__ result, 0);
check ("imag(catanh(+Inf + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (plus_infty, minus_infty));
+ result = FUNC(catanh) (BUILD_COMPLEX(plus_infty, minus_infty));
check ("real(catanh(+Inf - i Inf)) = 0", __real__ result, 0);
check ("imag(catanh(+Inf - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (minus_infty, plus_infty));
+ result = FUNC(catanh) (BUILD_COMPLEX(minus_infty, plus_infty));
check ("real(catanh(-Inf + i Inf)) = -0", __real__ result, minus_zero);
check ("imag(catanh(-Inf + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (minus_infty, minus_infty));
+ result = FUNC(catanh) (BUILD_COMPLEX(minus_infty, minus_infty));
check ("real(catanh(-Inf - i Inf)) = -0", __real__ result, minus_zero);
check ("imag(catanh(-Inf - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (-10.0, plus_infty));
+ result = FUNC(catanh) (BUILD_COMPLEX(-10.0, plus_infty));
check ("real(catanh(-10.0 + i Inf)) = -0", __real__ result, minus_zero);
check ("imag(catanh(-10.0 + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (-10.0, minus_infty));
+ result = FUNC(catanh) (BUILD_COMPLEX(-10.0, minus_infty));
check ("real(catanh(-10.0 - i Inf)) = -0", __real__ result, minus_zero);
check ("imag(catanh(-10.0 - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (minus_zero, plus_infty));
+ result = FUNC(catanh) (BUILD_COMPLEX(minus_zero, plus_infty));
check ("real(catanh(-0 + i Inf)) = -0", __real__ result, minus_zero);
check ("imag(catanh(-0 + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (minus_zero, minus_infty));
+ result = FUNC(catanh) (BUILD_COMPLEX(minus_zero, minus_infty));
check ("real(catanh(-0 - i Inf)) = -0", __real__ result, minus_zero);
check ("imag(catanh(-0 - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (0, plus_infty));
+ result = FUNC(catanh) (BUILD_COMPLEX(0, plus_infty));
check ("real(catanh(0 + i Inf)) = 0", __real__ result, 0);
check ("imag(catanh(0 + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (0, minus_infty));
+ result = FUNC(catanh) (BUILD_COMPLEX(0, minus_infty));
check ("real(catanh(0 - i Inf)) = 0", __real__ result, 0);
check ("imag(catanh(0 - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (0.1, plus_infty));
+ result = FUNC(catanh) (BUILD_COMPLEX(0.1, plus_infty));
check ("real(catanh(0.1 + i Inf)) = 0", __real__ result, 0);
check ("imag(catanh(0.1 + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (0.1, minus_infty));
+ result = FUNC(catanh) (BUILD_COMPLEX(0.1, minus_infty));
check ("real(catanh(0.1 - i Inf)) = 0", __real__ result, 0);
check ("imag(catanh(0.1 - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (minus_infty, 0));
+ result = FUNC(catanh) (BUILD_COMPLEX(minus_infty, 0));
check ("real(catanh(-Inf + i0)) = -0", __real__ result, minus_zero);
check ("imag(catanh(-Inf + i0)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (minus_infty, minus_zero));
+ result = FUNC(catanh) (BUILD_COMPLEX(minus_infty, minus_zero));
check ("real(catanh(-Inf - i0)) = -0", __real__ result, minus_zero);
check ("imag(catanh(-Inf - i0)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (minus_infty, 100));
+ result = FUNC(catanh) (BUILD_COMPLEX(minus_infty, 100));
check ("real(catanh(-Inf + i100)) = -0", __real__ result, minus_zero);
check ("imag(catanh(-Inf + i100)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (minus_infty, -100));
+ result = FUNC(catanh) (BUILD_COMPLEX(minus_infty, -100));
check ("real(catanh(-Inf - i100)) = -0", __real__ result, minus_zero);
check ("imag(catanh(-Inf - i100)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (plus_infty, 0));
+ result = FUNC(catanh) (BUILD_COMPLEX(plus_infty, 0));
check ("real(catanh(+Inf + i0)) = 0", __real__ result, 0);
check ("imag(catanh(+Inf + i0)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (plus_infty, minus_zero));
+ result = FUNC(catanh) (BUILD_COMPLEX(plus_infty, minus_zero));
check ("real(catanh(+Inf - i0)) = 0", __real__ result, 0);
check ("imag(catanh(+Inf - i0)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (plus_infty, 0.5));
+ result = FUNC(catanh) (BUILD_COMPLEX(plus_infty, 0.5));
check ("real(catanh(+Inf + i0.5)) = 0", __real__ result, 0);
check ("imag(catanh(+Inf + i0.5)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (plus_infty, -0.5));
+ result = FUNC(catanh) (BUILD_COMPLEX(plus_infty, -0.5));
check ("real(catanh(+Inf - i0.5)) = 0", __real__ result, 0);
check ("imag(catanh(+Inf - i0.5)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (0, nan_value));
+ result = FUNC(catanh) (BUILD_COMPLEX(0, nan_value));
check ("real(catanh(0 + i NaN)) = 0", __real__ result, 0);
check_isnan ("imag(catanh(0 + i NaN)) = NaN", __imag__ result);
- result = FUNC(catanh) (BUILD_COMPLEX (minus_zero, nan_value));
+ result = FUNC(catanh) (BUILD_COMPLEX(minus_zero, nan_value));
check ("real(catanh(-0 + i NaN)) = -0", __real__ result, minus_zero);
check_isnan ("imag(catanh(-0 + i NaN)) = NaN", __imag__ result);
- result = FUNC(catanh) (BUILD_COMPLEX (plus_infty, nan_value));
+ result = FUNC(catanh) (BUILD_COMPLEX(plus_infty, nan_value));
check ("real(catanh(+Inf + i NaN)) = 0", __real__ result, 0);
check_isnan ("imag(catanh(+Inf + i NaN)) = NaN", __imag__ result);
- result = FUNC(catanh) (BUILD_COMPLEX (minus_infty, nan_value));
+ result = FUNC(catanh) (BUILD_COMPLEX(minus_infty, nan_value));
check ("real(catanh(-Inf + i NaN)) = -0", __real__ result, minus_zero);
check_isnan ("imag(catanh(-Inf + i NaN)) = NaN", __imag__ result);
- result = FUNC(catanh) (BUILD_COMPLEX (nan_value, 0));
+ result = FUNC(catanh) (BUILD_COMPLEX(nan_value, 0));
check_isnan ("real(catanh(NaN + i0)) = NaN", __real__ result);
check_isnan ("imag(catanh(NaN + i0)) = NaN", __imag__ result);
- result = FUNC(catanh) (BUILD_COMPLEX (nan_value, minus_zero));
+ result = FUNC(catanh) (BUILD_COMPLEX(nan_value, minus_zero));
check_isnan ("real(catanh(NaN - i0)) = NaN", __real__ result);
check_isnan ("imag(catanh(NaN - i0)) = NaN", __imag__ result);
- result = FUNC(catanh) (BUILD_COMPLEX (nan_value, plus_infty));
+ result = FUNC(catanh) (BUILD_COMPLEX(nan_value, plus_infty));
check ("real(catanh(NaN + i Inf)) = +-0", FUNC(fabs) (__real__ result), 0);
check ("imag(catanh(NaN + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (nan_value, minus_infty));
+ result = FUNC(catanh) (BUILD_COMPLEX(nan_value, minus_infty));
check ("real(catanh(NaN - i Inf)) = +-0", FUNC(fabs) (__real__ result), 0);
check ("imag(catanh(NaN - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(catanh) (BUILD_COMPLEX (10.5, nan_value));
+ result = FUNC(catanh) (BUILD_COMPLEX(10.5, nan_value));
check_isnan_maybe_exc ("real(catanh(10.5 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(catanh(10.5 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(catanh) (BUILD_COMPLEX (-10.5, nan_value));
+ result = FUNC(catanh) (BUILD_COMPLEX(-10.5, nan_value));
check_isnan_maybe_exc ("real(catanh(-10.5 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(catanh(-10.5 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(catanh) (BUILD_COMPLEX (nan_value, 0.75));
+ result = FUNC(catanh) (BUILD_COMPLEX(nan_value, 0.75));
check_isnan_maybe_exc ("real(catanh(NaN + i0.75)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(catanh(NaN + i0.75)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(catanh) (BUILD_COMPLEX (nan_value, -0.75));
+ result = FUNC(catanh) (BUILD_COMPLEX(nan_value, -0.75));
check_isnan_maybe_exc ("real(catanh(NaN - i0.75)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(catanh(NaN - i0.75)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(catanh) (BUILD_COMPLEX (nan_value, nan_value));
+ result = FUNC(catanh) (BUILD_COMPLEX(nan_value, nan_value));
check_isnan ("real(catanh(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(catanh(NaN + i NaN)) = NaN", __imag__ result);
- result = FUNC(catanh) (BUILD_COMPLEX (0.7, 1.2));
+ result = FUNC(catanh) (BUILD_COMPLEX(0.7, 1.2));
check_eps ("real(catanh(0.7 + i 1.2)) == 0.26007...", __real__ result,
- 0.2600749516525135959L, CHOOSE (2e-18, 6e-17, 3e-8));
+ 0.2600749516525135959L, CHOOSE(2e-18, 6e-17, 3e-8));
check_eps ("imag(catanh(0.7 + i 1.2)) == 0.97024...", __imag__ result,
- 0.9702403077950989849L, CHOOSE (3e-17, 2e-16, 4e-7));
+ 0.9702403077950989849L, CHOOSE(3e-17, 2e-16, 4e-7));
- result = FUNC(catanh) (BUILD_COMPLEX (-2, -3));
+ result = FUNC(catanh) (BUILD_COMPLEX(-2, -3));
check_eps ("real(catanh(-2 - i 3)) == -0.14694...", __real__ result,
- -0.1469466662255297520L, CHOOSE (9e-20L, 2e-16, 2e-8));
+ -0.1469466662255297520L, CHOOSE(9e-20L, 2e-16, 2e-8));
check_eps ("imag(catanh(-2 - i 3)) == -1.33897...", __imag__ result,
- -1.3389725222944935611L, CHOOSE (7e-19L, 0, 5e-7));
+ -1.3389725222944935611L, CHOOSE(7e-19L, 0, 5e-7));
}
@@ -4351,144 +4287,144 @@ ctan_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC(ctan) (BUILD_COMPLEX (0, 0));
+ result = FUNC(ctan) (BUILD_COMPLEX(0, 0));
check ("real(ctan(0 + i0)) = 0", __real__ result, 0);
check ("imag(ctan(0 + i0)) = 0", __imag__ result, 0);
- result = FUNC(ctan) (BUILD_COMPLEX (0, minus_zero));
+ result = FUNC(ctan) (BUILD_COMPLEX(0, minus_zero));
check ("real(ctan(0 - i0)) = 0", __real__ result, 0);
check ("imag(ctan(0 - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(ctan) (BUILD_COMPLEX (minus_zero, 0));
+ result = FUNC(ctan) (BUILD_COMPLEX(minus_zero, 0));
check ("real(ctan(-0 + i0)) = -0", __real__ result, minus_zero);
check ("imag(ctan(-0 + i0)) = 0", __imag__ result, 0);
- result = FUNC(ctan) (BUILD_COMPLEX (minus_zero, minus_zero));
+ result = FUNC(ctan) (BUILD_COMPLEX(minus_zero, minus_zero));
check ("real(ctan(-0 - i0)) = -0", __real__ result, minus_zero);
check ("imag(ctan(-0 - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(ctan) (BUILD_COMPLEX (0, plus_infty));
+ result = FUNC(ctan) (BUILD_COMPLEX(0, plus_infty));
check ("real(ctan(0 + i Inf)) = 0", __real__ result, 0);
check ("imag(ctan(0 + i Inf)) = 1", __imag__ result, 1);
- result = FUNC(ctan) (BUILD_COMPLEX (1, plus_infty));
+ result = FUNC(ctan) (BUILD_COMPLEX(1, plus_infty));
check ("real(ctan(1 + i Inf)) = 0", __real__ result, 0);
check ("imag(ctan(1 + i Inf)) = 1", __imag__ result, 1);
- result = FUNC(ctan) (BUILD_COMPLEX (minus_zero, plus_infty));
+ result = FUNC(ctan) (BUILD_COMPLEX(minus_zero, plus_infty));
check ("real(ctan(-0 + i Inf)) = -0", __real__ result, minus_zero);
check ("imag(ctan(-0 + i Inf)) = 1", __imag__ result, 1);
- result = FUNC(ctan) (BUILD_COMPLEX (-1, plus_infty));
+ result = FUNC(ctan) (BUILD_COMPLEX(-1, plus_infty));
check ("real(ctan(-1 + i Inf)) = -0", __real__ result, minus_zero);
check ("imag(ctan(-1 + i Inf)) = 1", __imag__ result, 1);
- result = FUNC(ctan) (BUILD_COMPLEX (0, minus_infty));
+ result = FUNC(ctan) (BUILD_COMPLEX(0, minus_infty));
check ("real(ctan(0 - i Inf)) = 0", __real__ result, 0);
check ("imag(ctan(0 - i Inf)) = -1", __imag__ result, -1);
- result = FUNC(ctan) (BUILD_COMPLEX (1, minus_infty));
+ result = FUNC(ctan) (BUILD_COMPLEX(1, minus_infty));
check ("real(ctan(1 - i Inf)) = 0", __real__ result, 0);
check ("imag(ctan(1 - i Inf)) = -1", __imag__ result, -1);
- result = FUNC(ctan) (BUILD_COMPLEX (minus_zero, minus_infty));
+ result = FUNC(ctan) (BUILD_COMPLEX(minus_zero, minus_infty));
check ("real(ctan(-0 - i Inf)) = -0", __real__ result, minus_zero);
check ("imag(ctan(-0 - i Inf)) = -1", __imag__ result, -1);
- result = FUNC(ctan) (BUILD_COMPLEX (-1, minus_infty));
+ result = FUNC(ctan) (BUILD_COMPLEX(-1, minus_infty));
check ("real(ctan(-1 - i Inf)) = -0", __real__ result, minus_zero);
check ("imag(ctan(-1 - i Inf)) = -1", __imag__ result, -1);
- result = FUNC(ctan) (BUILD_COMPLEX (plus_infty, 0));
+ result = FUNC(ctan) (BUILD_COMPLEX(plus_infty, 0));
check_isnan_exc ("real(ctan(Inf + i 0)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctan(Inf + i 0)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ctan) (BUILD_COMPLEX (plus_infty, 2));
+ result = FUNC(ctan) (BUILD_COMPLEX(plus_infty, 2));
check_isnan_exc ("real(ctan(Inf + i 2)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctan(Inf + i 2)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ctan) (BUILD_COMPLEX (minus_infty, 0));
+ result = FUNC(ctan) (BUILD_COMPLEX(minus_infty, 0));
check_isnan_exc ("real(ctan(-Inf + i 0)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctan(-Inf + i 0)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ctan) (BUILD_COMPLEX (minus_infty, 2));
+ result = FUNC(ctan) (BUILD_COMPLEX(minus_infty, 2));
check_isnan_exc ("real(ctan(- Inf + i 2)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctan(- Inf + i 2)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ctan) (BUILD_COMPLEX (plus_infty, minus_zero));
+ result = FUNC(ctan) (BUILD_COMPLEX(plus_infty, minus_zero));
check_isnan_exc ("real(ctan(Inf - i 0)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctan(Inf - i 0)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ctan) (BUILD_COMPLEX (plus_infty, -2));
+ result = FUNC(ctan) (BUILD_COMPLEX(plus_infty, -2));
check_isnan_exc ("real(ctan(Inf - i 2)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctan(Inf - i 2)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ctan) (BUILD_COMPLEX (minus_infty, minus_zero));
+ result = FUNC(ctan) (BUILD_COMPLEX(minus_infty, minus_zero));
check_isnan_exc ("real(ctan(-Inf - i 0)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctan(-Inf - i 0)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ctan) (BUILD_COMPLEX (minus_infty, -2));
+ result = FUNC(ctan) (BUILD_COMPLEX(minus_infty, -2));
check_isnan_exc ("real(ctan(-Inf - i 2)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctan(-Inf - i 2)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ctan) (BUILD_COMPLEX (nan_value, plus_infty));
+ result = FUNC(ctan) (BUILD_COMPLEX(nan_value, plus_infty));
check ("real(ctan(NaN + i Inf)) = +-0", FUNC(fabs) (__real__ result), 0);
check ("imag(ctan(NaN + i Inf)) = 1", __imag__ result, 1);
- result = FUNC(ctan) (BUILD_COMPLEX (nan_value, minus_infty));
+ result = FUNC(ctan) (BUILD_COMPLEX(nan_value, minus_infty));
check ("real(ctan(NaN - i Inf)) = +-0", FUNC(fabs) (__real__ result), 0);
check ("imag(ctan(NaN - i Inf)) = -1", __imag__ result, -1);
- result = FUNC(ctan) (BUILD_COMPLEX (0, nan_value));
+ result = FUNC(ctan) (BUILD_COMPLEX(0, nan_value));
check ("real(ctan(0 + i NaN)) = 0", __real__ result, 0);
check_isnan ("imag(ctan(0 + i NaN)) = NaN", __imag__ result);
- result = FUNC(ctan) (BUILD_COMPLEX (minus_zero, nan_value));
+ result = FUNC(ctan) (BUILD_COMPLEX(minus_zero, nan_value));
check ("real(ctan(-0 + i NaN)) = -0", __real__ result, minus_zero);
check_isnan ("imag(ctan(-0 + i NaN)) = NaN", __imag__ result);
- result = FUNC(ctan) (BUILD_COMPLEX (0.5, nan_value));
+ result = FUNC(ctan) (BUILD_COMPLEX(0.5, nan_value));
check_isnan_maybe_exc ("real(ctan(0.5 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctan(0.5 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ctan) (BUILD_COMPLEX (-4.5, nan_value));
+ result = FUNC(ctan) (BUILD_COMPLEX(-4.5, nan_value));
check_isnan_maybe_exc ("real(ctan(-4.5 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctan(-4.5 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ctan) (BUILD_COMPLEX (nan_value, 0));
+ result = FUNC(ctan) (BUILD_COMPLEX(nan_value, 0));
check_isnan_maybe_exc ("real(ctan(NaN + i 0)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctan(NaN + i 0)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ctan) (BUILD_COMPLEX (nan_value, 5));
+ result = FUNC(ctan) (BUILD_COMPLEX(nan_value, 5));
check_isnan_maybe_exc ("real(ctan(NaN + i 5)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctan(NaN + i 5)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ctan) (BUILD_COMPLEX (nan_value, minus_zero));
+ result = FUNC(ctan) (BUILD_COMPLEX(nan_value, minus_zero));
check_isnan_maybe_exc ("real(ctan(NaN - i 0)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctan(NaN - i 0)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ctan) (BUILD_COMPLEX (nan_value, -0.25));
+ result = FUNC(ctan) (BUILD_COMPLEX(nan_value, -0.25));
check_isnan_maybe_exc ("real(ctan(NaN -i 0.25)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctan(NaN -i 0.25)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ctan) (BUILD_COMPLEX (nan_value, nan_value));
+ result = FUNC(ctan) (BUILD_COMPLEX(nan_value, nan_value));
check_isnan ("real(ctan(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(ctan(NaN + i NaN)) = NaN", __imag__ result);
- result = FUNC(ctan) (BUILD_COMPLEX (0.7, 1.2));
+ result = FUNC(ctan) (BUILD_COMPLEX(0.7, 1.2));
check_eps ("real(ctan(0.7 + i 1.2)) == 0.17207...", __real__ result,
0.1720734197630349001L, CHOOSE(1e-17L, 3e-17, 2e-8));
check_eps ("imag(ctan(0.7 + i 1.2)) == 0.95448...", __imag__ result,
0.9544807059989405538L, CHOOSE(2e-17L, 2e-16, 6e-8));
- result = FUNC(ctan) (BUILD_COMPLEX (-2, -3));
+ result = FUNC(ctan) (BUILD_COMPLEX(-2, -3));
check_eps ("real(ctan(-2 - i 3)) == -0.00376...", __real__ result,
0.0037640256415042482L, CHOOSE(1e-19L, 5e-19, 0));
check_eps ("imag(ctan(-2 - i 3)) == -1.00323...", __imag__ result,
@@ -4501,147 +4437,147 @@ ctanh_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC(ctanh) (BUILD_COMPLEX (0, 0));
+ result = FUNC(ctanh) (BUILD_COMPLEX(0, 0));
check ("real(ctanh(0 + i0)) = 0", __real__ result, 0);
check ("imag(ctanh(0 + i0)) = 0", __imag__ result, 0);
- result = FUNC(ctanh) (BUILD_COMPLEX (0, minus_zero));
+ result = FUNC(ctanh) (BUILD_COMPLEX(0, minus_zero));
check ("real(ctanh(0 - i0)) = 0", __real__ result, 0);
check ("imag(ctanh(0 - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(ctanh) (BUILD_COMPLEX (minus_zero, 0));
+ result = FUNC(ctanh) (BUILD_COMPLEX(minus_zero, 0));
check ("real(ctanh(-0 + i0)) = -0", __real__ result, minus_zero);
check ("imag(ctanh(-0 + i0)) = 0", __imag__ result, 0);
- result = FUNC(ctanh) (BUILD_COMPLEX (minus_zero, minus_zero));
+ result = FUNC(ctanh) (BUILD_COMPLEX(minus_zero, minus_zero));
check ("real(ctanh(-0 - i0)) = -0", __real__ result, minus_zero);
check ("imag(ctanh(-0 - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(ctanh) (BUILD_COMPLEX (plus_infty, 0));
+ result = FUNC(ctanh) (BUILD_COMPLEX(plus_infty, 0));
check ("real(ctanh(+Inf + i0)) = 1", __real__ result, 1);
check ("imag(ctanh(+Inf + i0)) = 0", __imag__ result, 0);
- result = FUNC(ctanh) (BUILD_COMPLEX (plus_infty, 1));
+ result = FUNC(ctanh) (BUILD_COMPLEX(plus_infty, 1));
check ("real(ctanh(+Inf + i1)) = 1", __real__ result, 1);
check ("imag(ctanh(+Inf + i1)) = 0", __imag__ result, 0);
- result = FUNC(ctanh) (BUILD_COMPLEX (plus_infty, minus_zero));
+ result = FUNC(ctanh) (BUILD_COMPLEX(plus_infty, minus_zero));
check ("real(ctanh(+Inf - i0)) = 1", __real__ result, 1);
check ("imag(ctanh(+Inf - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(ctanh) (BUILD_COMPLEX (plus_infty, -1));
+ result = FUNC(ctanh) (BUILD_COMPLEX(plus_infty, -1));
check ("real(ctanh(+Inf - i1)) = 1", __real__ result, 1);
check ("imag(ctanh(+Inf - i1)) = -0", __imag__ result, minus_zero);
- result = FUNC(ctanh) (BUILD_COMPLEX (minus_infty, 0));
+ result = FUNC(ctanh) (BUILD_COMPLEX(minus_infty, 0));
check ("real(ctanh(-Inf + i0)) = -1", __real__ result, -1);
check ("imag(ctanh(-Inf + i0)) = 0", __imag__ result, 0);
- result = FUNC(ctanh) (BUILD_COMPLEX (minus_infty, 1));
+ result = FUNC(ctanh) (BUILD_COMPLEX(minus_infty, 1));
check ("real(ctanh(-Inf + i1)) = -1", __real__ result, -1);
check ("imag(ctanh(-Inf + i1)) = 0", __imag__ result, 0);
- result = FUNC(ctanh) (BUILD_COMPLEX (minus_infty, minus_zero));
+ result = FUNC(ctanh) (BUILD_COMPLEX(minus_infty, minus_zero));
check ("real(ctanh(-Inf - i0)) = -1", __real__ result, -1);
check ("imag(ctanh(-Inf - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(ctanh) (BUILD_COMPLEX (minus_infty, -1));
+ result = FUNC(ctanh) (BUILD_COMPLEX(minus_infty, -1));
check ("real(ctanh(-Inf - i1)) = -1", __real__ result, -1);
check ("imag(ctanh(-Inf - i1)) = -0", __imag__ result, minus_zero);
- result = FUNC(ctanh) (BUILD_COMPLEX (0, plus_infty));
+ result = FUNC(ctanh) (BUILD_COMPLEX(0, plus_infty));
check_isnan_exc ("real(ctanh(0 + i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctanh(0 + i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ctanh) (BUILD_COMPLEX (2, plus_infty));
+ result = FUNC(ctanh) (BUILD_COMPLEX(2, plus_infty));
check_isnan_exc ("real(ctanh(2 + i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctanh(2 + i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ctanh) (BUILD_COMPLEX (0, minus_infty));
+ result = FUNC(ctanh) (BUILD_COMPLEX(0, minus_infty));
check_isnan_exc ("real(ctanh(0 - i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctanh(0 - i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ctanh) (BUILD_COMPLEX (2, minus_infty));
+ result = FUNC(ctanh) (BUILD_COMPLEX(2, minus_infty));
check_isnan_exc ("real(ctanh(2 - i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctanh(2 - i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ctanh) (BUILD_COMPLEX (minus_zero, plus_infty));
+ result = FUNC(ctanh) (BUILD_COMPLEX(minus_zero, plus_infty));
check_isnan_exc ("real(ctanh(-0 + i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctanh(-0 + i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ctanh) (BUILD_COMPLEX (-2, plus_infty));
+ result = FUNC(ctanh) (BUILD_COMPLEX(-2, plus_infty));
check_isnan_exc ("real(ctanh(-2 + i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctanh(-2 + i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ctanh) (BUILD_COMPLEX (minus_zero, minus_infty));
+ result = FUNC(ctanh) (BUILD_COMPLEX(minus_zero, minus_infty));
check_isnan_exc ("real(ctanh(-0 - i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctanh(-0 - i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ctanh) (BUILD_COMPLEX (-2, minus_infty));
+ result = FUNC(ctanh) (BUILD_COMPLEX(-2, minus_infty));
check_isnan_exc ("real(ctanh(-2 - i Inf)) = NaN plus invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctanh(-2 - i Inf)) = NaN plus invalid exception",
__imag__ result);
- result = FUNC(ctanh) (BUILD_COMPLEX (plus_infty, nan_value));
+ result = FUNC(ctanh) (BUILD_COMPLEX(plus_infty, nan_value));
check ("real(ctanh(+Inf + i NaN)) = 1", __real__ result, 1);
check ("imag(ctanh(+Inf + i NaN)) = +-0", FUNC(fabs) (__imag__ result), 0);
- result = FUNC(ctanh) (BUILD_COMPLEX (minus_infty, nan_value));
+ result = FUNC(ctanh) (BUILD_COMPLEX(minus_infty, nan_value));
check ("real(ctanh(-Inf + i NaN)) = -1", __real__ result, -1);
check ("imag(ctanh(-Inf + i NaN)) = +-0", FUNC(fabs) (__imag__ result), 0);
- result = FUNC(ctanh) (BUILD_COMPLEX (nan_value, 0));
+ result = FUNC(ctanh) (BUILD_COMPLEX(nan_value, 0));
check_isnan ("real(ctanh(NaN + i0)) = NaN", __real__ result);
check ("imag(ctanh(NaN + i0)) = 0", __imag__ result, 0);
- result = FUNC(ctanh) (BUILD_COMPLEX (nan_value, minus_zero));
+ result = FUNC(ctanh) (BUILD_COMPLEX(nan_value, minus_zero));
check_isnan ("real(ctanh(NaN - i0)) = NaN", __real__ result);
check ("imag(ctanh(NaN - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(ctanh) (BUILD_COMPLEX (nan_value, 0.5));
+ result = FUNC(ctanh) (BUILD_COMPLEX(nan_value, 0.5));
check_isnan_maybe_exc ("real(ctanh(NaN + i0.5)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctanh(NaN + i0.5)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ctanh) (BUILD_COMPLEX (nan_value, -4.5));
+ result = FUNC(ctanh) (BUILD_COMPLEX(nan_value, -4.5));
check_isnan_maybe_exc ("real(ctanh(NaN - i4.5)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctanh(NaN - i4.5)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ctanh) (BUILD_COMPLEX (0, nan_value));
+ result = FUNC(ctanh) (BUILD_COMPLEX(0, nan_value));
check_isnan_maybe_exc ("real(ctanh(0 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctanh(0 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ctanh) (BUILD_COMPLEX (5, nan_value));
+ result = FUNC(ctanh) (BUILD_COMPLEX(5, nan_value));
check_isnan_maybe_exc ("real(ctanh(5 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctanh(5 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ctanh) (BUILD_COMPLEX (minus_zero, nan_value));
+ result = FUNC(ctanh) (BUILD_COMPLEX(minus_zero, nan_value));
check_isnan_maybe_exc ("real(ctanh(-0 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctanh(-0 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ctanh) (BUILD_COMPLEX (-0.25, nan_value));
+ result = FUNC(ctanh) (BUILD_COMPLEX(-0.25, nan_value));
check_isnan_maybe_exc ("real(ctanh(-0.25 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(ctanh(-0.25 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(ctanh) (BUILD_COMPLEX (nan_value, nan_value));
+ result = FUNC(ctanh) (BUILD_COMPLEX(nan_value, nan_value));
check_isnan ("real(ctanh(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(ctanh(NaN + i NaN)) = NaN", __imag__ result);
- result = FUNC(ctanh) (BUILD_COMPLEX (0, M_PI_4l));
+ result = FUNC(ctanh) (BUILD_COMPLEX(0, M_PI_4l));
check ("real(ctanh (0 + i pi/4)) == 0", __real__ result, 0);
check_eps ("imag(ctanh (0 + i pi/4)) == 1", __imag__ result, 1,
- CHOOSE (0, 2e-16, 2e-7));
+ CHOOSE(0, 2e-16, 2e-7));
- result = FUNC(ctanh) (BUILD_COMPLEX (0.7, 1.2));
+ result = FUNC(ctanh) (BUILD_COMPLEX(0.7, 1.2));
check_eps ("real(ctanh(0.7 + i 1.2)) == 1.34721...", __real__ result,
1.3472197399061191630L, CHOOSE(4e-17L, 5e-16, 2e-7));
check_eps ("imag(ctanh(0.7 + i 1.2)) == -0.47786...", __imag__ result,
0.4778641038326365540L, CHOOSE(9e-17L, 2e-16, 9e-8));
- result = FUNC(ctanh) (BUILD_COMPLEX (-2, -3));
+ result = FUNC(ctanh) (BUILD_COMPLEX(-2, -3));
check_eps ("real(ctanh(-2 - i 3)) == -0.96538...", __real__ result,
-0.9653858790221331242L, CHOOSE(2e-19L, 2e-16, 2e-7));
check_eps ("imag(ctanh(-2 - i 3)) == 0.00988...", __imag__ result,
@@ -4654,162 +4590,162 @@ clog_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC(clog) (BUILD_COMPLEX (minus_zero, 0));
+ result = FUNC(clog) (BUILD_COMPLEX(minus_zero, 0));
check_isinfn_exc ("real(clog(-0 + i0)) = -Inf plus divide-by-zero exception",
__real__ result, DIVIDE_BY_ZERO_EXCEPTION);
check ("imag(clog(-0 + i0)) = pi plus divide-by-zero exception",
__imag__ result, M_PIl);
- result = FUNC(clog) (BUILD_COMPLEX (minus_zero, minus_zero));
+ result = FUNC(clog) (BUILD_COMPLEX(minus_zero, minus_zero));
check_isinfn_exc ("real(clog(-0 - i0)) = -Inf plus divide-by-zero exception",
__real__ result, DIVIDE_BY_ZERO_EXCEPTION);
check ("imag(clog(-0 - i0)) = -pi plus divide-by-zero exception",
__imag__ result, -M_PIl);
- result = FUNC(clog) (BUILD_COMPLEX (0, 0));
+ result = FUNC(clog) (BUILD_COMPLEX(0, 0));
check_isinfn_exc ("real(clog(0 + i0)) = -Inf plus divide-by-zero exception",
__real__ result, DIVIDE_BY_ZERO_EXCEPTION);
check ("imag(clog(0 + i0)) = 0 plus divide-by-zero exception",
__imag__ result, 0);
- result = FUNC(clog) (BUILD_COMPLEX (0, minus_zero));
+ result = FUNC(clog) (BUILD_COMPLEX(0, minus_zero));
check_isinfn_exc ("real(clog(0 - i0)) = -Inf plus divide-by-zero exception",
__real__ result, DIVIDE_BY_ZERO_EXCEPTION);
check ("imag(clog(0 - i0)) = -0 plus divide-by-zero exception",
__imag__ result, minus_zero);
- result = FUNC(clog) (BUILD_COMPLEX (minus_infty, plus_infty));
+ result = FUNC(clog) (BUILD_COMPLEX(minus_infty, plus_infty));
check_isinfp ("real(clog(-Inf + i Inf)) = +Inf", __real__ result);
check ("imag(clog(-Inf + i Inf)) = 3*pi/4", __imag__ result,
M_PIl - M_PI_4l);
- result = FUNC(clog) (BUILD_COMPLEX (minus_infty, minus_infty));
+ result = FUNC(clog) (BUILD_COMPLEX(minus_infty, minus_infty));
check_isinfp ("real(clog(-Inf - i Inf)) = +Inf", __real__ result);
check ("imag(clog(-Inf - i Inf)) = -3*pi/4", __imag__ result,
M_PI_4l - M_PIl);
- result = FUNC(clog) (BUILD_COMPLEX (plus_infty, plus_infty));
+ result = FUNC(clog) (BUILD_COMPLEX(plus_infty, plus_infty));
check_isinfp ("real(clog(+Inf + i Inf)) = +Inf", __real__ result);
check ("imag(clog(+Inf + i Inf)) = pi/4", __imag__ result, M_PI_4l);
- result = FUNC(clog) (BUILD_COMPLEX (plus_infty, minus_infty));
+ result = FUNC(clog) (BUILD_COMPLEX(plus_infty, minus_infty));
check_isinfp ("real(clog(+Inf - i Inf)) = +Inf", __real__ result);
check ("imag(clog(+Inf - i Inf)) = -pi/4", __imag__ result, -M_PI_4l);
- result = FUNC(clog) (BUILD_COMPLEX (0, plus_infty));
+ result = FUNC(clog) (BUILD_COMPLEX(0, plus_infty));
check_isinfp ("real(clog(0 + i Inf)) = +Inf", __real__ result);
check ("imag(clog(0 + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(clog) (BUILD_COMPLEX (3, plus_infty));
+ result = FUNC(clog) (BUILD_COMPLEX(3, plus_infty));
check_isinfp ("real(clog(3 + i Inf)) = +Inf", __real__ result);
check ("imag(clog(3 + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(clog) (BUILD_COMPLEX (minus_zero, plus_infty));
+ result = FUNC(clog) (BUILD_COMPLEX(minus_zero, plus_infty));
check_isinfp ("real(clog(-0 + i Inf)) = +Inf", __real__ result);
check ("imag(clog(-0 + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(clog) (BUILD_COMPLEX (-3, plus_infty));
+ result = FUNC(clog) (BUILD_COMPLEX(-3, plus_infty));
check_isinfp ("real(clog(-3 + i Inf)) = +Inf", __real__ result);
check ("imag(clog(-3 + i Inf)) = pi/2", __imag__ result, M_PI_2l);
- result = FUNC(clog) (BUILD_COMPLEX (0, minus_infty));
+ result = FUNC(clog) (BUILD_COMPLEX(0, minus_infty));
check_isinfp ("real(clog(0 - i Inf)) = +Inf", __real__ result);
check ("imag(clog(0 - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(clog) (BUILD_COMPLEX (3, minus_infty));
+ result = FUNC(clog) (BUILD_COMPLEX(3, minus_infty));
check_isinfp ("real(clog(3 - i Inf)) = +Inf", __real__ result);
check ("imag(clog(3 - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(clog) (BUILD_COMPLEX (minus_zero, minus_infty));
+ result = FUNC(clog) (BUILD_COMPLEX(minus_zero, minus_infty));
check_isinfp ("real(clog(-0 - i Inf)) = +Inf", __real__ result);
check ("imag(clog(-0 - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(clog) (BUILD_COMPLEX (-3, minus_infty));
+ result = FUNC(clog) (BUILD_COMPLEX(-3, minus_infty));
check_isinfp ("real(clog(-3 - i Inf)) = +Inf", __real__ result);
check ("imag(clog(-3 - i Inf)) = -pi/2", __imag__ result, -M_PI_2l);
- result = FUNC(clog) (BUILD_COMPLEX (minus_infty, 0));
+ result = FUNC(clog) (BUILD_COMPLEX(minus_infty, 0));
check_isinfp ("real(clog(-Inf + i0)) = +Inf", __real__ result);
check ("imag(clog(-Inf + i0)) = pi", __imag__ result, M_PIl);
- result = FUNC(clog) (BUILD_COMPLEX (minus_infty, 1));
+ result = FUNC(clog) (BUILD_COMPLEX(minus_infty, 1));
check_isinfp ("real(clog(-Inf + i1)) = +Inf", __real__ result);
check ("imag(clog(-Inf + i1)) = pi", __imag__ result, M_PIl);
- result = FUNC(clog) (BUILD_COMPLEX (minus_infty, minus_zero));
+ result = FUNC(clog) (BUILD_COMPLEX(minus_infty, minus_zero));
check_isinfp ("real(clog(-Inf - i0)) = +Inf", __real__ result);
check ("imag(clog(-Inf - i0)) = -pi", __imag__ result, -M_PIl);
- result = FUNC(clog) (BUILD_COMPLEX (minus_infty, -1));
+ result = FUNC(clog) (BUILD_COMPLEX(minus_infty, -1));
check_isinfp ("real(clog(-Inf - i1)) = +Inf", __real__ result);
check ("imag(clog(-Inf - i1)) = -pi", __imag__ result, -M_PIl);
- result = FUNC(clog) (BUILD_COMPLEX (plus_infty, 0));
+ result = FUNC(clog) (BUILD_COMPLEX(plus_infty, 0));
check_isinfp ("real(clog(+Inf + i0)) = +Inf", __real__ result);
check ("imag(clog(+Inf + i0)) = 0", __imag__ result, 0);
- result = FUNC(clog) (BUILD_COMPLEX (plus_infty, 1));
+ result = FUNC(clog) (BUILD_COMPLEX(plus_infty, 1));
check_isinfp ("real(clog(+Inf + i1)) = +Inf", __real__ result);
check ("imag(clog(+Inf + i1)) = 0", __imag__ result, 0);
- result = FUNC(clog) (BUILD_COMPLEX (plus_infty, minus_zero));
+ result = FUNC(clog) (BUILD_COMPLEX(plus_infty, minus_zero));
check_isinfp ("real(clog(+Inf - i0)) = +Inf", __real__ result);
check ("imag(clog(+Inf - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(clog) (BUILD_COMPLEX (plus_infty, -1));
+ result = FUNC(clog) (BUILD_COMPLEX(plus_infty, -1));
check_isinfp ("real(clog(+Inf - i1)) = +Inf", __real__ result);
check ("imag(clog(+Inf - i1)) = -0", __imag__ result, minus_zero);
- result = FUNC(clog) (BUILD_COMPLEX (plus_infty, nan_value));
+ result = FUNC(clog) (BUILD_COMPLEX(plus_infty, nan_value));
check_isinfp ("real(clog(+Inf + i NaN)) = +Inf", __real__ result);
check_isnan ("imag(clog(+Inf + i NaN)) = NaN", __imag__ result);
- result = FUNC(clog) (BUILD_COMPLEX (minus_infty, nan_value));
+ result = FUNC(clog) (BUILD_COMPLEX(minus_infty, nan_value));
check_isinfp ("real(clog(-Inf + i NaN)) = +Inf", __real__ result);
check_isnan ("imag(clog(-Inf + i NaN)) = NaN", __imag__ result);
- result = FUNC(clog) (BUILD_COMPLEX (nan_value, plus_infty));
+ result = FUNC(clog) (BUILD_COMPLEX(nan_value, plus_infty));
check_isinfp ("real(clog(NaN + i Inf)) = +Inf", __real__ result);
check_isnan ("imag(clog(NaN + i Inf)) = NaN", __imag__ result);
- result = FUNC(clog) (BUILD_COMPLEX (nan_value, minus_infty));
+ result = FUNC(clog) (BUILD_COMPLEX(nan_value, minus_infty));
check_isinfp ("real(clog(NaN - i Inf)) = +Inf", __real__ result);
check_isnan ("imag(clog(NaN - i Inf)) = NaN", __imag__ result);
- result = FUNC(clog) (BUILD_COMPLEX (0, nan_value));
+ result = FUNC(clog) (BUILD_COMPLEX(0, nan_value));
check_isnan_maybe_exc ("real(clog(0 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(clog(0 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(clog) (BUILD_COMPLEX (3, nan_value));
+ result = FUNC(clog) (BUILD_COMPLEX(3, nan_value));
check_isnan_maybe_exc ("real(clog(3 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(clog(3 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(clog) (BUILD_COMPLEX (minus_zero, nan_value));
+ result = FUNC(clog) (BUILD_COMPLEX(minus_zero, nan_value));
check_isnan_maybe_exc ("real(clog(-0 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(clog(-0 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(clog) (BUILD_COMPLEX (-3, nan_value));
+ result = FUNC(clog) (BUILD_COMPLEX(-3, nan_value));
check_isnan_maybe_exc ("real(clog(-3 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(clog(-3 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(clog) (BUILD_COMPLEX (nan_value, 0));
+ result = FUNC(clog) (BUILD_COMPLEX(nan_value, 0));
check_isnan_maybe_exc ("real(clog(NaN + i0)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(clog(NaN + i0)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(clog) (BUILD_COMPLEX (nan_value, 5));
+ result = FUNC(clog) (BUILD_COMPLEX(nan_value, 5));
check_isnan_maybe_exc ("real(clog(NaN + i5)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(clog(NaN + i5)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(clog) (BUILD_COMPLEX (nan_value, minus_zero));
+ result = FUNC(clog) (BUILD_COMPLEX(nan_value, minus_zero));
check_isnan_maybe_exc ("real(clog(NaN - i0)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(clog(NaN - i0)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(clog) (BUILD_COMPLEX (nan_value, -5));
+ result = FUNC(clog) (BUILD_COMPLEX(nan_value, -5));
check_isnan_maybe_exc ("real(clog(NaN - i5)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(clog(NaN - i5)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(clog) (BUILD_COMPLEX (nan_value, nan_value));
+ result = FUNC(clog) (BUILD_COMPLEX(nan_value, nan_value));
check_isnan ("real(clog(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(clog(NaN + i NaN)) = NaN", __imag__ result);
- result = FUNC(clog) (BUILD_COMPLEX (0.7, 1.2));
+ result = FUNC(clog) (BUILD_COMPLEX(0.7, 1.2));
check_eps ("real(clog(0.7 + i 1.2)) == 0.32876...", __real__ result,
0.3287600014583970919L, CHOOSE(5e-17L, 6e-17, 3e-8));
check_eps ("imag(clog(0.7 + i 1.2)) == 1.04272...", __imag__ result,
1.0427218783685369524L, CHOOSE(2e-17L, 2.5e-16, 1.2e-7));
- result = FUNC(clog) (BUILD_COMPLEX (-2, -3));
+ result = FUNC(clog) (BUILD_COMPLEX(-2, -3));
check_eps ("real(clog(-2 - i 3)) == 1.28247...", __real__ result,
1.2824746787307683680L, CHOOSE(3e-19L, 0, 0));
check_eps ("imag(clog(-2 - i 3)) == -2.15879...", __imag__ result,
@@ -4822,180 +4758,180 @@ clog10_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC(clog10) (BUILD_COMPLEX (minus_zero, 0));
+ result = FUNC(clog10) (BUILD_COMPLEX(minus_zero, 0));
check_isinfn_exc ("real(clog10(-0 + i0)) = -Inf plus divide-by-zero exception",
__real__ result, DIVIDE_BY_ZERO_EXCEPTION);
check ("imag(clog10(-0 + i0)) = pi plus divide-by-zero exception",
__imag__ result, M_PIl);
- result = FUNC(clog10) (BUILD_COMPLEX (minus_zero, minus_zero));
+ result = FUNC(clog10) (BUILD_COMPLEX(minus_zero, minus_zero));
check_isinfn_exc ("real(clog10(-0 - i0)) = -Inf plus divide-by-zero exception",
__real__ result, DIVIDE_BY_ZERO_EXCEPTION);
check ("imag(clog10(-0 - i0)) = -pi plus divide-by-zero exception",
__imag__ result, -M_PIl);
- result = FUNC(clog10) (BUILD_COMPLEX (0, 0));
+ result = FUNC(clog10) (BUILD_COMPLEX(0, 0));
check_isinfn_exc ("real(clog10(0 + i0)) = -Inf plus divide-by-zero exception",
__real__ result, DIVIDE_BY_ZERO_EXCEPTION);
check ("imag(clog10(0 + i0)) = 0 plus divide-by-zero exception",
__imag__ result, 0);
- result = FUNC(clog10) (BUILD_COMPLEX (0, minus_zero));
+ result = FUNC(clog10) (BUILD_COMPLEX(0, minus_zero));
check_isinfn_exc ("real(clog10(0 - i0)) = -Inf plus divide-by-zero exception",
__real__ result, DIVIDE_BY_ZERO_EXCEPTION);
check ("imag(clog10(0 - i0)) = -0 plus divide-by-zero exception",
__imag__ result, minus_zero);
- result = FUNC(clog10) (BUILD_COMPLEX (minus_infty, plus_infty));
+ result = FUNC(clog10) (BUILD_COMPLEX(minus_infty, plus_infty));
check_isinfp ("real(clog10(-Inf + i Inf)) = +Inf", __real__ result);
check_eps ("imag(clog10(-Inf + i Inf)) = 3*pi/4*M_LOG10E", __imag__ result,
- (M_PIl - M_PI_4l) * M_LOG10El, CHOOSE (0, 3e-16, 0));
- result = FUNC(clog10) (BUILD_COMPLEX (minus_infty, minus_infty));
+ (M_PIl - M_PI_4l) * M_LOG10El, CHOOSE(0, 3e-16, 0));
+ result = FUNC(clog10) (BUILD_COMPLEX(minus_infty, minus_infty));
check_isinfp ("real(clog10(-Inf - i Inf)) = +Inf", __real__ result);
check_eps ("imag(clog10(-Inf - i Inf)) = -3*pi/4*M_LOG10E", __imag__ result,
- (M_PI_4l - M_PIl) * M_LOG10El, CHOOSE (0, 3e-16, 0));
+ (M_PI_4l - M_PIl) * M_LOG10El, CHOOSE(0, 3e-16, 0));
- result = FUNC(clog10) (BUILD_COMPLEX (plus_infty, plus_infty));
+ result = FUNC(clog10) (BUILD_COMPLEX(plus_infty, plus_infty));
check_isinfp ("real(clog10(+Inf + i Inf)) = +Inf", __real__ result);
check_eps ("imag(clog10(+Inf + i Inf)) = pi/4*M_LOG10E", __imag__ result,
- M_PI_4l * M_LOG10El, CHOOSE (0, 6e-17, 3e-8));
- result = FUNC(clog10) (BUILD_COMPLEX (plus_infty, minus_infty));
+ M_PI_4l * M_LOG10El, CHOOSE(0, 6e-17, 3e-8));
+ result = FUNC(clog10) (BUILD_COMPLEX(plus_infty, minus_infty));
check_isinfp ("real(clog10(+Inf - i Inf)) = +Inf", __real__ result);
check_eps ("imag(clog10(+Inf - i Inf)) = -pi/4*M_LOG10E", __imag__ result,
- -M_PI_4l * M_LOG10El, CHOOSE (0, 6e-17, 3e-8));
+ -M_PI_4l * M_LOG10El, CHOOSE(0, 6e-17, 3e-8));
- result = FUNC(clog10) (BUILD_COMPLEX (0, plus_infty));
+ result = FUNC(clog10) (BUILD_COMPLEX(0, plus_infty));
check_isinfp ("real(clog10(0 + i Inf)) = +Inf", __real__ result);
check_eps ("imag(clog10(0 + i Inf)) = pi/2*M_LOG10E", __imag__ result,
- M_PI_2l * M_LOG10El, CHOOSE (0, 2e-16, 6e-8));
- result = FUNC(clog10) (BUILD_COMPLEX (3, plus_infty));
+ M_PI_2l * M_LOG10El, CHOOSE(0, 2e-16, 6e-8));
+ result = FUNC(clog10) (BUILD_COMPLEX(3, plus_infty));
check_isinfp ("real(clog10(3 + i Inf)) = +Inf", __real__ result);
check_eps ("imag(clog10(3 + i Inf)) = pi/2*M_LOG10E", __imag__ result,
- M_PI_2l * M_LOG10El, CHOOSE (0, 2e-16, 6e-8));
- result = FUNC(clog10) (BUILD_COMPLEX (minus_zero, plus_infty));
+ M_PI_2l * M_LOG10El, CHOOSE(0, 2e-16, 6e-8));
+ result = FUNC(clog10) (BUILD_COMPLEX(minus_zero, plus_infty));
check_isinfp ("real(clog10(-0 + i Inf)) = +Inf", __real__ result);
check_eps ("imag(clog10(-0 + i Inf)) = pi/2*M_LOG10E", __imag__ result,
- M_PI_2l * M_LOG10El, CHOOSE (0, 2e-16, 6e-8));
- result = FUNC(clog10) (BUILD_COMPLEX (-3, plus_infty));
+ M_PI_2l * M_LOG10El, CHOOSE(0, 2e-16, 6e-8));
+ result = FUNC(clog10) (BUILD_COMPLEX(-3, plus_infty));
check_isinfp ("real(clog10(-3 + i Inf)) = +Inf", __real__ result);
check_eps ("imag(clog10(-3 + i Inf)) = pi/2*M_LOG10E", __imag__ result,
- M_PI_2l * M_LOG10El, CHOOSE (0, 2e-16, 6e-8));
- result = FUNC(clog10) (BUILD_COMPLEX (0, minus_infty));
+ M_PI_2l * M_LOG10El, CHOOSE(0, 2e-16, 6e-8));
+ result = FUNC(clog10) (BUILD_COMPLEX(0, minus_infty));
check_isinfp ("real(clog10(0 - i Inf)) = +Inf", __real__ result);
check_eps ("imag(clog10(0 - i Inf)) = -pi/2*M_LOG10E", __imag__ result,
- -M_PI_2l * M_LOG10El, CHOOSE (0, 2e-16, 6e-8));
- result = FUNC(clog10) (BUILD_COMPLEX (3, minus_infty));
+ -M_PI_2l * M_LOG10El, CHOOSE(0, 2e-16, 6e-8));
+ result = FUNC(clog10) (BUILD_COMPLEX(3, minus_infty));
check_isinfp ("real(clog10(3 - i Inf)) = +Inf", __real__ result);
check_eps ("imag(clog10(3 - i Inf)) = -pi/2*M_LOG10E", __imag__ result,
- -M_PI_2l * M_LOG10El, CHOOSE (0, 2e-16, 6e-8));
- result = FUNC(clog10) (BUILD_COMPLEX (minus_zero, minus_infty));
+ -M_PI_2l * M_LOG10El, CHOOSE(0, 2e-16, 6e-8));
+ result = FUNC(clog10) (BUILD_COMPLEX(minus_zero, minus_infty));
check_isinfp ("real(clog10(-0 - i Inf)) = +Inf", __real__ result);
check_eps ("imag(clog10(-0 - i Inf)) = -pi/2*M_LOG10E", __imag__ result,
- -M_PI_2l * M_LOG10El, CHOOSE (0, 2e-16, 6e-8));
- result = FUNC(clog10) (BUILD_COMPLEX (-3, minus_infty));
+ -M_PI_2l * M_LOG10El, CHOOSE(0, 2e-16, 6e-8));
+ result = FUNC(clog10) (BUILD_COMPLEX(-3, minus_infty));
check_isinfp ("real(clog10(-3 - i Inf)) = +Inf", __real__ result);
check_eps ("imag(clog10(-3 - i Inf)) = -pi/2*M_LOG10E", __imag__ result,
- -M_PI_2l * M_LOG10El, CHOOSE (0, 2e-16, 6e-8));
+ -M_PI_2l * M_LOG10El, CHOOSE(0, 2e-16, 6e-8));
- result = FUNC(clog10) (BUILD_COMPLEX (minus_infty, 0));
+ result = FUNC(clog10) (BUILD_COMPLEX(minus_infty, 0));
check_isinfp ("real(clog10(-Inf + i0)) = +Inf", __real__ result);
check_eps ("imag(clog10(-Inf + i0)) = pi*M_LOG10E", __imag__ result,
- M_PIl * M_LOG10El, CHOOSE (0, 3e-16, 2e-7));
- result = FUNC(clog10) (BUILD_COMPLEX (minus_infty, 1));
+ M_PIl * M_LOG10El, CHOOSE(0, 3e-16, 2e-7));
+ result = FUNC(clog10) (BUILD_COMPLEX(minus_infty, 1));
check_isinfp ("real(clog10(-Inf + i1)) = +Inf", __real__ result);
check_eps ("imag(clog10(-Inf + i1)) = pi*M_LOG10E", __imag__ result,
- M_PIl * M_LOG10El, CHOOSE (0, 3e-16, 2e-7));
- result = FUNC(clog10) (BUILD_COMPLEX (minus_infty, minus_zero));
+ M_PIl * M_LOG10El, CHOOSE(0, 3e-16, 2e-7));
+ result = FUNC(clog10) (BUILD_COMPLEX(minus_infty, minus_zero));
check_isinfp ("real(clog10(-Inf - i0)) = +Inf", __real__ result);
check_eps ("imag(clog10(-Inf - i0)) = -pi*M_LOG10E", __imag__ result,
- -M_PIl * M_LOG10El, CHOOSE (0, 3e-16, 2e-7));
- result = FUNC(clog10) (BUILD_COMPLEX (minus_infty, -1));
+ -M_PIl * M_LOG10El, CHOOSE(0, 3e-16, 2e-7));
+ result = FUNC(clog10) (BUILD_COMPLEX(minus_infty, -1));
check_isinfp ("real(clog10(-Inf - i1)) = +Inf", __real__ result);
check_eps ("imag(clog10(-Inf - i1)) = -pi*M_LOG10E", __imag__ result,
- -M_PIl * M_LOG10El, CHOOSE (0, 3e-16, 2e-7));
+ -M_PIl * M_LOG10El, CHOOSE(0, 3e-16, 2e-7));
- result = FUNC(clog10) (BUILD_COMPLEX (plus_infty, 0));
+ result = FUNC(clog10) (BUILD_COMPLEX(plus_infty, 0));
check_isinfp ("real(clog10(+Inf + i0)) = +Inf", __real__ result);
check ("imag(clog10(+Inf + i0)) = 0", __imag__ result, 0);
- result = FUNC(clog10) (BUILD_COMPLEX (plus_infty, 1));
+ result = FUNC(clog10) (BUILD_COMPLEX(plus_infty, 1));
check_isinfp ("real(clog10(+Inf + i1)) = +Inf", __real__ result);
check ("imag(clog10(+Inf + i1)) = 0", __imag__ result, 0);
- result = FUNC(clog10) (BUILD_COMPLEX (plus_infty, minus_zero));
+ result = FUNC(clog10) (BUILD_COMPLEX(plus_infty, minus_zero));
check_isinfp ("real(clog10(+Inf - i0)) = +Inf", __real__ result);
check ("imag(clog10(+Inf - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(clog10) (BUILD_COMPLEX (plus_infty, -1));
+ result = FUNC(clog10) (BUILD_COMPLEX(plus_infty, -1));
check_isinfp ("real(clog10(+Inf - i1)) = +Inf", __real__ result);
check ("imag(clog10(+Inf - i1)) = -0", __imag__ result, minus_zero);
- result = FUNC(clog10) (BUILD_COMPLEX (plus_infty, nan_value));
+ result = FUNC(clog10) (BUILD_COMPLEX(plus_infty, nan_value));
check_isinfp ("real(clog10(+Inf + i NaN)) = +Inf", __real__ result);
check_isnan ("imag(clog10(+Inf + i NaN)) = NaN", __imag__ result);
- result = FUNC(clog10) (BUILD_COMPLEX (minus_infty, nan_value));
+ result = FUNC(clog10) (BUILD_COMPLEX(minus_infty, nan_value));
check_isinfp ("real(clog10(-Inf + i NaN)) = +Inf", __real__ result);
check_isnan ("imag(clog10(-Inf + i NaN)) = NaN", __imag__ result);
- result = FUNC(clog10) (BUILD_COMPLEX (nan_value, plus_infty));
+ result = FUNC(clog10) (BUILD_COMPLEX(nan_value, plus_infty));
check_isinfp ("real(clog10(NaN + i Inf)) = +Inf", __real__ result);
check_isnan ("imag(clog10(NaN + i Inf)) = NaN", __imag__ result);
- result = FUNC(clog10) (BUILD_COMPLEX (nan_value, minus_infty));
+ result = FUNC(clog10) (BUILD_COMPLEX(nan_value, minus_infty));
check_isinfp ("real(clog10(NaN - i Inf)) = +Inf", __real__ result);
check_isnan ("imag(clog10(NaN - i Inf)) = NaN", __imag__ result);
- result = FUNC(clog10) (BUILD_COMPLEX (0, nan_value));
+ result = FUNC(clog10) (BUILD_COMPLEX(0, nan_value));
check_isnan_maybe_exc ("real(clog10(0 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(clog10(0 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(clog10) (BUILD_COMPLEX (3, nan_value));
+ result = FUNC(clog10) (BUILD_COMPLEX(3, nan_value));
check_isnan_maybe_exc ("real(clog10(3 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(clog10(3 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(clog10) (BUILD_COMPLEX (minus_zero, nan_value));
+ result = FUNC(clog10) (BUILD_COMPLEX(minus_zero, nan_value));
check_isnan_maybe_exc ("real(clog10(-0 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(clog10(-0 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(clog10) (BUILD_COMPLEX (-3, nan_value));
+ result = FUNC(clog10) (BUILD_COMPLEX(-3, nan_value));
check_isnan_maybe_exc ("real(clog10(-3 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(clog10(-3 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(clog10) (BUILD_COMPLEX (nan_value, 0));
+ result = FUNC(clog10) (BUILD_COMPLEX(nan_value, 0));
check_isnan_maybe_exc ("real(clog10(NaN + i0)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(clog10(NaN + i0)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(clog10) (BUILD_COMPLEX (nan_value, 5));
+ result = FUNC(clog10) (BUILD_COMPLEX(nan_value, 5));
check_isnan_maybe_exc ("real(clog10(NaN + i5)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(clog10(NaN + i5)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(clog10) (BUILD_COMPLEX (nan_value, minus_zero));
+ result = FUNC(clog10) (BUILD_COMPLEX(nan_value, minus_zero));
check_isnan_maybe_exc ("real(clog10(NaN - i0)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(clog10(NaN - i0)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(clog10) (BUILD_COMPLEX (nan_value, -5));
+ result = FUNC(clog10) (BUILD_COMPLEX(nan_value, -5));
check_isnan_maybe_exc ("real(clog10(NaN - i5)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(clog10(NaN - i5)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(clog10) (BUILD_COMPLEX (nan_value, nan_value));
+ result = FUNC(clog10) (BUILD_COMPLEX(nan_value, nan_value));
check_isnan ("real(clog10(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(clog10(NaN + i NaN)) = NaN", __imag__ result);
- result = FUNC(clog10) (BUILD_COMPLEX (0.7, 1.2));
+ result = FUNC(clog10) (BUILD_COMPLEX(0.7, 1.2));
check_eps ("real(clog10(0.7 + i 1.2)) == 0.14277...", __real__ result,
0.1427786545038868803L, CHOOSE(2e-17L, 6e-17, 2e-8));
check_eps ("imag(clog10(0.7 + i 1.2)) == 0.45284...", __imag__ result,
0.4528483579352493248L, CHOOSE(6e-18, 6e-17, 6e-8));
- result = FUNC(clog10) (BUILD_COMPLEX (-2, -3));
+ result = FUNC(clog10) (BUILD_COMPLEX(-2, -3));
check_eps ("real(clog10(-2 - i 3)) == 0.55697...", __real__ result,
0.5569716761534183846L, CHOOSE(6e-20L, 0, 0));
check_eps ("imag(clog10(-2 - i 3)) == -0.93755...", __imag__ result,
- -0.9375544629863747085L, CHOOSE (7e-19L, 2e-16, 3e-7));
+ -0.9375544629863747085L, CHOOSE(7e-19L, 2e-16, 3e-7));
}
@@ -5004,166 +4940,166 @@ csqrt_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC(csqrt) (BUILD_COMPLEX (0, 0));
+ result = FUNC(csqrt) (BUILD_COMPLEX(0, 0));
check ("real(csqrt(0 + i0)) = 0", __real__ result, 0);
check ("imag(csqrt(0 + i0)) = 0", __imag__ result, 0);
- result = FUNC(csqrt) (BUILD_COMPLEX (0, minus_zero));
+ result = FUNC(csqrt) (BUILD_COMPLEX(0, minus_zero));
check ("real(csqrt(0 - i0)) = 0", __real__ result, 0);
check ("imag(csqrt(0 - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(csqrt) (BUILD_COMPLEX (minus_zero, 0));
+ result = FUNC(csqrt) (BUILD_COMPLEX(minus_zero, 0));
check ("real(csqrt(-0 + i0)) = 0", __real__ result, 0);
check ("imag(csqrt(-0 + i0)) = 0", __imag__ result, 0);
- result = FUNC(csqrt) (BUILD_COMPLEX (minus_zero, minus_zero));
+ result = FUNC(csqrt) (BUILD_COMPLEX(minus_zero, minus_zero));
check ("real(csqrt(-0 - i0)) = 0", __real__ result, 0);
check ("imag(csqrt(-0 - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(csqrt) (BUILD_COMPLEX (minus_infty, 0));
+ result = FUNC(csqrt) (BUILD_COMPLEX(minus_infty, 0));
check ("real(csqrt(-Inf + i0)) = 0", __real__ result, 0);
check_isinfp ("imag(csqrt(-Inf + i0)) = +Inf", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (minus_infty, 6));
+ result = FUNC(csqrt) (BUILD_COMPLEX(minus_infty, 6));
check ("real(csqrt(-Inf + i6)) = 0", __real__ result, 0);
check_isinfp ("imag(csqrt(-Inf + i6)) = +Inf", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (minus_infty, minus_zero));
+ result = FUNC(csqrt) (BUILD_COMPLEX(minus_infty, minus_zero));
check ("real(csqrt(-Inf - i0)) = 0", __real__ result, 0);
check_isinfn ("imag(csqrt(-Inf - i0)) = -Inf", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (minus_infty, -6));
+ result = FUNC(csqrt) (BUILD_COMPLEX(minus_infty, -6));
check ("real(csqrt(-Inf - i6)) = 0", __real__ result, 0);
check_isinfn ("imag(csqrt(-Inf - i6)) = -Inf", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, 0));
+ result = FUNC(csqrt) (BUILD_COMPLEX(plus_infty, 0));
check_isinfp ("real(csqrt(+Inf + i0)) = +Inf", __real__ result);
check ("imag(csqrt(+Inf + i0)) = 0", __imag__ result, 0);
- result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, 6));
+ result = FUNC(csqrt) (BUILD_COMPLEX(plus_infty, 6));
check_isinfp ("real(csqrt(+Inf + i6)) = +Inf", __real__ result);
check ("imag(csqrt(+Inf + i6)) = 0", __imag__ result, 0);
- result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, minus_zero));
+ result = FUNC(csqrt) (BUILD_COMPLEX(plus_infty, minus_zero));
check_isinfp ("real(csqrt(+Inf - i0)) = +Inf", __real__ result);
check ("imag(csqrt(+Inf - i0)) = -0", __imag__ result, minus_zero);
- result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, -6));
+ result = FUNC(csqrt) (BUILD_COMPLEX(plus_infty, -6));
check_isinfp ("real(csqrt(+Inf - i6)) = +Inf", __real__ result);
check ("imag(csqrt(+Inf - i6)) = -0", __imag__ result, minus_zero);
- result = FUNC(csqrt) (BUILD_COMPLEX (0, plus_infty));
+ result = FUNC(csqrt) (BUILD_COMPLEX(0, plus_infty));
check_isinfp ("real(csqrt(0 + i Inf)) = +Inf", __real__ result);
check_isinfp ("imag(csqrt(0 + i Inf)) = +Inf", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (4, plus_infty));
+ result = FUNC(csqrt) (BUILD_COMPLEX(4, plus_infty));
check_isinfp ("real(csqrt(4 + i Inf)) = +Inf", __real__ result);
check_isinfp ("imag(csqrt(4 + i Inf)) = +Inf", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, plus_infty));
+ result = FUNC(csqrt) (BUILD_COMPLEX(plus_infty, plus_infty));
check_isinfp ("real(csqrt(+Inf + i Inf)) = +Inf", __real__ result);
check_isinfp ("imag(csqrt(+Inf + i Inf)) = +Inf", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (minus_zero, plus_infty));
+ result = FUNC(csqrt) (BUILD_COMPLEX(minus_zero, plus_infty));
check_isinfp ("real(csqrt(-0 + i Inf)) = +Inf", __real__ result);
check_isinfp ("imag(csqrt(-0 + i Inf)) = +Inf", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (-4, plus_infty));
+ result = FUNC(csqrt) (BUILD_COMPLEX(-4, plus_infty));
check_isinfp ("real(csqrt(-4 + i Inf)) = +Inf", __real__ result);
check_isinfp ("imag(csqrt(-4 + i Inf)) = +Inf", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (minus_infty, plus_infty));
+ result = FUNC(csqrt) (BUILD_COMPLEX(minus_infty, plus_infty));
check_isinfp ("real(csqrt(-Inf + i Inf)) = +Inf", __real__ result);
check_isinfp ("imag(csqrt(-Inf + i Inf)) = +Inf", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (0, minus_infty));
+ result = FUNC(csqrt) (BUILD_COMPLEX(0, minus_infty));
check_isinfp ("real(csqrt(0 - i Inf)) = +Inf", __real__ result);
check_isinfn ("imag(csqrt(0 - i Inf)) = -Inf", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (4, minus_infty));
+ result = FUNC(csqrt) (BUILD_COMPLEX(4, minus_infty));
check_isinfp ("real(csqrt(4 - i Inf)) = +Inf", __real__ result);
check_isinfn ("imag(csqrt(4 - i Inf)) = -Inf", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, minus_infty));
+ result = FUNC(csqrt) (BUILD_COMPLEX(plus_infty, minus_infty));
check_isinfp ("real(csqrt(+Inf - i Inf)) = +Inf", __real__ result);
check_isinfn ("imag(csqrt(+Inf - i Inf)) = -Inf", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (minus_zero, minus_infty));
+ result = FUNC(csqrt) (BUILD_COMPLEX(minus_zero, minus_infty));
check_isinfp ("real(csqrt(-0 - i Inf)) = +Inf", __real__ result);
check_isinfn ("imag(csqrt(-0 - i Inf)) = -Inf", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (-4, minus_infty));
+ result = FUNC(csqrt) (BUILD_COMPLEX(-4, minus_infty));
check_isinfp ("real(csqrt(-4 - i Inf)) = +Inf", __real__ result);
check_isinfn ("imag(csqrt(-4 - i Inf)) = -Inf", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (minus_infty, minus_infty));
+ result = FUNC(csqrt) (BUILD_COMPLEX(minus_infty, minus_infty));
check_isinfp ("real(csqrt(-Inf - i Inf)) = +Inf", __real__ result);
check_isinfn ("imag(csqrt(-Inf - i Inf)) = -Inf", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (minus_infty, nan_value));
+ result = FUNC(csqrt) (BUILD_COMPLEX(minus_infty, nan_value));
check_isnan ("real(csqrt(-Inf + i NaN)) = NaN", __real__ result);
check_isinfp ("imag(csqrt(-Inf + i NaN)) = +-Inf",
FUNC(fabs) (__imag__ result));
- result = FUNC(csqrt) (BUILD_COMPLEX (plus_infty, nan_value));
+ result = FUNC(csqrt) (BUILD_COMPLEX(plus_infty, nan_value));
check_isinfp ("real(csqrt(+Inf + i NaN)) = +Inf", __real__ result);
check_isnan ("imag(csqrt(+Inf + i NaN)) = NaN", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (0, nan_value));
+ result = FUNC(csqrt) (BUILD_COMPLEX(0, nan_value));
check_isnan_maybe_exc ("real(csqrt(0 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csqrt(0 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (1, nan_value));
+ result = FUNC(csqrt) (BUILD_COMPLEX(1, nan_value));
check_isnan_maybe_exc ("real(csqrt(1 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csqrt(1 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (minus_zero, nan_value));
+ result = FUNC(csqrt) (BUILD_COMPLEX(minus_zero, nan_value));
check_isnan_maybe_exc ("real(csqrt(-0 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csqrt(-0 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (-1, nan_value));
+ result = FUNC(csqrt) (BUILD_COMPLEX(-1, nan_value));
check_isnan_maybe_exc ("real(csqrt(-1 + i NaN)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csqrt(-1 + i NaN)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (nan_value, 0));
+ result = FUNC(csqrt) (BUILD_COMPLEX(nan_value, 0));
check_isnan_maybe_exc ("real(csqrt(NaN + i0)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csqrt(NaN + i0)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (nan_value, 8));
+ result = FUNC(csqrt) (BUILD_COMPLEX(nan_value, 8));
check_isnan_maybe_exc ("real(csqrt(NaN + i8)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csqrt(NaN + i8)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (nan_value, minus_zero));
+ result = FUNC(csqrt) (BUILD_COMPLEX(nan_value, minus_zero));
check_isnan_maybe_exc ("real(csqrt(NaN - i0)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csqrt(NaN - i0)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (nan_value, -8));
+ result = FUNC(csqrt) (BUILD_COMPLEX(nan_value, -8));
check_isnan_maybe_exc ("real(csqrt(NaN - i8)) = NaN plus maybe invalid exception",
__real__ result, INVALID_EXCEPTION);
check_isnan ("imag(csqrt(NaN - i8)) = NaN plus maybe invalid exception",
__imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (nan_value, nan_value));
+ result = FUNC(csqrt) (BUILD_COMPLEX(nan_value, nan_value));
check_isnan ("real(csqrt(NaN + i NaN)) = NaN", __real__ result);
check_isnan ("imag(csqrt(NaN + i NaN)) = NaN", __imag__ result);
- result = FUNC(csqrt) (BUILD_COMPLEX (16.0, -30.0));
+ result = FUNC(csqrt) (BUILD_COMPLEX(16.0, -30.0));
check ("real(csqrt(16 - 30i)) = 5", __real__ result, 5.0);
check ("imag(csqrt(16 - 30i)) = -3", __imag__ result, -3.0);
- result = FUNC(csqrt) (BUILD_COMPLEX (-1, 0));
+ result = FUNC(csqrt) (BUILD_COMPLEX(-1, 0));
check ("real(csqrt(1 + i0) = 0", __real__ result, 0);
check ("imag(csqrt(1 + i0) = 1", __imag__ result, 1);
- result = FUNC(csqrt) (BUILD_COMPLEX (0, 2));
+ result = FUNC(csqrt) (BUILD_COMPLEX(0, 2));
check ("real(csqrt(0 + i 2) = 1", __real__ result, 1);
check ("imag(csqrt(0 + i 2) = 1", __imag__ result, 1);
- result = FUNC(csqrt) (BUILD_COMPLEX (119, 120));
+ result = FUNC(csqrt) (BUILD_COMPLEX(119, 120));
check ("real(csqrt(119 + i 120) = 12", __real__ result, 12);
check ("imag(csqrt(119 + i 120) = 5", __imag__ result, 5);
- result = FUNC(csqrt) (BUILD_COMPLEX (0.7, 1.2));
+ result = FUNC(csqrt) (BUILD_COMPLEX(0.7, 1.2));
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, 6e-8));
- result = FUNC(csqrt) (BUILD_COMPLEX (-2, -3));
+ result = FUNC(csqrt) (BUILD_COMPLEX(-2, -3));
check_eps ("real(csqrt(-2 - i 3)) == 0.89597...", __real__ result,
0.8959774761298381247L, CHOOSE(6e-16L, 4e-16, 6e-8));
check_eps ("imag(csqrt(-2 - i 3)) == -1.67414...", __imag__ result,
-1.6741492280355400404L, CHOOSE(0, 5e-16, 0));
- result = FUNC(csqrt) (BUILD_COMPLEX (-2, 3));
+ result = FUNC(csqrt) (BUILD_COMPLEX(-2, 3));
check_eps ("real(csqrt(-2 + i 3)) == 0.89597...", __real__ result,
0.8959774761298381247L, CHOOSE(6e-20L, 4e-16, 6e-8));
check_eps ("imag(csqrt(-2 + i 3)) == 1.67414...", __imag__ result,
@@ -5176,26 +5112,26 @@ cpow_test (void)
{
__complex__ MATHTYPE result;
- result = FUNC (cpow) (BUILD_COMPLEX (1, 0), BUILD_COMPLEX (0, 0));
+ result = FUNC(cpow) (BUILD_COMPLEX(1, 0), BUILD_COMPLEX(0, 0));
check ("real(cpow (1 + i0), (0 + i0)) == 0", __real__ result, 1);
check ("imag(cpow (1 + i0), (0 + i0)) == 0", __imag__ result, 0);
- result = FUNC (cpow) (BUILD_COMPLEX (2, 0), BUILD_COMPLEX (10, 0));
+ result = FUNC(cpow) (BUILD_COMPLEX(2, 0), BUILD_COMPLEX(10, 0));
check_eps ("real(cpow (2 + i0), (10 + i0)) == 1024", __real__ result, 1024,
- CHOOSE (6e-16L, 0, 0));
+ CHOOSE(6e-16L, 0, 0));
check ("imag(cpow (2 + i0), (10 + i0)) == 0", __imag__ result, 0);
- result = FUNC (cpow) (BUILD_COMPLEX (M_El, 0), BUILD_COMPLEX (0, 2 * M_PIl));
+ result = FUNC(cpow) (BUILD_COMPLEX(M_El, 0), BUILD_COMPLEX(0, 2 * M_PIl));
check_eps ("real(cpow (e + i0), (0 + i 2*PI)) == 1", __real__ result, 1,
- CHOOSE (0, 0, 6e-8));
+ CHOOSE(0, 0, 6e-8));
check_eps ("imag(cpow (e + i0), (0 + i 2*PI)) == 0", __imag__ result, 0,
- CHOOSE (3e-18L, 3e-16, 4e-7));
+ CHOOSE(3e-18L, 3e-16, 4e-7));
- result = FUNC (cpow) (BUILD_COMPLEX (2, 3), BUILD_COMPLEX (4, 0));
+ result = FUNC(cpow) (BUILD_COMPLEX(2, 3), BUILD_COMPLEX(4, 0));
check_eps ("real(cpow (2 + i3), (4 + i0)) == -119", __real__ result, -119,
- CHOOSE (9e-16L, 2e-14, 4e-5));
+ CHOOSE(9e-16L, 2e-14, 4e-5));
check_eps ("imag(cpow (2 + i3), (4 + i0)) == -120", __imag__ result, -120,
- CHOOSE (1e-15L, 0, 5e-5));
+ CHOOSE(1e-15L, 0, 5e-5));
}
@@ -5206,9 +5142,9 @@ cabs_test (void)
MATHTYPE a;
a = random_greater (0);
check_isinfp_ext ("cabs (+inf + i x) == +inf",
- FUNC(cabs) (BUILD_COMPLEX (plus_infty, a)), a);
+ FUNC(cabs) (BUILD_COMPLEX(plus_infty, a)), a);
check_isinfp_ext ("cabs (-inf + i x) == +inf",
- FUNC(cabs) (BUILD_COMPLEX (minus_infty, a)), a);
+ FUNC(cabs) (BUILD_COMPLEX(minus_infty, a)), a);
check_isinfp ("cabs (+inf+ iNaN) == +inf",
FUNC(cabs) (BUILD_COMPLEX(minus_infty, nan_value)));
@@ -5218,7 +5154,7 @@ cabs_test (void)
check_isnan ("cabs (NaN+ iNaN) == NaN",
FUNC(cabs) (BUILD_COMPLEX(nan_value, nan_value)));
- a = FUNC(cabs) (BUILD_COMPLEX (12.4L, 0.7L));
+ a = FUNC(cabs) (BUILD_COMPLEX(12.4L, 0.7L));
check ("cabs (x,y) == cabs (y,x)",
FUNC(cabs) (BUILD_COMPLEX(0.7L, 12.4L)), a);
check ("cabs (x,y) == cabs (-x,y)",
@@ -5299,11 +5235,11 @@ carg_test (void)
x = random_value (-1e4, 1e4);
check ("carg(x + i inf) == pi/2 for finite x",
- FUNC(carg) (BUILD_COMPLEX(x, plus_infty)), M_PI_2l);
+ FUNC(carg) (BUILD_COMPLEX(x, plus_infty)), M_PI_2l);
x = random_value (-1e4, 1e4);
check ("carg(x - i inf) == -pi/2 for finite x",
- FUNC(carg) (BUILD_COMPLEX(x, minus_infty)), -M_PI_2l);
+ FUNC(carg) (BUILD_COMPLEX(x, minus_infty)), -M_PI_2l);
x = random_greater (0);
check ("carg (-inf + i y) == +pi for finite y > 0",
@@ -5324,7 +5260,6 @@ carg_test (void)
check ("carg (-inf -i inf) == -3*pi/4",
FUNC(carg) (BUILD_COMPLEX(minus_infty, minus_infty)), -3 * M_PI_4l);
-
}
@@ -5570,10 +5505,8 @@ fma_test (void)
}
-/*
- Tests for the comparison macros
- */
-typedef enum {is_less, is_equal, is_greater, is_unordered} comp_result;
+/* Tests for the comparison macros */
+typedef enum { is_less, is_equal, is_greater, is_unordered } comp_result;
static void
@@ -5618,7 +5551,6 @@ comparison2_test (MATHTYPE x, MATHTYPE y, comp_result comp)
expected);
result = (isunordered (x, y) == expected);
check_bool (buf, result);
-
}
@@ -5684,40 +5616,43 @@ inverse_functions (void)
{
inverse_func_pair_test ("asin(sin(x)) == x",
FUNC(sin), FUNC(asin), 1.0,
- CHOOSE (2e-18L, 0, 3e-7L));
+ CHOOSE(2e-18L, 0, 3e-7L));
inverse_func_pair_test ("sin(asin(x)) == x",
FUNC(asin), FUNC(sin), 1.0, 0.0);
inverse_func_pair_test ("acos(cos(x)) == x",
FUNC(cos), FUNC(acos), 1.0,
- CHOOSE (4e-18L, 1e-15L, 0));
+ CHOOSE(4e-18L, 1e-15L, 0));
inverse_func_pair_test ("cos(acos(x)) == x",
FUNC(acos), FUNC(cos), 1.0, 0.0);
inverse_func_pair_test ("atan(tan(x)) == x",
- FUNC(tan), FUNC(atan), 1.0, CHOOSE (2e-18L, 0, 0));
+ FUNC(tan), FUNC(atan), 1.0,
+ CHOOSE(2e-18L, 0, 0));
inverse_func_pair_test ("tan(atan(x)) == x",
FUNC(atan), FUNC(tan), 1.0,
- CHOOSE (2e-18L, 1e-15L, 2e-7));
+ CHOOSE(2e-18L, 1e-15L, 2e-7));
inverse_func_pair_test ("asinh(sinh(x)) == x",
- FUNC(sinh), FUNC(asinh), 1.0, CHOOSE (1e-18L, 0, 1e-7));
+ FUNC(sinh), FUNC(asinh), 1.0,
+ CHOOSE(1e-18L, 0, 1e-7));
inverse_func_pair_test ("sinh(asinh(x)) == x",
FUNC(asinh), FUNC(sinh), 1.0,
- CHOOSE (2e-18L, 2e-16L, 2e-7));
+ CHOOSE(2e-18L, 2e-16L, 2e-7));
inverse_func_pair_test ("acosh(cosh(x)) == x",
FUNC(cosh), FUNC(acosh), 1.0,
- CHOOSE (1e-18L, 1e-15L, 6e-8));
+ CHOOSE(1e-18L, 1e-15L, 6e-8));
inverse_func_pair_test ("cosh(acosh(x)) == x",
FUNC(acosh), FUNC(cosh), 1.0, 0.0);
inverse_func_pair_test ("atanh(tanh(x)) == x",
- FUNC(tanh), FUNC(atanh), 1.0, CHOOSE (1e-18L, 1e-15L, 0));
+ FUNC(tanh), FUNC(atanh), 1.0,
+ CHOOSE(1e-18L, 1e-15L, 0));
inverse_func_pair_test ("tanh(atanh(x)) == x",
FUNC(atanh), FUNC(tanh), 1.0, 0.0);
-
}
+
/* Test sin and cos with the identity: sin(x)^2 + cos(x)^2 = 1. */
static void
identities1_test (MATHTYPE x, MATHTYPE epsilon)
@@ -5788,20 +5723,20 @@ identities3_test (MATHTYPE x, MATHTYPE epsilon)
static void
identities (void)
{
- identities1_test (0.2L, CHOOSE (1e-18L, 0, 2e-7));
- identities1_test (0.9L, CHOOSE (1e-18L, 2e-16, 2e-7));
+ identities1_test (0.2L, CHOOSE(1e-18L, 0, 2e-7));
+ identities1_test (0.9L, CHOOSE(1e-18L, 2e-16, 2e-7));
identities1_test (0, 0);
- identities1_test (-1, CHOOSE (1e-18L, 0, 1e-7));
+ identities1_test (-1, CHOOSE(1e-18L, 0, 1e-7));
- identities2_test (0.2L, CHOOSE (1e-19L, 1e-16, 0));
- identities2_test (0.9L, CHOOSE (3e-19L, 1e-15, 2e-7));
+ identities2_test (0.2L, CHOOSE(1e-19L, 1e-16, 0));
+ identities2_test (0.9L, CHOOSE(3e-19L, 1e-15, 2e-7));
identities2_test (0, 0);
- identities2_test (-1, CHOOSE (1e-18L, 1e-15, 2e-7));
+ identities2_test (-1, CHOOSE(1e-18L, 1e-15, 2e-7));
- identities3_test (0.2L, CHOOSE (1e-18L, 0, 1e-7));
- identities3_test (0.9L, CHOOSE (1e-18L, 1e-15, 1e-6));
- identities3_test (0, CHOOSE (0, 0, 1e-6));
- identities3_test (-1, CHOOSE (1e-18L, 7e-16, 1e-6));
+ identities3_test (0.2L, CHOOSE(1e-18L, 0, 1e-7));
+ identities3_test (0.9L, CHOOSE(1e-18L, 1e-15, 1e-6));
+ identities3_test (0, CHOOSE(0, 0, 1e-6));
+ identities3_test (-1, CHOOSE(1e-18L, 7e-16, 1e-6));
}
@@ -5866,19 +5801,18 @@ basic_tests (void)
/* test if EPSILON is ok */
x1 = MATHCONST (1.0);
- x2 = x1 + CHOOSE (LDBL_EPSILON, DBL_EPSILON, FLT_EPSILON);
+ x2 = x1 + CHOOSE(LDBL_EPSILON, DBL_EPSILON, FLT_EPSILON);
check_bool ("1 != 1+EPSILON", x1 != x2);
x1 = MATHCONST (1.0);
- x2 = x1 - CHOOSE (LDBL_EPSILON, DBL_EPSILON, FLT_EPSILON);
+ x2 = x1 - CHOOSE(LDBL_EPSILON, DBL_EPSILON, FLT_EPSILON);
check_bool ("1 != 1-EPSILON", x1 != x2);
/* test if HUGE_VALx is ok */
- x1 = CHOOSE (HUGE_VALL, HUGE_VAL, HUGE_VALF);
+ x1 = CHOOSE(HUGE_VALL, HUGE_VAL, HUGE_VALF);
check_bool ("isinf (HUGE_VALx) == +1", ISINF (x1) == +1);
- x1 = -CHOOSE (HUGE_VALL, HUGE_VAL, HUGE_VALF);
+ x1 = -CHOOSE(HUGE_VALL, HUGE_VAL, HUGE_VALF);
check_bool ("isinf (-HUGE_VALx) == -1", ISINF (x1) == -1);
-
}
@@ -5889,9 +5823,9 @@ initialize (void)
plus_zero = 0.0;
nan_value = plus_zero / plus_zero; /* Suppress GCC warning */
- minus_zero = FUNC (copysign) (0.0, -1.0);
- plus_infty = CHOOSE (HUGE_VALL, HUGE_VAL, HUGE_VALF);
- minus_infty = -CHOOSE (HUGE_VALL, HUGE_VAL, HUGE_VALF);
+ minus_zero = FUNC(copysign) (0.0, -1.0);
+ plus_infty = CHOOSE(HUGE_VALL, HUGE_VAL, HUGE_VALF);
+ minus_infty = -CHOOSE(HUGE_VALL, HUGE_VAL, HUGE_VALF);
(void) &plus_zero;
(void) &nan_value;
@@ -5928,7 +5862,7 @@ parse_options (int argc, char *argv[])
c = getopt_long (argc, argv, "v::s",
long_options, &option_index);
- /* Detect the end of the options. */
+ /* Detect the end of the options. */
if (c == -1)
break;
@@ -6077,7 +6011,7 @@ main (int argc, char *argv[])
noTests, noExcTests);
if (noErrors)
{
- printf (" %d errors occured.\n", noErrors);
+ printf (" %d errors occured.\n", noErrors);
exit (1);
}
printf (" All tests passed successfully.\n");
diff --git a/nis/rpcsvc/nis.h b/nis/rpcsvc/nis.h
index 151b439..20fa114 100644
--- a/nis/rpcsvc/nis.h
+++ b/nis/rpcsvc/nis.h
@@ -119,8 +119,8 @@ enum nstype {
typedef enum nstype nstype;
struct oar_mask {
- u_int oa_rights;
- zotypes oa_otype;
+ uint32_t oa_rights;
+ zotypes oa_otype;
};
typedef struct oar_mask oar_mask;
@@ -137,7 +137,7 @@ struct nis_server {
u_int ep_len;
endpoint *ep_val;
} ep;
- u_int key_type;
+ uint32_t key_type;
netobj pkey;
};
typedef struct nis_server nis_server;
@@ -164,7 +164,7 @@ typedef struct directory_obj directory_obj;
#define EN_ASN1 64
struct entry_col {
- u_int ec_flags;
+ uint32_t ec_flags;
struct {
u_int ec_value_len;
char *ec_value_val;
@@ -182,7 +182,7 @@ struct entry_obj {
typedef struct entry_obj entry_obj;
struct group_obj {
- u_int gr_flags;
+ uint32_t gr_flags;
struct {
u_int gr_members_len;
nis_name *gr_members_val;
@@ -210,8 +210,8 @@ typedef struct link_obj link_obj;
struct table_col {
char *tc_name;
- u_int tc_flags;
- u_int tc_rights;
+ uint32_t tc_flags;
+ uint32_t tc_rights;
};
typedef struct table_col table_col;
@@ -255,7 +255,7 @@ struct nis_object {
nis_name zo_owner;
nis_name zo_group;
nis_name zo_domain;
- u_int zo_access;
+ uint32_t zo_access;
uint32_t zo_ttl;
objdata zo_data;
};
@@ -344,7 +344,7 @@ struct ib_request {
u_int ibr_srch_len;
nis_attr *ibr_srch_val;
} ibr_srch;
- u_int ibr_flags;
+ uint32_t ibr_flags;
struct {
u_int ibr_obj_len;
nis_object *ibr_obj_val;
@@ -408,7 +408,7 @@ struct cp_result {
typedef struct cp_result cp_result;
struct nis_tag {
- u_int tag_type;
+ uint32_t tag_type;
char *tag_val;
};
typedef struct nis_tag nis_tag;
diff --git a/nis/rpcsvc/nis.x b/nis/rpcsvc/nis.x
index 93aa09f..54ddb05 100644
--- a/nis/rpcsvc/nis.x
+++ b/nis/rpcsvc/nis.x
@@ -37,9 +37,9 @@
% * structures used by the NIS service. It includes the file nis_tags.h
% * which defines the tag values. This allows the tags to change without
% * having to change the nis.x file.
-% *
+% *
% * NOTE : DO NOT EDIT THIS FILE! It is automatically generated when
-% * rpcgen is run on the nis.x file. Note that there is a
+% * rpcgen is run on the nis.x file. Note that there is a
% * simple sed script to remove some unneeded lines. (See the
% * Makefile target nis.h)
% *
@@ -51,9 +51,6 @@
#if RPC_HDR
%#include <rpc/xdr.h>
#endif
-#if RPC_SVC
-%#include "nis_svc.h"
-#endif
/* Include the RPC Language description of NIS objects */
#include "nis_object.x"
@@ -111,11 +108,11 @@ enum nis_error {
};
-/*
+/*
* Structure definitions for the parameters and results of the actual
* NIS RPC calls.
*
- * This is the standard result (in the protocol) of most of the nis
+ * This is the standard result (in the protocol) of most of the nis
* requests.
*/
@@ -129,11 +126,11 @@ struct nis_result {
uint32_t cticks; /* Client ticks */
};
-/*
- * A Name Service request
- * This request is used to access the name space, ns_name is the name
+/*
+ * A Name Service request
+ * This request is used to access the name space, ns_name is the name
* of the object within the namespace and the object is it's value, for
- * add/modify, a copy of the original for remove.
+ * add/modify, a copy of the original for remove.
*/
struct ns_request {
@@ -141,7 +138,7 @@ struct ns_request {
nis_object ns_object<1>; /* Optional Object (add/remove) */
};
-/*
+/*
* An information base request
* This request includes the NIS name of the table we wish to search, the
* search criteria in the form of attribute/value pairs and an optional
@@ -153,7 +150,7 @@ struct ns_request {
struct ib_request {
nis_name ibr_name; /* The name of the Table */
nis_attr ibr_srch<>; /* The search critereia */
- u_int ibr_flags; /* Optional flags */
+ uint32_t ibr_flags; /* Optional flags */
nis_object ibr_obj<1>; /* optional object (add/modify) */
nis_server ibr_cbhost<1>; /* Optional callback info */
u_int ibr_bufsize; /* Optional first/next bufsize */
@@ -161,7 +158,7 @@ struct ib_request {
};
/*
- * This argument to the PING call notifies the replicas that something in
+ * This argument to the PING call notifies the replicas that something in
* a directory has changed and this is it's timestamp. The replica will use
* the timestamp to determine if its resync operation was successful.
*/
@@ -170,8 +167,8 @@ struct ping_args {
uint32_t stamp; /* timestamp of the transaction */
};
-/*
- * These are the type of entries that are stored in the transaction log,
+/*
+ * These are the type of entries that are stored in the transaction log,
* note that modifications will appear as two entries, for names, they have
* a "OLD" entry followed by a "NEW" entry. For entries in tables, there
* is a remove followed by an add. It is done this way so that we can read
@@ -189,13 +186,13 @@ enum log_entry_t {
MOD_IBASE = 7, /* Entry was modified in information base */
UPD_STAMP = 8 /* Update timestamp (used as fenceposts) */
};
-
+
/*
- * This result is returned from the name service when it is requested to
+ * This result is returned from the name service when it is requested to
* dump logged entries from its transaction log. Information base updates
* will have the name of the information base in the le_name field and
* a canonical set of attribute/value pairs to fully specify the entry's
- * 'name'.
+ * 'name'.
*/
struct log_entry {
uint32_t le_time; /* Time in seconds */
@@ -211,7 +208,7 @@ struct log_result {
netobj lr_cookie; /* Used by the dump callback */
log_entry lr_entries<>; /* zero or more entries */
};
-
+
struct cp_result {
nis_error cp_status; /* Status of the checkpoint */
uint32_t cp_zticks; /* Service 'ticks' */
@@ -220,17 +217,17 @@ struct cp_result {
/*
* This structure defines a generic NIS tag list. The taglist contains
- * zero or tags, each of which is a type and a value. (u_int).
+ * zero or tags, each of which is a type and a value. (u_int).
* These are used to report statistics (see tag definitions below)
* and to set or reset state variables.
*/
struct nis_tag {
- u_int tag_type; /* Statistic tag (may vary) */
- string tag_val<>; /* Statistic value may also vary */
+ uint32_t tag_type; /* Statistic tag (may vary) */
+ string tag_val<>; /* Statistic value may also vary */
};
struct nis_taglist {
- nis_tag tags<>; /* List of tags */
+ nis_tag tags<>; /* List of tags */
};
struct dump_args {
@@ -247,7 +244,7 @@ struct fd_args {
struct fd_result {
nis_error status; /* Status returned by function */
nis_name source; /* Source of this answer */
- opaque dir_data<>; /* Directory Data (XDR'ed) */
+ opaque dir_data<>; /* Directory Data (XDR'ed) */
opaque signature<>; /* Signature of the source */
};
@@ -258,14 +255,14 @@ struct nis_bound_endpoint {
endpoint ep;
int generation;
int rank;
- u_int flags;
+ uint32_t flags;
int hostnum;
int epnum;
nis_name uaddr;
endpoint cbep;
};
typedef struct nis_bound_endpoint nis_bound_endpoint;
-
+
struct nis_bound_directory {
int generation;
int min_rank; /* minimum rank of bound endpoints */
@@ -276,7 +273,7 @@ struct nis_bound_directory {
typedef struct nis_bound_directory nis_bound_directory;
%#define bep_len BEP.BEP_len
%#define bep_val BEP.BEP_val
-
+
struct nis_active_endpoint {
endpoint ep;
nis_name hostname;
@@ -287,27 +284,11 @@ struct nis_active_endpoint {
endpoint cbep;
};
typedef struct nis_active_endpoint nis_active_endpoint;
-
+
%/* defines for nis_bound_endpoint.flags */
%#define NIS_BOUND 0x1
%#define NIS_TRANSIENT_ERRORS 0x2
-
-
-/*
- * What's going on here? Well, it's like this. When the service
- * is being compiled it wants to have the service definition specific
- * info included, and when the client is being compiled it wants that
- * info. This includes the appropriate file which was generated by
- * make in the protocols directory (probably /usr/include/rpcsvc).
- */
-#ifdef RPC_SVC
-%#include "nis_svc.h"
-#endif
-#ifdef RPC_CLNT
-%#include "nis_clnt.h"
-#endif
-
program NIS_PROG {
/* RPC Language description of the NIS+ protocol */
@@ -331,10 +312,10 @@ program NIS_PROG {
/* If fetch and optionally reset statistics */
nis_taglist NIS_STATUS(nis_taglist) = 14;
-
+
/* Dump changes to directory since time in da_time */
log_result NIS_DUMPLOG(dump_args) = 15;
-
+
/* Dump contents of directory named */
log_result NIS_DUMP(dump_args) = 16;
@@ -349,16 +330,16 @@ program NIS_PROG {
/* Send 'status changed' ping to replicates */
void NIS_PING(ping_args) = 20;
-
+
/* Modify server behaviour (such as debugging) */
nis_taglist NIS_SERVSTATE(nis_taglist) = 21;
-
+
/* Create a Directory */
nis_error NIS_MKDIR(nis_name) = 22;
-
+
/* Remove a Directory */
nis_error NIS_RMDIR(nis_name) = 23;
-
+
/* Update public keys of a directory object */
nis_error NIS_UPDKEYS(nis_name) = 24;
} = 3;
@@ -411,8 +392,8 @@ program NIS_PROG {
%#define NIS_GROUP(a, m) (((a) & ((m) << 8)) != 0)
%#define NIS_OWNER(a, m) (((a) & ((m) << 16)) != 0)
%#define NIS_NOBODY(a, m) (((a) & ((m) << 24)) != 0)
-%/*
-% * EOL Alert - The following non-prefixed test macros are
+%/*
+% * EOL Alert - The following non-prefixed test macros are
% * here for backward compatability, and will be not be present
% * in future releases - use the NIS_*() macros above.
% */
@@ -475,12 +456,12 @@ program NIS_PROG {
%
%/*
% * nis_3.h
-% *
+% *
% * This file contains definitions that are only of interest to the actual
% * service daemon and client stubs. Normal users of NIS will not include
% * this file.
% *
-% * NOTE : This include file is automatically created by a combination
+% * NOTE : This include file is automatically created by a combination
% * of rpcgen and sed. DO NOT EDIT IT, change the nis.x file instead
% * and then remake this file.
% */
diff --git a/nis/rpcsvc/nis_object.x b/nis/rpcsvc/nis_object.x
index ecd9f48..43e7688 100644
--- a/nis/rpcsvc/nis_object.x
+++ b/nis/rpcsvc/nis_object.x
@@ -13,12 +13,12 @@
%#define __nis_object_h
%
#endif
-/*
+/*
* This file defines the format for a NIS object in RPC language.
* It is included by the main .x file and the database access protocol
* file. It is common because both of them need to deal with the same
* type of object. Generating the actual code though is a bit messy because
- * the nis.x file and the nis_dba.x file will generate xdr routines to
+ * the nis.x file and the nis_dba.x file will generate xdr routines to
* encode/decode objects when only one set is needed. Such is life when
* one is using rpcgen.
*
@@ -50,7 +50,7 @@ const NIS_PK_DHEXT = 4; /* Extended Diffie-Hellman for RPC-GSS */
/*
* The fundamental name type of NIS. The name may consist of two parts,
- * the first being the fully qualified name, and the second being an
+ * the first being the fully qualified name, and the second being an
* optional set of attribute/value pairs.
*/
struct nis_attr {
@@ -73,7 +73,7 @@ typedef string nis_name<>; /* The NIS name itself. */
*/
enum zotypes {
-
+
BOGUS_OBJ = 0, /* Uninitialized object structure */
NO_OBJ = 1, /* NULL object (no data) */
DIRECTORY_OBJ = 2, /* Directory object describing domain */
@@ -82,7 +82,7 @@ enum zotypes {
ENTRY_OBJ = 5, /* Entry object (a database record) */
LINK_OBJ = 6, /* A name link. */
PRIVATE_OBJ = 7, /* Private object (all opaque data) */
-
+
NIS_BOGUS_OBJ = 0, /* Uninitialized object structure */
NIS_NO_OBJ = 1, /* NULL object (no data) */
NIS_DIRECTORY_OBJ = 2, /* Directory object describing domain */
@@ -114,18 +114,18 @@ enum nstype {
* DIRECTORY - The name service object. These objects identify other name
* servers that are serving some portion of the name space. Each has a
* type associated with it. The resolver library will note whether or not
- * is has the needed routines to access that type of service.
- * The oarmask structure defines an access rights mask on a per object
- * type basis for the name spaces. The only bits currently used are
+ * is has the needed routines to access that type of service.
+ * The oarmask structure defines an access rights mask on a per object
+ * type basis for the name spaces. The only bits currently used are
* create and destroy. By enabling or disabling these access rights for
* a specific object type for a one of the accessor entities (owner,
- * group, world) the administrator can control what types of objects
- * may be freely added to the name space and which require the
+ * group, world) the administrator can control what types of objects
+ * may be freely added to the name space and which require the
* administrator's approval.
*/
struct oar_mask {
- u_int oa_rights; /* Access rights mask */
- zotypes oa_otype; /* Object type */
+ uint32_t oa_rights; /* Access rights mask */
+ zotypes oa_otype; /* Object type */
};
struct endpoint {
@@ -142,7 +142,7 @@ struct endpoint {
struct nis_server {
nis_name name; /* Principal name of the server */
endpoint ep<>; /* Universal addr(s) for server */
- u_int key_type; /* Public key type */
+ uint32_t key_type; /* Public key type */
netobj pkey; /* server's public key */
};
@@ -154,11 +154,11 @@ struct directory_obj {
oar_mask do_armask<>; /* Create/Destroy rights by object type */
};
-/*
- * ENTRY - This is one row of data from an information base.
- * The type value is used by the client library to convert the entry to
+/*
+ * ENTRY - This is one row of data from an information base.
+ * The type value is used by the client library to convert the entry to
* it's internal structure representation. The Table name is a back pointer
- * to the table where the entry is stored. This allows the client library
+ * to the table where the entry is stored. This allows the client library
* to determine where to send a request if the client wishes to change this
* entry but got to it through a LINK rather than directly.
* If the entry is a "standalone" entry then this field is void.
@@ -170,8 +170,8 @@ const EN_MODIFIED = 8; /* Indicates entry is modified. */
const EN_ASN1 = 64; /* Means contents use ASN.1 encoding */
struct entry_col {
- u_int ec_flags; /* Flags for this value */
- opaque ec_value<>; /* It's textual value */
+ uint32_t ec_flags; /* Flags for this value */
+ opaque ec_value<>; /* It's textual value */
};
struct entry_obj {
@@ -182,11 +182,11 @@ struct entry_obj {
/*
* GROUP - The group object contains a list of NIS principal names. Groups
* are used to authorize principals. Each object has a set of access rights
- * for members of its group. Principal names in groups are in the form
+ * for members of its group. Principal names in groups are in the form
* name.directory and recursive groups are expressed as @groupname.directory
*/
struct group_obj {
- u_int gr_flags; /* Flags controlling group */
+ uint32_t gr_flags; /* Flags controlling group */
nis_name gr_members<>; /* List of names in group */
};
@@ -204,8 +204,8 @@ struct link_obj {
};
/*
- * TABLE - This is the table object. It implements a simple
- * data base that applications and use for configuration or
+ * TABLE - This is the table object. It implements a simple
+ * data base that applications and use for configuration or
* administration purposes. The role of the table is to group together
* a set of related entries. Tables are the simple database component
* of NIS. Like many databases, tables are logically divided into columns
@@ -216,7 +216,7 @@ struct link_obj {
* Within the definition of each column there is a flags variable, this
* variable contains flags which determine whether or not the column is
* searchable, contains binary data, and access rights for the entry objects
- * column value.
+ * column value.
*/
const TA_BINARY = 1; /* Means table data is binary */
@@ -228,9 +228,9 @@ const TA_MODIFIED = 32; /* Means this columns attrs are modified*/
const TA_ASN1 = 64; /* Means contents use ASN.1 encoding */
struct table_col {
- string tc_name<64>; /* Column Name */
- u_int tc_flags; /* control flags */
- u_int tc_rights; /* Access rights mask */
+ string tc_name<64>; /* Column Name */
+ uint32_t tc_flags; /* control flags */
+ uint32_t tc_rights; /* Access rights mask */
};
struct table_obj {
@@ -242,7 +242,7 @@ struct table_obj {
};
/*
- * This union joins together all of the currently known objects.
+ * This union joins together all of the currently known objects.
*/
union objdata switch (zotypes zo_type) {
case NIS_DIRECTORY_OBJ :
@@ -269,16 +269,16 @@ union objdata switch (zotypes zo_type) {
* This is the basic NIS object data type. It consists of a generic part
* which all objects contain, and a specialized part which varies depending
* on the type of the object. All of the specialized sections have been
- * described above. You might have wondered why they all start with an
- * integer size, followed by the useful data. The answer is, when the
- * server doesn't recognize the type returned it treats it as opaque data.
+ * described above. You might have wondered why they all start with an
+ * integer size, followed by the useful data. The answer is, when the
+ * server doesn't recognize the type returned it treats it as opaque data.
* And the definition for opaque data is {int size; char *data;}. In this
* way, servers and utility routines that do not understand a given type
* may still pass it around. One has to be careful in setting
* this variable accurately, it must take into account such things as
* XDR padding of structures etc. The best way to set it is to note one's
* position in the XDR encoding stream, encode the structure, look at the
- * new position and calculate the size.
+ * new position and calculate the size.
*/
struct nis_oid {
uint32_t ctime; /* Time of objects creation */
@@ -286,12 +286,12 @@ struct nis_oid {
};
struct nis_object {
- nis_oid zo_oid; /* object identity verifier. */
+ nis_oid zo_oid; /* object identity verifier. */
nis_name zo_name; /* The NIS name for this object */
nis_name zo_owner; /* NIS name of object owner. */
nis_name zo_group; /* NIS name of access group. */
nis_name zo_domain; /* The administrator for the object */
- u_int zo_access; /* Access rights (owner, group, world) */
+ uint32_t zo_access; /* Access rights (owner, group, world) */
uint32_t zo_ttl; /* Object's time to live in seconds. */
objdata zo_data; /* Data structure for this type */
};
diff --git a/string/envz.h b/string/envz.h
index dc6f557..adb8c0a 100644
--- a/string/envz.h
+++ b/string/envz.h
@@ -1,5 +1,5 @@
/* Routines for dealing with '\0' separated environment vectors
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
The GNU C Library is free software; you can redistribute it and/or
@@ -55,6 +55,10 @@ extern error_t envz_merge __P ((char **__envz, size_t *__envz_len,
__const char *__envz2, size_t __envz2_len,
int __override));
+/* Remove the entry for NAME from ENVZ & ENVZ_LEN, if any. */
+extern void envz_remove __P ((char **__envz, size_t *__envz_len,
+ __const char *__name));
+
/* Remove null entries. */
extern void envz_strip __P ((char **__envz, size_t *__envz_len));
diff --git a/sunrpc/auth_des.c b/sunrpc/auth_des.c
index cd68c22..d8659a9 100644
--- a/sunrpc/auth_des.c
+++ b/sunrpc/auth_des.c
@@ -70,8 +70,7 @@ static void authdes_destroy (AUTH *);
static bool_t synchronize (struct sockaddr *, struct timeval *)
internal_function;
-static struct auth_ops authdes_ops =
-{
+static struct auth_ops authdes_ops = {
authdes_nextverf,
authdes_marshal,
authdes_validate,
@@ -83,23 +82,22 @@ static struct auth_ops authdes_ops =
/*
* This struct is pointed to by the ah_private field of an "AUTH *"
*/
-struct ad_private
- {
- char *ad_fullname; /* client's full name */
- u_int ad_fullnamelen; /* length of name, rounded up */
- char *ad_servername; /* server's full name */
- u_int ad_servernamelen; /* length of name, rounded up */
- u_int ad_window; /* client specified window */
- bool_t ad_dosync; /* synchronize? */
- struct sockaddr ad_syncaddr; /* remote host to synch with */
- struct timeval ad_timediff; /* server's time - client's time */
- u_long ad_nickname; /* server's nickname for client */
- struct authdes_cred ad_cred; /* storage for credential */
- struct authdes_verf ad_verf; /* storage for verifier */
- struct timeval ad_timestamp; /* timestamp sent */
- des_block ad_xkey; /* encrypted conversation key */
- u_char ad_pkey[1024]; /* Servers actual public key */
- };
+struct ad_private {
+ char *ad_fullname; /* client's full name */
+ u_int ad_fullnamelen; /* length of name, rounded up */
+ char *ad_servername; /* server's full name */
+ u_int ad_servernamelen; /* length of name, rounded up */
+ uint32_t ad_window; /* client specified window */
+ bool_t ad_dosync; /* synchronize? */
+ struct sockaddr ad_syncaddr; /* remote host to synch with */
+ struct timeval ad_timediff; /* server's time - client's time */
+ u_long ad_nickname; /* server's nickname for client */
+ struct authdes_cred ad_cred; /* storage for credential */
+ struct authdes_verf ad_verf; /* storage for verifier */
+ struct timeval ad_timestamp; /* timestamp sent */
+ des_block ad_xkey; /* encrypted conversation key */
+ u_char ad_pkey[1024]; /* Servers actual public key */
+};
/*
@@ -236,7 +234,7 @@ authdes_marshal (AUTH * auth, XDR * xdrs)
des_block cryptbuf[2];
des_block ivec;
int status;
- int len;
+ unsigned int len;
register long *ixdr;
/*
@@ -255,14 +253,15 @@ authdes_marshal (AUTH * auth, XDR * xdrs)
/*
* XDR the timestamp and possibly some other things, then
* encrypt them.
+ * XXX We have a real Year 2038 problem here.
*/
ixdr = (long *) cryptbuf;
IXDR_PUT_LONG (ixdr, ad->ad_timestamp.tv_sec);
IXDR_PUT_LONG (ixdr, ad->ad_timestamp.tv_usec);
if (ad->ad_cred.adc_namekind == ADN_FULLNAME)
{
- IXDR_PUT_U_LONG (ixdr, ad->ad_window);
- IXDR_PUT_U_LONG (ixdr, ad->ad_window - 1);
+ IXDR_PUT_U_INT32 (ixdr, ad->ad_window);
+ IXDR_PUT_U_INT32 (ixdr, ad->ad_window - 1);
ivec.key.high = ivec.key.low = 0;
status = cbc_crypt ((char *) &auth->ah_key, (char *) cryptbuf,
2 * sizeof (des_block), DES_ENCRYPT | DES_HW, (char *) &ivec);
@@ -304,29 +303,29 @@ authdes_marshal (AUTH * auth, XDR * xdrs)
if ((ixdr = xdr_inline (xdrs, 2 * BYTES_PER_XDR_UNIT)) != NULL)
{
- IXDR_PUT_LONG (ixdr, AUTH_DES);
- IXDR_PUT_LONG (ixdr, len);
+ IXDR_PUT_INT32 (ixdr, AUTH_DES);
+ IXDR_PUT_U_INT32 (ixdr, len);
}
else
{
- ATTEMPT (xdr_putlong (xdrs, (long *)&auth->ah_cred.oa_flavor));
- ATTEMPT (xdr_putlong (xdrs, (long *)&len));
+ ATTEMPT (xdr_putint32 (xdrs, &auth->ah_cred.oa_flavor));
+ ATTEMPT (xdr_putint32 (xdrs, &len));
}
ATTEMPT (xdr_authdes_cred (xdrs, cred));
len = (2 + 1) * BYTES_PER_XDR_UNIT;
if ((ixdr = xdr_inline (xdrs, 2 * BYTES_PER_XDR_UNIT)) != NULL)
{
- IXDR_PUT_LONG (ixdr, AUTH_DES);
- IXDR_PUT_LONG (ixdr, len);
+ IXDR_PUT_INT32 (ixdr, AUTH_DES);
+ IXDR_PUT_U_INT32 (ixdr, len);
}
else
{
- ATTEMPT (xdr_putlong (xdrs, (long *)&auth->ah_verf.oa_flavor));
- ATTEMPT (xdr_putlong (xdrs, (long *)&len));
+ ATTEMPT (xdr_putint32 (xdrs, &auth->ah_verf.oa_flavor));
+ ATTEMPT (xdr_putint32 (xdrs, &len));
}
ATTEMPT (xdr_authdes_verf (xdrs, verf));
- return (TRUE);
+ return TRUE;
}
@@ -334,7 +333,7 @@ authdes_marshal (AUTH * auth, XDR * xdrs)
* 3. Validate
*/
static bool_t
-authdes_validate (AUTH * auth, struct opaque_auth *rverf)
+authdes_validate (AUTH *auth, struct opaque_auth *rverf)
{
struct ad_private *ad = AUTH_PRIVATE (auth);
struct authdes_verf verf;
@@ -358,7 +357,7 @@ authdes_validate (AUTH * auth, struct opaque_auth *rverf)
if (DES_FAILED (status))
{
debug ("authdes_validate: DES decryption failure");
- return (FALSE);
+ return FALSE;
}
/*
@@ -375,7 +374,7 @@ authdes_validate (AUTH * auth, struct opaque_auth *rverf)
sizeof (struct timeval)) != 0)
{
debug ("authdes_validate: verifier mismatch\n");
- return (FALSE);
+ return FALSE;
}
/*
@@ -383,14 +382,14 @@ authdes_validate (AUTH * auth, struct opaque_auth *rverf)
*/
ad->ad_nickname = verf.adv_nickname;
ad->ad_cred.adc_namekind = ADN_NICKNAME;
- return (TRUE);
+ return TRUE;
}
/*
* 4. Refresh
*/
static bool_t
-authdes_refresh (AUTH * auth)
+authdes_refresh (AUTH *auth)
{
netobj pkey;
struct ad_private *ad = AUTH_PRIVATE (auth);
@@ -411,19 +410,19 @@ authdes_refresh (AUTH * auth)
if (key_encryptsession_pk (ad->ad_servername, &pkey, &ad->ad_xkey) < 0)
{
debug ("authdes_create: unable to encrypt conversation key");
- return (FALSE);
+ return FALSE;
}
cred->adc_fullname.key = ad->ad_xkey;
cred->adc_namekind = ADN_FULLNAME;
cred->adc_fullname.name = ad->ad_fullname;
- return (TRUE);
+ return TRUE;
}
/*
* 5. Destroy
*/
static void
-authdes_destroy (AUTH * auth)
+authdes_destroy (AUTH *auth)
{
struct ad_private *ad = AUTH_PRIVATE (auth);
@@ -447,7 +446,7 @@ synchronize (struct sockaddr *syncaddr, struct timeval *timep)
timeout.tv_sec = RTIME_TIMEOUT;
timeout.tv_usec = 0;
if (rtime ((struct sockaddr_in *) syncaddr, timep, &timeout) < 0)
- return (FALSE);
+ return FALSE;
__gettimeofday (&mytime, (struct timezone *) NULL);
timep->tv_sec -= mytime.tv_sec;
@@ -457,5 +456,5 @@ synchronize (struct sockaddr *syncaddr, struct timeval *timep)
timep->tv_usec += MILLION;
}
timep->tv_usec -= mytime.tv_usec;
- return (TRUE);
+ return TRUE;
}
diff --git a/sunrpc/rpc/xdr.h b/sunrpc/rpc/xdr.h
index dd9959a..cd28717 100644
--- a/sunrpc/rpc/xdr.h
+++ b/sunrpc/rpc/xdr.h
@@ -154,6 +154,7 @@ struct XDR
*/
typedef bool_t (*xdrproc_t) __PMT ((XDR *, void *,...));
+
/*
* Operations defined on a XDR handle
*
@@ -247,20 +248,28 @@ struct xdr_discrim
* N.B. and frozen for all time: each data type here uses 4 bytes
* of external representation.
*/
-#define IXDR_GET_LONG(buf) ((long)ntohl((u_long)*((u_int32_t*)buf)++))
-#define IXDR_PUT_LONG(buf, v) (*((u_int32_t*)(buf))++ = (long)htonl((u_long)v))
-
-#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf))
-#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf))
-#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf))
-#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_LONG(buf))
-#define IXDR_GET_U_SHORT(buf) ((u_short)IXDR_GET_LONG(buf))
-
-#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
-#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
-#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
-#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
-#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
+
+#define IXDR_GET_INT32(buf) ((int32_t)ntohl((uint32_t)*(buf)++))
+#define IXDR_PUT_INT32(buf, v) (*(buf)++ = (int32_t)htonl((uint32_t)v))
+#define IXDR_GET_U_INT32(buf) ((uint32_t)IXDR_GET_INT32(buf))
+#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_INT32((buf), ((int32_t)(v)))
+
+#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_INT32(buf))
+#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_INT32(buf))
+#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_INT32(buf))
+#define IXDR_GET_U_SHORT(buf) ((u_short)IXDR_GET_INT32(buf))
+
+#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_INT32((buf), ((int)(v)))
+#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_INT32((buf), ((int)(v)))
+#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_INT32((buf), ((int)(v)))
+#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_INT32((buf), ((int)(v)))
+
+/* This defines are removed from Sun for new platforms and shouldn't
+ be used any longer. */
+#define IXDR_GET_LONG(buf) ((long)ntohl((u_long)*((u_int32_t*)buf)++))
+#define IXDR_PUT_LONG(buf, v) (*((u_int32_t*)(buf))++ = (long)htonl((u_long)v))
+#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf))
+#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG((buf), ((long)(v)))
/*
* These are the "generic" xdr routines.
diff --git a/sunrpc/rpc_hout.c b/sunrpc/rpc_hout.c
index 4c49d10..a41a7e7 100644
--- a/sunrpc/rpc_hout.c
+++ b/sunrpc/rpc_hout.c
@@ -48,7 +48,6 @@ static void pargdef (definition * def);
static void pstructdef (definition * def);
static void puniondef (definition * def);
static void pdefine (const char *name, const char *num);
-static void puldefine (const char *name, const char *num);
static int define_printed (proc_list * stop, version_list * start);
static void pprogramdef (definition * def);
static void parglist (proc_list * proc, const char *addargtype);
@@ -251,12 +250,6 @@ pdefine (const char *name, const char *num)
f_print (fout, "#define %s %s\n", name, num);
}
-static void
-puldefine (const char *name, const char *num)
-{
- f_print (fout, "#define %s ((u_long)%s)\n", name, num);
-}
-
static int
define_printed (proc_list *stop, version_list *start)
{
@@ -302,7 +295,7 @@ pprogramdef (definition *def)
pargdef (def);
- puldefine (def->def_name, def->def.pr.prog_num);
+ pdefine (def->def_name, def->def.pr.prog_num);
for (vers = def->def.pr.versions; vers != NULL; vers = vers->next)
{
if (tblflag)
@@ -312,7 +305,7 @@ pprogramdef (definition *def)
f_print (fout, "extern %s_%s_nproc;\n",
locase (def->def_name), vers->vers_num);
}
- puldefine (vers->vers_name, vers->vers_num);
+ pdefine (vers->vers_name, vers->vers_num);
/*
* Print out 2 definitions, one for ANSI-C, another for
@@ -327,7 +320,7 @@ pprogramdef (definition *def)
{
if (!define_printed(proc, def->def.pr.versions))
{
- puldefine (proc->proc_name, proc->proc_num);
+ pdefine (proc->proc_name, proc->proc_num);
}
f_print (fout, "%s", ext);
pprocdef (proc, vers, NULL, 0, 2);
@@ -359,7 +352,7 @@ pprogramdef (definition *def)
{
if (!define_printed(proc, def->def.pr.versions))
{
- puldefine(proc->proc_name, proc->proc_num);
+ pdefine(proc->proc_name, proc->proc_num);
}
f_print (fout, "%s", ext);
pprocdef (proc, vers, "CLIENT *", 0, i);
diff --git a/sunrpc/rpc_main.c b/sunrpc/rpc_main.c
index 6cdef73..8302f81 100644
--- a/sunrpc/rpc_main.c
+++ b/sunrpc/rpc_main.c
@@ -968,7 +968,6 @@ mkfile_output (struct commandline *cmd)
char *mkfilename;
const char *clientname, *clntname, *xdrname, *hdrname;
const char *servername, *svcname, *servprogname, *clntprogname;
- char *temp;
svcname = file_name (cmd->infile, "_svc.c");
clntname = file_name (cmd->infile, "_clnt.c");
@@ -990,12 +989,12 @@ mkfile_output (struct commandline *cmd)
if (allfiles)
{
- mkfilename = alloc (strlen ("Makefile.") +
- strlen (cmd->infile) + 1);
- temp = (char *) rindex (cmd->infile, '.');
- strcat (mkfilename, "Makefile.");
- strncat (mkfilename, cmd->infile,
- (temp - cmd->infile));
+ char *cp, *temp;
+
+ mkfilename = alloc (strlen ("Makefile.") + strlen (cmd->infile) + 1);
+ temp = rindex (cmd->infile, '.');
+ cp = stpcpy (mkfilename, "Makefile.");
+ strncpy (cp, cmd->infile, (temp - cmd->infile));
}
else
mkfilename = (char *) cmd->outfile;
diff --git a/sunrpc/rpc_svcout.c b/sunrpc/rpc_svcout.c
index 2869d3d..aad9412 100644
--- a/sunrpc/rpc_svcout.c
+++ b/sunrpc/rpc_svcout.c
@@ -72,10 +72,10 @@ static void
p_xdrfunc (const char *rname, const char *typename)
{
if (Cflag)
- f_print (fout, "\t\txdr_%s = (xdrproc_t) xdr_%s;\n", rname,
+ f_print (fout, "\t\t_xdr_%s = (xdrproc_t) xdr_%s;\n", rname,
stringfix (typename));
else
- f_print (fout, "\t\txdr_%s = xdr_%s;\n", rname, stringfix (typename));
+ f_print (fout, "\t\t_xdr_%s = xdr_%s;\n", rname, stringfix (typename));
}
void
@@ -503,7 +503,7 @@ write_program (const definition * def, const char *storage)
if (Cflag)
{
- f_print (fout, "\txdrproc_t xdr_%s, xdr_%s;\n", ARG, RESULT);
+ f_print (fout, "\txdrproc_t _xdr_%s, _xdr_%s;\n", ARG, RESULT);
if (mtflag)
f_print(fout,
"\tbool_t (*%s)(char *, void *, struct svc_req *);\n",
@@ -619,11 +619,11 @@ write_program (const definition * def, const char *storage)
RETVAL, ROUTINE, ARG, RESULT, RQSTP);
if (mtflag)
f_print(fout,
- "\tif (%s > 0 && !svc_sendreply(%s, xdr_%s, (char *)&%s)) {\n",
+ "\tif (%s > 0 && !svc_sendreply(%s, _xdr_%s, (char *)&%s)) {\n",
RETVAL, TRANSP, RESULT, RESULT);
else
f_print(fout,
- "\tif (%s != NULL && !svc_sendreply(%s, xdr_%s, %s)) {\n",
+ "\tif (%s != NULL && !svc_sendreply(%s, _xdr_%s, %s)) {\n",
RESULT, TRANSP, RESULT, RESULT);
printerr ("systemerr", TRANSP);
@@ -643,7 +643,7 @@ write_program (const definition * def, const char *storage)
{
f_print(fout,"\tif (!");
pvname(def->def_name, vp->vers_num);
- f_print(fout,"_freeresult (%s, xdr_%s, (caddr_t) &%s))\n",
+ f_print(fout,"_freeresult (%s, _xdr_%s, (caddr_t) &%s))\n",
TRANSP, RESULT, RESULT);
(void) sprintf(_errbuf, "unable to free results");
print_err_message("\t\t");
@@ -664,7 +664,7 @@ static void
printif (const char *proc, const char *transp, const char *prefix,
const char *arg)
{
- f_print (fout, "\tif (!svc_%s (%s, xdr_%s, %s%s)) {\n",
+ f_print (fout, "\tif (!svc_%s (%s, _xdr_%s, %s%s)) {\n",
proc, transp, arg, prefix, arg);
}
diff --git a/sysdeps/unix/sysv/linux/alpha/setfpucw.c b/sysdeps/unix/sysv/linux/alpha/setfpucw.c
index 9133c81..5e74c35 100644
--- a/sysdeps/unix/sysv/linux/alpha/setfpucw.c
+++ b/sysdeps/unix/sysv/linux/alpha/setfpucw.c
@@ -1,5 +1,5 @@
/* Set FP exception mask and rounding mode.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,7 +41,7 @@ wrfpcr (unsigned long fpcr)
void
-__setfpucw (unsigned short fpu_control)
+__setfpucw (fpu_control_t fpu_control)
{
unsigned long fpcr = 0, fpcw = 0;