Ignore:
Timestamp:
Oct 6, 2011, 6:55:47 PM (11 years ago)
Author:
sam
Message:

test: more Remez exchange experimentations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/math/remez.cpp

    r1011 r1012  
    3232    static real const b2 = real(1) / real(120);
    3333    real y = sqrt(x);
    34     if (!y)
    35         return b2;
    36     return ((sin(y) / y - a0) / x - a1) / x;
     34    return sin(y) / y;
    3735}
    3836
     
    4442int main(int argc, char **argv)
    4543{
    46     RemezSolver<3> solver;
     44    RemezSolver<6> solver;
    4745    //solver.Run(0, 1, myfun, myfun, 15);
    48     solver.Run(0, real::R_PI * real::R_PI >> 2, myfun, myfun, 15);
     46    solver.Run(exp((real)-100), real::R_PI * real::R_PI >> 2, myfun, myfun, 15);
    4947    //solver.Run(-1, 1, myfun, myfun, 15);
    5048    //solver.Run(0, real::R_PI * real::R_PI >> 4, myfun, myfun, 15);
Note: See TracChangeset for help on using the changeset viewer.