Changes between Version 5 and Version 6 of doc/maths/remez/tutorial-fixing-parameters


Ignore:
Timestamp:
Jan 9, 2012, 11:38:19 PM (9 years ago)
Author:
sam
Comment:

fix tutorial for upcoming LolRemez 0.2

Legend:

Unmodified
Added
Removed
Modified
  • doc/maths/remez/tutorial-fixing-parameters

    v5 v6  
    1313{{{
    1414#!cpp
    15 const double a1 = 9.999999766327004083636926544075452569800e-1;
     15const double a1 = 9.999999765898820673279342160490060830302e-1;
    1616}}}
    1717
     
    6868{
    6969    RemezSolver<3, real> solver;
    70     solver.Run("1e-1000", real::R_PI_2 * real::R_PI_2, f, g, 30);
     70    solver.Run("1e-1000", real::R_PI_2 * real::R_PI_2, f, g, 40);
    7171    return 0;
    7272}
     
    8787
    8888{{{
    89 Final error: 4.613764035583927492630791542066631050746e-9
     89Step 8 error: 4.618689007546850899022101933442449327546e-9
    9090Polynomial estimate:
    91 x**0*-1.666665708792613295297026208726412532085e-1
    92 +x**1*8.333017134192478312472752663154642556843e-3
    93 +x**2*-1.980660618990173078599247774582918018345e-4
    94 +x**3*2.600038299369332084157603784882057661080e-6
     91x**0*-1.666665709650470145824129400050267289858e-1
     92+x**1*8.333017291562218127986291618761571373087e-3
     93+x**2*-1.980661520135080504411629636078917643846e-4
     94+x**3*2.600054767890361277123254766503271638682e-6
    9595}}}
    9696
     
    101101double fastsin2(double x)
    102102{
    103     const double a3 = -1.666665708792613295297026208726412532085e-1;
    104     const double a5 = 8.333017134192478312472752663154642556843e-3;
    105     const double a7 = -1.980660618990173078599247774582918018345e-4;
    106     const double a9 = 2.600038299369332084157603784882057661080e-6;
     103    const double a3 = -1.666665709650470145824129400050267289858e-1;
     104    const double a5 = 8.333017291562218127986291618761571373087e-3;
     105    const double a7 = -1.980661520135080504411629636078917643846e-4;
     106    const double a9 = 2.600054767890361277123254766503271638682e-6;
    107107
    108108    return x + x*x*x * (a3 + x*x * (a5 + x*x * (a7 + x*x * a9))));