[Sollya-users] information, features regarding remez and fplll

JonT jtid4576 at uni.sydney.edu.au
Tue Jun 19 07:10:18 CEST 2018


Sylvain,

For the domain, I would take the result from the standard 
range-reduction:  [ sqrt(2)/2 , sqrt(2) ]

Mathematica gave me the following coefficients with associated errors.
[ Can supply the workbook pdf, but at 140KB, but did not want to dump a 
large file to the list. ]

Below is a summary of polynomials, and the coefficients.

thanking you in advance for your assistance,

- JonT


Using Taylor Series

    log(x) = log(1+f)
= f - f^2 / 2 + f^3 / 3 - f^4 / 4 + ...
           ~= f * poly(f)

Taylor Coefficients - O(8) with max relative error of 2.6E-8


log(x) ~= f * ( a[0] + a[1]*f + a[2]*f^2 + ... + a[8]*f^8)

a[] = { 0.99999997418960381750094195424231755858055105934740,
-0.49999987963991822288782882415542687259393150776246,
0.33334185625587841732615277696134349177065419282693,
-0.25002074084943361245967303867589678800118962943012,
0.19956833577044925527574654835233238391428034783858,
-0.16562392742605709080551652512411488414875990684368,
0.14952266077202848789897822170672970345292549356564,
-0.14366845104895980876208121924774190549717824318982,
0.087223597324602808704961423527981359426052365591211 }



But its also possible to consider a rational polynomial approximation in 
$f$.
Rational polynomial approximation typically have fewer terms than simple 
polynomial approximations, and they naturally exploit H/W pipeline.

    log(1+f) = log(1+f)
           ~= f * ratpoly(f)

Rational Polynomial Coefficients - O(2,3) with max relative error of 1.9E-8

log(x) ~= f * ( a[0] + a[1]*f + a[2]*f^2 ) / ( b[0] + b[1]*f + b[2]*f^2 
+ b[3]*f^3 )


   a[] = { 20.1546884444029637292188955511052646083813651859,
             20.1546884427953972907077924814466203326900583103,
             3.67949957997922891862979239016362980726228105352 }
   b[] = { 20.15468806089727336889436516601764463550335967993,
30.23203208973828135642194630395383512423975226295,
12.07734402937370166243812046230877361184851494020,
               1 }


Just for reference of other readers, here is Euler transform, it has 
fewest terms.

    log(x) = log((1+s)/(1-s))
= log(1+s)- log(1-s)
= s * ( 2 + t * 2/3 + t^2 * 2/5 + t^3 * 2/7 + ... )    where s = 
(x-1)/(x+1) and t = s^2
           ~= s * poly(t)

Euler Transform Coefficients - O(3) with max relative error of 6.9E-10

log(x) ~= s * ( a[0] + a[1]*t + a[2]*t^2+ a[3]*t^3 )


a[] = { 1.9999999986213298623356925778435669096048002114235,
0.66666815950855706940128624185611990492669131569266,
0.39974794924788406359421930043137796373100879972198,
0.29925650701767699463063414487342676383581332565162 }



More information about the Sollya-users mailing list