Changes between Version 6 and Version 7 of doc/maths/remez/tutorial-changing-variables


Ignore:
Timestamp:
Jan 9, 2012, 11:36:02 PM (8 years ago)
Author:
sam
Comment:

fix tutorial for upcoming LolRemez 0.2

Legend:

Unmodified
Added
Removed
Modified
  • doc/maths/remez/tutorial-changing-variables

    v6 v7  
    8686{
    8787    RemezSolver<4, real> solver;
    88     solver.Run("1e-1000", real::R_PI_2 * real::R_PI_2, f, g, 30);
     88    solver.Run("1e-1000", real::R_PI_2 * real::R_PI_2, f, g, 40);
    8989    return 0;
    9090}
     
    108108
    109109{{{
    110 Final error: 3.325865455853290966410311141826746048362e-9
     110Step 8 error: 3.338112377353099148424378937190071485401e-9
    111111Polynomial estimate:
    112 x**0*9.999999766327004083636926544075452569800e-1
    113 +x**1*-1.666664760824996710860650028807010146838e-1
    114 +x**2*8.332899259989864744007300626168117151845e-3
    115 +x**3*-1.980086431068323521164072562726168585360e-4
    116 +x**4*2.590426526311305534315155685065532698973e-6
     112x**0*9.999999765898820673279342160490060830302e-1
     113+x**1*-1.666664763463971252758602707042821974958e-1
     114+x**2*8.332899823351751253473706862398940753675e-3
     115+x**3*-1.980089776279543126829999863143134719418e-4
     116+x**4*2.590488500536052274124208263889095025208e-6
    117117}}}
    118118
     
    123123double fastsin(double x)
    124124{
    125     const double a1 = 9.999999766327004083636926544075452569800e-1;
    126     const double a3 = -1.666664760824996710860650028807010146838e-1;
    127     const double a5 = 8.332899259989864744007300626168117151845e-3;
    128     const double a7 = -1.980086431068323521164072562726168585360e-4;
    129     const double a9 = 2.590426526311305534315155685065532698973e-6;
     125    const double a1 = 9.999999765898820673279342160490060830302e-1;
     126    const double a3 = -1.666664763463971252758602707042821974958e-1;
     127    const double a5 = 8.332899823351751253473706862398940753675e-3;
     128    const double a7 = -1.980089776279543126829999863143134719418e-4;
     129    const double a9 = 2.590488500536052274124208263889095025208e-6;
    130130
    131131    return x * (a1 + x*x * (a3 + x*x * (a5 + x*x * (a7 + x*x * a9))));
     
    137137== Analysing the results ==
    138138
    139 The obtained polynomial needs '''5 constants''' for a maximum error of about '''3.3259e-9''' over [-π/2; π/2]. The real 9th degree minimax polynomial on [-π/2; π/2] needs '''10 constants''' for a maximum error of about… '''3.3259e-9'''!
     139The obtained polynomial needs '''5 constants''' for a maximum error of about '''3.3381e-9''' over [-π/2; π/2]. The real 9th degree minimax polynomial on [-π/2; π/2] needs '''10 constants''' for a maximum error of about… '''3.3381e-9'''!
    140140
    141141[[Image(error-even.png, nolink)]]