Changes between Version 6 and Version 7 of doc/maths/remez/tutorialchangingvariables
 Timestamp:
 Jan 9, 2012, 11:36:02 PM (8 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

doc/maths/remez/tutorialchangingvariables
v6 v7 86 86 { 87 87 RemezSolver<4, real> solver; 88 solver.Run("1e1000", real::R_PI_2 * real::R_PI_2, f, g, 30);88 solver.Run("1e1000", real::R_PI_2 * real::R_PI_2, f, g, 40); 89 89 return 0; 90 90 } … … 108 108 109 109 {{{ 110 Final error: 3.325865455853290966410311141826746048362e9110 Step 8 error: 3.338112377353099148424378937190071485401e9 111 111 Polynomial estimate: 112 x**0*9.99999976 6327004083636926544075452569800e1113 +x**1*1.66666476 0824996710860650028807010146838e1114 +x**2*8.332899 259989864744007300626168117151845e3115 +x**3*1.98008 6431068323521164072562726168585360e4116 +x**4*2.5904 26526311305534315155685065532698973e6112 x**0*9.999999765898820673279342160490060830302e1 113 +x**1*1.666664763463971252758602707042821974958e1 114 +x**2*8.332899823351751253473706862398940753675e3 115 +x**3*1.980089776279543126829999863143134719418e4 116 +x**4*2.590488500536052274124208263889095025208e6 117 117 }}} 118 118 … … 123 123 double fastsin(double x) 124 124 { 125 const double a1 = 9.99999976 6327004083636926544075452569800e1;126 const double a3 = 1.66666476 0824996710860650028807010146838e1;127 const double a5 = 8.332899 259989864744007300626168117151845e3;128 const double a7 = 1.98008 6431068323521164072562726168585360e4;129 const double a9 = 2.5904 26526311305534315155685065532698973e6;125 const double a1 = 9.999999765898820673279342160490060830302e1; 126 const double a3 = 1.666664763463971252758602707042821974958e1; 127 const double a5 = 8.332899823351751253473706862398940753675e3; 128 const double a7 = 1.980089776279543126829999863143134719418e4; 129 const double a9 = 2.590488500536052274124208263889095025208e6; 130 130 131 131 return x * (a1 + x*x * (a3 + x*x * (a5 + x*x * (a7 + x*x * a9)))); … … 137 137 == Analysing the results == 138 138 139 The obtained polynomial needs '''5 constants''' for a maximum error of about '''3.3 259e9''' over [π/2; π/2]. The real 9th degree minimax polynomial on [π/2; π/2] needs '''10 constants''' for a maximum error of about… '''3.3259e9'''!139 The obtained polynomial needs '''5 constants''' for a maximum error of about '''3.3381e9''' over [π/2; π/2]. The real 9th degree minimax polynomial on [π/2; π/2] needs '''10 constants''' for a maximum error of about… '''3.3381e9'''! 140 140 141 141 [[Image(erroreven.png, nolink)]]