Changes between Version 7 and Version 8 of doc/maths/remez/tutorial-relative-error


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

fix tutorial for upcoming LolRemez 0.2

Legend:

Unmodified
Added
Removed
Modified
  • doc/maths/remez/tutorial-relative-error

    v7 v8  
    4040{
    4141    RemezSolver<4, real> solver;
    42     solver.Run(-1, 1, f, g, 30);
     42    solver.Run(-1, 1, f, g, 40);
    4343    return 0;
    4444}
     
    6666
    6767{{{
    68 Final error: 5.013601837829611832543456624618162324553e-4
     68Step 8 error: 5.030406895171767736787912690964980879985e-4
    6969Polynomial estimate:
    70 x**0*9.996300117834416472580281524513498806018e-1
    71 +x**1*9.979375106869197460757909002367767916720e-1
    72 +x**2*5.028987713562873328002723059456010884108e-1
    73 +x**3*1.764900437662188117750392851519785741686e-1
    74 +x**4*3.996265258908758676733711372875779522269e-2
     70x**0*9.996278957172137756013002477405568253404e-1
     71+x**1*9.979387291070364307450237392251445288594e-1
     72+x**2*5.028986508540491482566165849167001609232e-1
     73+x**3*1.764862321902469630550896534647276819692e-1
     74+x**4*3.996291422520886755278730528311966596433e-2
    7575}}}
    7676
     
    8181double fastexp2(double x)
    8282{
    83     const double a0 = 9.996300117834416472580281524513498806018e-1;
    84     const double a1 = 9.979375106869197460757909002367767916720e-1;
    85     const double a2 = 5.028987713562873328002723059456010884108e-1;
    86     const double a3 = 1.764900437662188117750392851519785741686e-1;
    87     const double a4 = 3.996265258908758676733711372875779522269e-2;
     83    const double a0 = 9.996278957172137756013002477405568253404e-1;
     84    const double a1 = 9.979387291070364307450237392251445288594e-1;
     85    const double a2 = 5.028986508540491482566165849167001609232e-1;
     86    const double a3 = 1.764862321902469630550896534647276819692e-1;
     87    const double a4 = 3.996291422520886755278730528311966596433e-2;
    8888
    8989    return a0 + x * (a1 + x * (a2 + x * (a3 + x * a4)));