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

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

fix tutorial for upcoming LolRemez 0.2

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

 v7 { RemezSolver<4, real> solver; solver.Run(-1, 1, f, g, 30); solver.Run(-1, 1, f, g, 40); return 0; } {{{ Final error: 5.013601837829611832543456624618162324553e-4 Step 8 error: 5.030406895171767736787912690964980879985e-4 Polynomial estimate: x**0*9.996300117834416472580281524513498806018e-1 +x**1*9.979375106869197460757909002367767916720e-1 +x**2*5.028987713562873328002723059456010884108e-1 +x**3*1.764900437662188117750392851519785741686e-1 +x**4*3.996265258908758676733711372875779522269e-2 x**0*9.996278957172137756013002477405568253404e-1 +x**1*9.979387291070364307450237392251445288594e-1 +x**2*5.028986508540491482566165849167001609232e-1 +x**3*1.764862321902469630550896534647276819692e-1 +x**4*3.996291422520886755278730528311966596433e-2 }}} double fastexp2(double x) { const double a0 = 9.996300117834416472580281524513498806018e-1; const double a1 = 9.979375106869197460757909002367767916720e-1; const double a2 = 5.028987713562873328002723059456010884108e-1; const double a3 = 1.764900437662188117750392851519785741686e-1; const double a4 = 3.996265258908758676733711372875779522269e-2; const double a0 = 9.996278957172137756013002477405568253404e-1; const double a1 = 9.979387291070364307450237392251445288594e-1; const double a2 = 5.028986508540491482566165849167001609232e-1; const double a3 = 1.764862321902469630550896534647276819692e-1; const double a4 = 3.996291422520886755278730528311966596433e-2; return a0 + x * (a1 + x * (a2 + x * (a3 + x * a4)));