2 #include <UnitTest++.h>
14 for(
int i=0; i < 4096; ++i )
19 sprintf( buf,
" %.16e", x );
21 double y =
FFmtRead( buf, &j, 128, &lgEol );
27 double x =
FFmtRead(
"HYDROGEN\t1", &j, 10, &lgEol );
28 CHECK( !lgEol && x == 1. );
30 x =
FFmtRead(
"HYDROGEN\t1", &j, 10, &lgEol );
31 CHECK( !lgEol && x == 1. );
35 CHECK( lgEol && x == 0. );
38 CHECK( lgEol && x == 0. );
41 CHECK( lgEol && x == 0. );
47 for(
int i=0; i < 2048; ++i )
51 CHECK(
fp_equal(
powi(arg1,arg2), pow(arg1,(
double)arg2),
max(abs(arg2),3) ) );
58 for(
int i=0; i < 1024; ++i )
64 CHECK(
fp_equal(
powpq(arg1,arg2,arg3), pow(arg1,(
double)arg2/(
double)arg3), 128 ) );
66 for(
int i=0; i < 1024; ++i )
71 CHECK(
fp_equal(
powpq(arg1,arg2,arg3), pow(arg1,(
double)arg2/(
double)arg3), 128 ) );
unsigned long genrand_int32()
bool fp_equal(sys_float x, sys_float y, int n=3)
double powi(double, long int)
double powpq(double x, int p, int q)
void init_genrand(unsigned long s)
double FFmtRead(const char *chCard, long int *ipnt, long int last, bool *lgEOL)