Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Atan()
Message
From
04/03/2002 07:33:23
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
04/03/2002 07:18:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Atan()
Miscellaneous
Thread ID:
00626890
Message ID:
00627719
Views:
18
>Hilmar,
>
>Whilst this is not the solution to your problem, ther are a couple of thing you might consider
>
>(1) faster atan algorithm
>
>(2) Speed of trig functions
>
>(1) with a bit of math you can find that
>

>atan(x) = acos( 1 / sqrt(1 + x ^2) ) && should acos work faster

Thanks; I'll take a look a this later.

>(2) speed of execution
>I found on the net that the way calculators calculate is by using the CORDIC algorithm. Found one for sin, cos and asin

>http://mathforum.org/dr.math/problems/warren.05.16.99.html
>http://www.math.tamu.edu/~jmorgan/Right_Angle_March_99/calculator.htm
>http://mathforum.org/dr.math/problems/betty5.14.96.html

Quite interesting. However, permanently storing values for certain arguments doesn't seem very practical - I don't know in advance how much precision the user requires. Might be 15 digits, or 200. Or perhaps I should just place an upper limit on the precision of these functions.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform