Question for Trig Gurus
|
08-01-2022, 02:36 PM
(This post was last modified: 08-02-2022 10:35 AM by Albert Chan.)
Post: #30
|
|||
|
|||
RE: Question for Trig Gurus
Hi, Thomas Klemm
Thanks for clearing this up. d(3,3) were used for 5+ digits accuracy, because there is no argument reduction. Here is a version that use simpler d(2,2), but reduce asind() argument to 0 .. 1/2 a0=√(1-x²) , g0=1, a1=(g0+a0)/2, g1=√(a1*g0) 45 a∞ ≈ a0 - 20*a1 + 64*a2 = a0 + 12*a1 + 32*g1 Code: function asind(s,c) -- deg(asin(s)), 6+ digits accuracy lua> for i=0,10 do x=i/10; printf('%.1f: %.6f (%.6f)\n', x, acosd(x), deg(acos(x))) end 0.0: 90.000000 (90.000000) 0.1: 84.260830 (84.260830) 0.2: 78.463041 (78.463041) 0.3: 72.542396 (72.542397) 0.4: 66.421818 (66.421822) 0.5: 59.999979 (60.000000) 0.6: 53.130102 (53.130102) 0.7: 45.572996 (45.572996) 0.8: 36.869898 (36.869898) 0.9: 25.841940 (25.841933) 1.0: 0.000000 (0.000000) Update: Here is pade(asin(x),x,10,6) version Code: function asind(x) -- deg(asin(s)), 6+ digits accuracy acosd(x) results, using Pade version asind(x) 0.0: 90.000000 (90.000000) 0.1: 84.260830 (84.260830) 0.2: 78.463041 (78.463041) 0.3: 72.542397 (72.542397) 0.4: 66.421824 (66.421822) 0.5: 60.000037 (60.000000) 0.6: 53.130102 (53.130102) 0.7: 45.572996 (45.572996) 0.8: 36.869898 (36.869898) 0.9: 25.841926 (25.841933) 1.0: 0.000000 (0.000000) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 10 Guest(s)