diff options
author | Erik Schnetter <schnetter@gmail.com> | 2013-02-14 23:09:14 -0500 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2013-02-14 23:09:14 -0500 |
commit | 2f644326e3e039ba7b295242109ff2e86c212f6a (patch) | |
tree | dc01270ef7c0225c87abdd3d39ff9f5505608182 /find-coeffs.m | |
parent | e0abe8fbfeddc10f91759a39b5867706d3338df0 (diff) | |
download | vecmathlib-2f644326e3e039ba7b295242109ff2e86c212f6a.zip vecmathlib-2f644326e3e039ba7b295242109ff2e86c212f6a.tar.gz |
Update scripts and coefficients
Diffstat (limited to 'find-coeffs.m')
-rw-r--r-- | find-coeffs.m | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/find-coeffs.m b/find-coeffs.m index d88e54c..1fa8ed1 100644 --- a/find-coeffs.m +++ b/find-coeffs.m @@ -6,13 +6,15 @@ Based on the "minimax" algorithm, but using least squares instead *) funcs = - {{Sin[2 Pi #]&, 0, 1/4, False, 1, 2, 10}, - {Cos[2 Pi #]&, 0, 1/4, False, 0, 2, 10}, - {Tan, 0, Pi/4, False, 1, 2, 20}, - (* {Cot, 0, Pi/2, False, 0, 2, 10}, *) - {Log[(1+#)/(1-#)]&, 0, 1/3, False, 1, 2, 15}, - {Exp, 0, 1, False, 0, 1, 15}, - {ArcTan, 0, 1, False, 1, 2, 25}}; + { + {Sin[2 Pi #]&, 0, 1/4, False, 1, 2, 10}, + {Cos[2 Pi #]&, 0, 1/4, False, 0, 2, 10}, + {Tan, 0, Pi/4, False, 1, 2, 20}, + (* {Cot, 0, Pi/2, False, 0, 2, 10}, *) + {Log[(1+#)/(1-#)]&, 0, 1/3, False, 1, 2, 15}, + {2^#&, -1/2, +1/2, False, 0, 1, 15}, + {ArcTan, 0, 1, False, 1, 2, 25} + }; findcoeffs[func_, xmin_, xmax_, pade_, dmin_, dstep_, ndegrees_] := Module[{prec, npts, @@ -30,7 +32,7 @@ findcoeffs[func_, xmin_, xmax_, pade_, dmin_, dstep_, ndegrees_] := prec = 30; (* Number of test points *) - npts = 1000; (*10000;*) + npts = 10000; degree = (dmin + ndegrees dstep) / If[pade, 2, 1]; |