Changeset View
Changeset View
Standalone View
Standalone View
lib/msun/tests/cexp_test.c
Show All 27 Lines | |||||||||
* Tests for corner cases in cexp*(). | * Tests for corner cases in cexp*(). | ||||||||
*/ | */ | ||||||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||||||
#include <sys/param.h> | #include <sys/param.h> | ||||||||
#include <assert.h> | |||||||||
#include <complex.h> | #include <complex.h> | ||||||||
#include <fenv.h> | #include <fenv.h> | ||||||||
#include <float.h> | #include <float.h> | ||||||||
#include <math.h> | #include <math.h> | ||||||||
#include <stdio.h> | #include <stdio.h> | ||||||||
#include "test-utils.h" | #include "test-utils.h" | ||||||||
Show All 13 Lines | |||||||||
* | * | ||||||||
* XXX The volatile here is to avoid gcc's bogus constant folding and work | * XXX The volatile here is to avoid gcc's bogus constant folding and work | ||||||||
* around the lack of support for the FENV_ACCESS pragma. | * around the lack of support for the FENV_ACCESS pragma. | ||||||||
*/ | */ | ||||||||
#define test_t(type, func, z, result, exceptmask, excepts, checksign) \ | #define test_t(type, func, z, result, exceptmask, excepts, checksign) \ | ||||||||
do { \ | do { \ | ||||||||
volatile long double complex _d = z; \ | volatile long double complex _d = z; \ | ||||||||
volatile type complex _r = result; \ | volatile type complex _r = result; \ | ||||||||
assert(feclearexcept(FE_ALL_EXCEPT) == 0); \ | ATF_REQUIRE_EQ(0, feclearexcept(FE_ALL_EXCEPT)); \ | ||||||||
assert(cfpequal_cs((func)(_d), (_r), (checksign))); \ | ATF_CHECK(cfpequal_cs((func)(_d), (_r), (checksign))); \ | ||||||||
assert(((void)(func), fetestexcept(exceptmask) == (excepts))); \ | CHECK_FP_EXCEPTIONS_MSG(excepts, exceptmask, "for %s(%s)", \ | ||||||||
#func, #z); \ | |||||||||
} while (0) | } while (0) | ||||||||
#define test(func, z, result, exceptmask, excepts, checksign) \ | #define test(func, z, result, exceptmask, excepts, checksign) \ | ||||||||
test_t(double, func, z, result, exceptmask, excepts, checksign) | test_t(double, func, z, result, exceptmask, excepts, checksign) | ||||||||
#define test_f(func, z, result, exceptmask, excepts, checksign) \ | #define test_f(func, z, result, exceptmask, excepts, checksign) \ | ||||||||
test_t(float, func, z, result, exceptmask, excepts, checksign) | test_t(float, func, z, result, exceptmask, excepts, checksign) | ||||||||
/* Test within a given tolerance. */ | /* Test within a given tolerance. */ | ||||||||
#define test_tol(func, z, result, tol) do { \ | #define test_tol(func, z, result, tol) do { \ | ||||||||
volatile long double complex _d = z; \ | volatile long double complex _d = z; \ | ||||||||
assert(cfpequal_tol((func)(_d), (result), (tol), \ | ATF_CHECK(cfpequal_tol((func)(_d), (result), (tol), \ | ||||||||
FPE_ABS_ZERO | CS_BOTH)); \ | FPE_ABS_ZERO | CS_BOTH)); \ | ||||||||
} while (0) | } while (0) | ||||||||
/* Test all the functions that compute cexp(x). */ | /* Test all the functions that compute cexp(x). */ | ||||||||
#define testall(x, result, exceptmask, excepts, checksign) do { \ | #define testall(x, result, exceptmask, excepts, checksign) do { \ | ||||||||
test(cexp, x, result, exceptmask, excepts, checksign); \ | test(cexp, x, result, exceptmask, excepts, checksign); \ | ||||||||
test_f(cexpf, x, result, exceptmask, excepts, checksign); \ | test_f(cexpf, x, result, exceptmask, excepts, checksign); \ | ||||||||
} while (0) | } while (0) | ||||||||
/* | /* | ||||||||
* Test all the functions that compute cexp(x), within a given tolerance. | * Test all the functions that compute cexp(x), within a given tolerance. | ||||||||
* The tolerance is specified in ulps. | * The tolerance is specified in ulps. | ||||||||
*/ | */ | ||||||||
#define testall_tol(x, result, tol) do { \ | #define testall_tol(x, result, tol) do { \ | ||||||||
test_tol(cexp, x, result, tol * DBL_ULP()); \ | test_tol(cexp, x, result, tol * DBL_ULP()); \ | ||||||||
test_tol(cexpf, x, result, tol * FLT_ULP()); \ | test_tol(cexpf, x, result, tol * FLT_ULP()); \ | ||||||||
} while (0) | } while (0) | ||||||||
/* Various finite non-zero numbers to test. */ | /* Various finite non-zero numbers to test. */ | ||||||||
static const float finites[] = | static const float finites[] = | ||||||||
{ -42.0e20, -1.0, -1.0e-10, -0.0, 0.0, 1.0e-10, 1.0, 42.0e20 }; | { -42.0e20, -1.0, -1.0e-10, -0.0, 0.0, 1.0e-10, 1.0, 42.0e20 }; | ||||||||
/* Tests for 0 */ | /* Tests for 0 */ | ||||||||
static void | ATF_TC_WITHOUT_HEAD(zero); | ||||||||
test_zero(void) | ATF_TC_BODY(zero, tc) | ||||||||
{ | { | ||||||||
/* cexp(0) = 1, no exceptions raised */ | /* cexp(0) = 1, no exceptions raised */ | ||||||||
testall(0.0, 1.0, ALL_STD_EXCEPT, 0, 1); | testall(0.0, 1.0, ALL_STD_EXCEPT, 0, 1); | ||||||||
testall(-0.0, 1.0, ALL_STD_EXCEPT, 0, 1); | testall(-0.0, 1.0, ALL_STD_EXCEPT, 0, 1); | ||||||||
testall(CMPLXL(0.0, -0.0), CMPLXL(1.0, -0.0), ALL_STD_EXCEPT, 0, 1); | testall(CMPLXL(0.0, -0.0), CMPLXL(1.0, -0.0), ALL_STD_EXCEPT, 0, 1); | ||||||||
testall(CMPLXL(-0.0, -0.0), CMPLXL(1.0, -0.0), ALL_STD_EXCEPT, 0, 1); | testall(CMPLXL(-0.0, -0.0), CMPLXL(1.0, -0.0), ALL_STD_EXCEPT, 0, 1); | ||||||||
} | } | ||||||||
/* | /* | ||||||||
* Tests for NaN. The signs of the results are indeterminate unless the | * Tests for NaN. The signs of the results are indeterminate unless the | ||||||||
* imaginary part is 0. | * imaginary part is 0. | ||||||||
*/ | */ | ||||||||
static void | ATF_TC_WITHOUT_HEAD(nan); | ||||||||
test_nan(void) | ATF_TC_BODY(nan, tc) | ||||||||
{ | { | ||||||||
unsigned i; | unsigned i; | ||||||||
/* cexp(x + NaNi) = NaN + NaNi and optionally raises invalid */ | /* cexp(x + NaNi) = NaN + NaNi and optionally raises invalid */ | ||||||||
/* cexp(NaN + yi) = NaN + NaNi and optionally raises invalid (|y|>0) */ | /* cexp(NaN + yi) = NaN + NaNi and optionally raises invalid (|y|>0) */ | ||||||||
for (i = 0; i < nitems(finites); i++) { | for (i = 0; i < nitems(finites); i++) { | ||||||||
printf("# Run %d..\n", i); | |||||||||
testall(CMPLXL(finites[i], NAN), CMPLXL(NAN, NAN), | testall(CMPLXL(finites[i], NAN), CMPLXL(NAN, NAN), | ||||||||
ngie: printfs like this can be deleted since they exist purely for outputting debug information via… | |||||||||
ALL_STD_EXCEPT & ~FE_INVALID, 0, 0); | ALL_STD_EXCEPT & ~FE_INVALID, 0, 0); | ||||||||
if (finites[i] == 0.0) | if (finites[i] == 0.0) | ||||||||
continue; | continue; | ||||||||
/* XXX FE_INEXACT shouldn't be raised here */ | /* XXX FE_INEXACT shouldn't be raised here */ | ||||||||
testall(CMPLXL(NAN, finites[i]), CMPLXL(NAN, NAN), | testall(CMPLXL(NAN, finites[i]), CMPLXL(NAN, NAN), | ||||||||
ALL_STD_EXCEPT & ~(FE_INVALID | FE_INEXACT), 0, 0); | ALL_STD_EXCEPT & ~(FE_INVALID | FE_INEXACT), 0, 0); | ||||||||
} | } | ||||||||
/* cexp(NaN +- 0i) = NaN +- 0i */ | /* cexp(NaN +- 0i) = NaN +- 0i */ | ||||||||
testall(CMPLXL(NAN, 0.0), CMPLXL(NAN, 0.0), ALL_STD_EXCEPT, 0, 1); | testall(CMPLXL(NAN, 0.0), CMPLXL(NAN, 0.0), ALL_STD_EXCEPT, 0, 1); | ||||||||
testall(CMPLXL(NAN, -0.0), CMPLXL(NAN, -0.0), ALL_STD_EXCEPT, 0, 1); | testall(CMPLXL(NAN, -0.0), CMPLXL(NAN, -0.0), ALL_STD_EXCEPT, 0, 1); | ||||||||
/* cexp(inf + NaN i) = inf + nan i */ | /* cexp(inf + NaN i) = inf + nan i */ | ||||||||
testall(CMPLXL(INFINITY, NAN), CMPLXL(INFINITY, NAN), | testall(CMPLXL(INFINITY, NAN), CMPLXL(INFINITY, NAN), | ||||||||
ALL_STD_EXCEPT, 0, 0); | ALL_STD_EXCEPT, 0, 0); | ||||||||
/* cexp(-inf + NaN i) = 0 */ | /* cexp(-inf + NaN i) = 0 */ | ||||||||
testall(CMPLXL(-INFINITY, NAN), CMPLXL(0.0, 0.0), | testall(CMPLXL(-INFINITY, NAN), CMPLXL(0.0, 0.0), | ||||||||
ALL_STD_EXCEPT, 0, 0); | ALL_STD_EXCEPT, 0, 0); | ||||||||
/* cexp(NaN + NaN i) = NaN + NaN i */ | /* cexp(NaN + NaN i) = NaN + NaN i */ | ||||||||
testall(CMPLXL(NAN, NAN), CMPLXL(NAN, NAN), | testall(CMPLXL(NAN, NAN), CMPLXL(NAN, NAN), | ||||||||
ALL_STD_EXCEPT, 0, 0); | ALL_STD_EXCEPT, 0, 0); | ||||||||
} | } | ||||||||
static void | ATF_TC_WITHOUT_HEAD(inf); | ||||||||
test_inf(void) | ATF_TC_BODY(inf, tc) | ||||||||
{ | { | ||||||||
unsigned i; | unsigned i; | ||||||||
/* cexp(x + inf i) = NaN + NaNi and raises invalid */ | /* cexp(x + inf i) = NaN + NaNi and raises invalid */ | ||||||||
for (i = 0; i < nitems(finites); i++) { | for (i = 0; i < nitems(finites); i++) { | ||||||||
printf("# Run %d..\n", i); | |||||||||
testall(CMPLXL(finites[i], INFINITY), CMPLXL(NAN, NAN), | testall(CMPLXL(finites[i], INFINITY), CMPLXL(NAN, NAN), | ||||||||
Done Inline Actions
Delete printf. ngie: Delete printf. | |||||||||
ALL_STD_EXCEPT, FE_INVALID, 1); | ALL_STD_EXCEPT, FE_INVALID, 1); | ||||||||
} | } | ||||||||
/* cexp(-inf + yi) = 0 * (cos(y) + sin(y)i) */ | /* cexp(-inf + yi) = 0 * (cos(y) + sin(y)i) */ | ||||||||
/* XXX shouldn't raise an inexact exception */ | /* XXX shouldn't raise an inexact exception */ | ||||||||
testall(CMPLXL(-INFINITY, M_PI_4), CMPLXL(0.0, 0.0), | testall(CMPLXL(-INFINITY, M_PI_4), CMPLXL(0.0, 0.0), | ||||||||
ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); | ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); | ||||||||
testall(CMPLXL(-INFINITY, 3 * M_PI_4), CMPLXL(-0.0, 0.0), | testall(CMPLXL(-INFINITY, 3 * M_PI_4), CMPLXL(-0.0, 0.0), | ||||||||
ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); | ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); | ||||||||
Show All 17 Lines | testall(CMPLXL(INFINITY, 7 * M_PI_4), CMPLXL(INFINITY, -INFINITY), | ||||||||
ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); | ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); | ||||||||
/* cexp(inf + 0i) = inf + 0i */ | /* cexp(inf + 0i) = inf + 0i */ | ||||||||
testall(CMPLXL(INFINITY, 0.0), CMPLXL(INFINITY, 0.0), | testall(CMPLXL(INFINITY, 0.0), CMPLXL(INFINITY, 0.0), | ||||||||
ALL_STD_EXCEPT, 0, 1); | ALL_STD_EXCEPT, 0, 1); | ||||||||
testall(CMPLXL(INFINITY, -0.0), CMPLXL(INFINITY, -0.0), | testall(CMPLXL(INFINITY, -0.0), CMPLXL(INFINITY, -0.0), | ||||||||
ALL_STD_EXCEPT, 0, 1); | ALL_STD_EXCEPT, 0, 1); | ||||||||
} | } | ||||||||
static void | ATF_TC_WITHOUT_HEAD(reals); | ||||||||
test_reals(void) | ATF_TC_BODY(reals, tc) | ||||||||
{ | { | ||||||||
unsigned i; | unsigned i; | ||||||||
for (i = 0; i < nitems(finites); i++) { | for (i = 0; i < nitems(finites); i++) { | ||||||||
/* XXX could check exceptions more meticulously */ | /* XXX could check exceptions more meticulously */ | ||||||||
printf("# Run %d..\n", i); | |||||||||
test(cexp, CMPLXL(finites[i], 0.0), | test(cexp, CMPLXL(finites[i], 0.0), | ||||||||
Done Inline Actions
Delete printf. ngie: Delete printf. | |||||||||
CMPLXL(exp(finites[i]), 0.0), | CMPLXL(exp(finites[i]), 0.0), | ||||||||
FE_INVALID | FE_DIVBYZERO, 0, 1); | FE_INVALID | FE_DIVBYZERO, 0, 1); | ||||||||
test(cexp, CMPLXL(finites[i], -0.0), | test(cexp, CMPLXL(finites[i], -0.0), | ||||||||
CMPLXL(exp(finites[i]), -0.0), | CMPLXL(exp(finites[i]), -0.0), | ||||||||
FE_INVALID | FE_DIVBYZERO, 0, 1); | FE_INVALID | FE_DIVBYZERO, 0, 1); | ||||||||
test_f(cexpf, CMPLXL(finites[i], 0.0), | test_f(cexpf, CMPLXL(finites[i], 0.0), | ||||||||
CMPLXL(expf(finites[i]), 0.0), | CMPLXL(expf(finites[i]), 0.0), | ||||||||
FE_INVALID | FE_DIVBYZERO, 0, 1); | FE_INVALID | FE_DIVBYZERO, 0, 1); | ||||||||
test_f(cexpf, CMPLXL(finites[i], -0.0), | test_f(cexpf, CMPLXL(finites[i], -0.0), | ||||||||
CMPLXL(expf(finites[i]), -0.0), | CMPLXL(expf(finites[i]), -0.0), | ||||||||
FE_INVALID | FE_DIVBYZERO, 0, 1); | FE_INVALID | FE_DIVBYZERO, 0, 1); | ||||||||
} | } | ||||||||
} | } | ||||||||
static void | ATF_TC_WITHOUT_HEAD(imaginaries); | ||||||||
test_imaginaries(void) | ATF_TC_BODY(imaginaries, tc) | ||||||||
{ | { | ||||||||
unsigned i; | unsigned i; | ||||||||
for (i = 0; i < nitems(finites); i++) { | for (i = 0; i < nitems(finites); i++) { | ||||||||
printf("# Run %d..\n", i); | |||||||||
test(cexp, CMPLXL(0.0, finites[i]), | test(cexp, CMPLXL(0.0, finites[i]), | ||||||||
Done Inline Actions
Delete printf. ngie: Delete printf. | |||||||||
CMPLXL(cos(finites[i]), sin(finites[i])), | CMPLXL(cos(finites[i]), sin(finites[i])), | ||||||||
ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); | ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); | ||||||||
test(cexp, CMPLXL(-0.0, finites[i]), | test(cexp, CMPLXL(-0.0, finites[i]), | ||||||||
CMPLXL(cos(finites[i]), sin(finites[i])), | CMPLXL(cos(finites[i]), sin(finites[i])), | ||||||||
ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); | ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); | ||||||||
test_f(cexpf, CMPLXL(0.0, finites[i]), | test_f(cexpf, CMPLXL(0.0, finites[i]), | ||||||||
CMPLXL(cosf(finites[i]), sinf(finites[i])), | CMPLXL(cosf(finites[i]), sinf(finites[i])), | ||||||||
ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); | ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); | ||||||||
test_f(cexpf, CMPLXL(-0.0, finites[i]), | test_f(cexpf, CMPLXL(-0.0, finites[i]), | ||||||||
CMPLXL(cosf(finites[i]), sinf(finites[i])), | CMPLXL(cosf(finites[i]), sinf(finites[i])), | ||||||||
ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); | ALL_STD_EXCEPT & ~FE_INEXACT, 0, 1); | ||||||||
} | } | ||||||||
} | } | ||||||||
static void | ATF_TC_WITHOUT_HEAD(small); | ||||||||
test_small(void) | ATF_TC_BODY(small, tc) | ||||||||
{ | { | ||||||||
static const double tests[] = { | static const double tests[] = { | ||||||||
/* csqrt(a + bI) = x + yI */ | /* csqrt(a + bI) = x + yI */ | ||||||||
/* a b x y */ | /* a b x y */ | ||||||||
1.0, M_PI_4, M_SQRT2 * 0.5 * M_E, M_SQRT2 * 0.5 * M_E, | 1.0, M_PI_4, M_SQRT2 * 0.5 * M_E, M_SQRT2 * 0.5 * M_E, | ||||||||
-1.0, M_PI_4, M_SQRT2 * 0.5 / M_E, M_SQRT2 * 0.5 / M_E, | -1.0, M_PI_4, M_SQRT2 * 0.5 / M_E, M_SQRT2 * 0.5 / M_E, | ||||||||
2.0, M_PI_2, 0.0, M_E * M_E, | 2.0, M_PI_2, 0.0, M_E * M_E, | ||||||||
M_LN2, M_PI, -2.0, 0.0, | M_LN2, M_PI, -2.0, 0.0, | ||||||||
}; | }; | ||||||||
double a, b; | double a, b; | ||||||||
double x, y; | double x, y; | ||||||||
unsigned i; | unsigned i; | ||||||||
for (i = 0; i < nitems(tests); i += 4) { | for (i = 0; i < nitems(tests); i += 4) { | ||||||||
printf("# Run %d..\n", i); | |||||||||
a = tests[i]; | a = tests[i]; | ||||||||
Done Inline Actions
Delete printf. ngie: Delete printf. | |||||||||
b = tests[i + 1]; | b = tests[i + 1]; | ||||||||
x = tests[i + 2]; | x = tests[i + 2]; | ||||||||
y = tests[i + 3]; | y = tests[i + 3]; | ||||||||
test_tol(cexp, CMPLXL(a, b), CMPLXL(x, y), 3 * DBL_ULP()); | test_tol(cexp, CMPLXL(a, b), CMPLXL(x, y), 3 * DBL_ULP()); | ||||||||
/* float doesn't have enough precision to pass these tests */ | /* float doesn't have enough precision to pass these tests */ | ||||||||
if (x == 0 || y == 0) | if (x == 0 || y == 0) | ||||||||
continue; | continue; | ||||||||
test_tol(cexpf, CMPLXL(a, b), CMPLXL(x, y), 1 * FLT_ULP()); | test_tol(cexpf, CMPLXL(a, b), CMPLXL(x, y), 1 * FLT_ULP()); | ||||||||
} | } | ||||||||
} | } | ||||||||
/* Test inputs with a real part r that would overflow exp(r). */ | /* Test inputs with a real part r that would overflow exp(r). */ | ||||||||
static void | ATF_TC_WITHOUT_HEAD(large); | ||||||||
test_large(void) | ATF_TC_BODY(large, tc) | ||||||||
{ | { | ||||||||
test_tol(cexp, CMPLXL(709.79, 0x1p-1074), | test_tol(cexp, CMPLXL(709.79, 0x1p-1074), | ||||||||
CMPLXL(INFINITY, 8.94674309915433533273e-16), DBL_ULP()); | CMPLXL(INFINITY, 8.94674309915433533273e-16), DBL_ULP()); | ||||||||
test_tol(cexp, CMPLXL(1000, 0x1p-1074), | test_tol(cexp, CMPLXL(1000, 0x1p-1074), | ||||||||
CMPLXL(INFINITY, 9.73344457300016401328e+110), DBL_ULP()); | CMPLXL(INFINITY, 9.73344457300016401328e+110), DBL_ULP()); | ||||||||
test_tol(cexp, CMPLXL(1400, 0x1p-1074), | test_tol(cexp, CMPLXL(1400, 0x1p-1074), | ||||||||
CMPLXL(INFINITY, 5.08228858149196559681e+284), DBL_ULP()); | CMPLXL(INFINITY, 5.08228858149196559681e+284), DBL_ULP()); | ||||||||
Show All 9 Lines | ATF_TC_BODY(large, tc) | ||||||||
test_tol(cexpf, CMPLXL(192, 0x1p-149), | test_tol(cexpf, CMPLXL(192, 0x1p-149), | ||||||||
CMPLXL(INFINITY, 3.396809344e+38f), 2 * FLT_ULP()); | CMPLXL(INFINITY, 3.396809344e+38f), 2 * FLT_ULP()); | ||||||||
test_tol(cexpf, CMPLXL(120, 0x1.234568p-120), | test_tol(cexpf, CMPLXL(120, 0x1.234568p-120), | ||||||||
CMPLXL(INFINITY, 1.1163382522e+16f), 2 * FLT_ULP()); | CMPLXL(INFINITY, 1.1163382522e+16f), 2 * FLT_ULP()); | ||||||||
test_tol(cexpf, CMPLXL(170, 0x1.234568p-120), | test_tol(cexpf, CMPLXL(170, 0x1.234568p-120), | ||||||||
CMPLXL(INFINITY, 5.7878851079e+37f), 2 * FLT_ULP()); | CMPLXL(INFINITY, 5.7878851079e+37f), 2 * FLT_ULP()); | ||||||||
} | } | ||||||||
int | ATF_TP_ADD_TCS(tp) | ||||||||
main(void) | |||||||||
{ | { | ||||||||
ATF_TP_ADD_TC(tp, zero); | |||||||||
ATF_TP_ADD_TC(tp, nan); | |||||||||
ATF_TP_ADD_TC(tp, inf); | |||||||||
ATF_TP_ADD_TC(tp, reals); | |||||||||
ATF_TP_ADD_TC(tp, imaginaries); | |||||||||
ATF_TP_ADD_TC(tp, small); | |||||||||
ATF_TP_ADD_TC(tp, large); | |||||||||
Done Inline Actions
Please add an extra newline before this. ngie: Please add an extra newline before this. | |||||||||
printf("1..7\n"); | return (atf_no_error()); | ||||||||
test_zero(); | |||||||||
printf("ok 1 - cexp zero\n"); | |||||||||
test_nan(); | |||||||||
printf("ok 2 - cexp nan\n"); | |||||||||
test_inf(); | |||||||||
printf("ok 3 - cexp inf\n"); | |||||||||
test_reals(); | |||||||||
printf("ok 4 - cexp reals\n"); | |||||||||
test_imaginaries(); | |||||||||
printf("ok 5 - cexp imaginaries\n"); | |||||||||
test_small(); | |||||||||
printf("ok 6 - cexp small\n"); | |||||||||
test_large(); | |||||||||
printf("ok 7 - cexp large\n"); | |||||||||
return (0); | |||||||||
} | } |
printfs like this can be deleted since they exist purely for outputting debug information via TAP.