21 TEST(TestLogFactorial)
33 complex<double> y =
cdgamma( complex<double>(1.,0.) );
35 y =
cdgamma( complex<double>(2.,0.) );
37 y =
cdgamma( complex<double>(11.,0.) );
39 y =
cdgamma( complex<double>(-0.5,0.) );
40 CHECK(
fp_equal( y.real(), -3.544907701811032054596334966682277e0, 10 ) &&
42 y =
cdgamma( complex<double>(0.,1.) );
43 CHECK(
fp_equal( y.real(), -1.549498283018106851249551304838863e-1, 10 ) &&
44 fp_equal( y.imag(), -4.980156681183560427136911174621973e-1, 10 ) );
45 y =
cdgamma( complex<double>(-1.,-2.) );
46 CHECK(
fp_equal( y.real(), -3.23612885501927256868232032760969e-2, 30 ) &&
47 fp_equal( y.imag(), -1.122942423463261735043406872030743e-2, 30 ) );
236 CHECK(
fp_equal_tol(
erf(1.e-10), 1.1283791671081724525e-10, 3.e-21 ) );
315 for(
int i=0; i < 9; ++i )
318 for(
int i=0; i < NP; ++i )
325 for(
int i=1; i < NP; ++i )
326 integral += (y[i]+y[i-1])*(v[i]-v[i-1]);
328 integral +=
realnum(2.)*v[NP-1]*y[NP-1];
420 for(
int i=0; i < 9; ++i )
423 for(
int i=0; i < NP; ++i )
430 for(
int i=1; i < NP; ++i )
431 integral += (y[i]+y[i-1])*(v[i]-v[i-1]);
433 integral +=
realnum(2.)*v[NP-1]*y[NP-1];
446 CHECK(
MD5string( test ) ==
"d41d8cd98f00b204e9800998ecf8427e" );
450 test =
"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh";
451 CHECK( test.length() == 55 );
452 CHECK(
MD5string( test ) ==
"426ec4ac35ad38d125f6efb39da03098" );
453 test =
"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh";
454 CHECK( test.length() == 56 );
455 CHECK(
MD5string( test ) ==
"d03607b2c89adc0c4abf5a0f1d9e40c9" );
456 test =
"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh";
457 CHECK( test.length() == 57 );
458 CHECK(
MD5string( test ) ==
"bac1b47748411cb6eee0cae3befb8377" );
459 string test64 =
"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh";
460 test = test64 +
"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh";
461 CHECK( test.length() == 64+55 );
462 CHECK(
MD5string( test ) ==
"10d49aad1fc69976376fbe7c8c5ed118" );
463 test = test64 +
"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh";
464 CHECK( test.length() == 64+56 );
465 CHECK(
MD5string( test ) ==
"61ec7da14576f3b585038c6d72cd5bd5" );
466 test = test64 +
"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh";
467 CHECK( test.length() == 64+57 );
468 CHECK(
MD5string( test ) ==
"f17a0475a26d0930e2a35bb320c10e0d" );
471 CHECK(
MD5string( test ) ==
"0256b9cea63bc1f97b8c5aea92c24a98" );
bool fp_equal(sys_float x, sys_float y, int n=3)
bool fp_equal_tol(sys_float x, sys_float y, sys_float tol)
UNUSED const double EULER
UNUSED const double SQRTPI
double bessel_j1(double x)
double bessel_k1_scaled(double x)
double bessel_k0(double x)
double bessel_i1_scaled(double x)
double bessel_yn(int n, double x)
double bessel_y0(double x)
double bessel_k0_scaled(double x)
double bessel_jn(int n, double x)
string MD5string(const string &str)
double lfactorial(long n)
complex< double > cdgamma(complex< double > x)
double bessel_i1(double x)
double bessel_i0_scaled(double x)
double bessel_j0(double x)
double bessel_i0(double x)
double bessel_k1(double x)
double expn(int n, double x)
double bessel_y1(double x)
static const unsigned int NMD5
void VoigtH(realnum a, const realnum v[], realnum y[], int n)
void VoigtU(realnum a, const realnum v[], realnum y[], int n)