Simple Series to calculate tan(x)
|
09-12-2016, 10:09 AM
Post: #4
|
|||
|
|||
RE: Simple Series to calculate tan(x)
(09-07-2016 07:10 PM)Dieter Wrote:(09-07-2016 05:59 PM)Namir Wrote: I found a simple series to calculate tan(x): OK, I run this on RPN-67 Pro. It took me a while to figure out that X in Namir's last line refers to the original x argument, not the X calculated in the first line, as the code would suggest. Code:
Anyway, here' the result. With tolerance = 1E-8, we get tan(pi/4) = 0.999968175 Iterations: 5000 Running time on iPad Pro: 7.8 secs (original version) 5.9 secs (optimized version) Here's the optimized version of the program. Tolerance is expected in register E. Register I holds K, Sum is in R0, X (from line 1) in R1, X2 in R2. Enter x (in rad) and press A to calculate: Code:
|
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Simple Series to calculate tan(x) - Namir - 09-07-2016, 05:59 PM
RE: Simple Series to calculate tan(x) - Dieter - 09-07-2016, 07:10 PM
RE: Simple Series to calculate tan(x) - Willy R. Kunz - 09-12-2016 10:09 AM
RE: Simple Series to calculate tan(x) - Dieter - 09-12-2016, 08:28 PM
RE: Simple Series to calculate tan(x) - Namir - 09-12-2016, 11:42 PM
RE: Simple Series to calculate tan(x) - Namir - 09-07-2016, 09:02 PM
RE: Simple Series to calculate tan(x) - Namir - 09-12-2016, 12:17 PM
|
User(s) browsing this thread: 1 Guest(s)