Changeset 1014 for trunk/test/math/remez.cpp
 Timestamp:
 Oct 10, 2011, 3:33:15 AM (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/math/remez.cpp
r1012 r1014 27 27 static real myfun(real const &x) 28 28 { 29 static real const a0 = real::R_1;30 static real const a1 = real(11184811) >> 26;31 static real const b1 = real(1) / real(6);32 static real const b2 = real(1) / real(120);33 29 real y = sqrt(x); 34 return sin(y) / y;30 return (sin(y)  y) / (x * y); 35 31 } 36 32 37 33 static real myerr(real const &x) 38 34 { 39 return real::R_1; 35 real y = sqrt(x); 36 return re(x * y); 40 37 } 41 38 42 int main( int argc, char **argv)39 int main(void) 43 40 { 44 RemezSolver<6> solver; 45 //solver.Run(0, 1, myfun, myfun, 15); 46 solver.Run(exp((real)100), real::R_PI * real::R_PI >> 2, myfun, myfun, 15); 47 //solver.Run(1, 1, myfun, myfun, 15); 48 //solver.Run(0, real::R_PI * real::R_PI >> 4, myfun, myfun, 15); 41 RemezSolver<4> solver; 42 solver.Run(real::R_1 >> 400, real::R_PI_2 * real::R_PI_2, myfun, myerr, 15); 49 43 50 44 return EXIT_SUCCESS;
Note: See TracChangeset
for help on using the changeset viewer.