Added some prints
This commit is contained in:
parent
24c59f9f68
commit
b09805786d
|
@ -38,6 +38,8 @@ testsqrt()
|
||||||
double x, val;
|
double x, val;
|
||||||
extern double sqrt();
|
extern double sqrt();
|
||||||
|
|
||||||
|
printf("testing sqrt ... \n");
|
||||||
|
|
||||||
dotest("sqrt(%.1f)", 2.0, sqrt(2.0), SQRT2);
|
dotest("sqrt(%.1f)", 2.0, sqrt(2.0), SQRT2);
|
||||||
dotest("sqrt(%.1f)", 10.0, sqrt(10.0), SQRT10);
|
dotest("sqrt(%.1f)", 10.0, sqrt(10.0), SQRT10);
|
||||||
|
|
||||||
|
@ -61,6 +63,8 @@ testtrig()
|
||||||
double x;
|
double x;
|
||||||
extern double sin(), cos(), tan(), asin(), acos(), atan(), fabs();
|
extern double sin(), cos(), tan(), asin(), acos(), atan(), fabs();
|
||||||
|
|
||||||
|
printf("testing sin, cos, tan, asin, acos, atan ... \n");
|
||||||
|
|
||||||
dotest("sin(0)", 0.0, sin(0.0), SIN0);
|
dotest("sin(0)", 0.0, sin(0.0), SIN0);
|
||||||
dotest("sin(pi/24)", M_PI/24 , sin(M_PI/24), SINPI_24);
|
dotest("sin(pi/24)", M_PI/24 , sin(M_PI/24), SINPI_24);
|
||||||
dotest("sin(pi/16)", M_PI/16 , sin(M_PI/16), SINPI_16);
|
dotest("sin(pi/16)", M_PI/16 , sin(M_PI/16), SINPI_16);
|
||||||
|
@ -129,6 +133,7 @@ testexplog()
|
||||||
extern double exp(), log();
|
extern double exp(), log();
|
||||||
double x;
|
double x;
|
||||||
|
|
||||||
|
printf("testing exp and log ...\n");
|
||||||
dotest("exp(%.2f)", -1.0, exp(-1.0), EXPMIN1);
|
dotest("exp(%.2f)", -1.0, exp(-1.0), EXPMIN1);
|
||||||
dotest("exp(%.2f)", -0.25, exp(-0.25), EXPMIN1_4);
|
dotest("exp(%.2f)", -0.25, exp(-0.25), EXPMIN1_4);
|
||||||
dotest("exp(%.2f)", 0.0, exp(0.0), EXP0);
|
dotest("exp(%.2f)", 0.0, exp(0.0), EXP0);
|
||||||
|
@ -151,6 +156,7 @@ testgamma()
|
||||||
double x, xfac;
|
double x, xfac;
|
||||||
extern double gamma(), exp();
|
extern double gamma(), exp();
|
||||||
|
|
||||||
|
printf("testing gamma ...\n");
|
||||||
for (x = 1.0, xfac = 1.0; x < 30.0; x += 1.0) {
|
for (x = 1.0, xfac = 1.0; x < 30.0; x += 1.0) {
|
||||||
dotest("exp(gamma(%.2f))", x, exp(gamma(x)), xfac);
|
dotest("exp(gamma(%.2f))", x, exp(gamma(x)), xfac);
|
||||||
xfac *= x;
|
xfac *= x;
|
||||||
|
@ -172,6 +178,8 @@ testbessel()
|
||||||
extern char *sprintf();
|
extern char *sprintf();
|
||||||
char buf[100];
|
char buf[100];
|
||||||
|
|
||||||
|
printf("testing bessel ...\n");
|
||||||
|
|
||||||
dotest("j0(pi/4)", M_PI_4, j0(M_PI_4), J0__PI_4);
|
dotest("j0(pi/4)", M_PI_4, j0(M_PI_4), J0__PI_4);
|
||||||
dotest("j0(pi/2)", M_PI_2, j0(M_PI_2), J0__PI_2);
|
dotest("j0(pi/2)", M_PI_2, j0(M_PI_2), J0__PI_2);
|
||||||
dotest("j1(pi/4)", M_PI_4, j1(M_PI_4), J1__PI_4);
|
dotest("j1(pi/4)", M_PI_4, j1(M_PI_4), J1__PI_4);
|
||||||
|
|
Loading…
Reference in a new issue