Simple Series to calculate tan(x)
09-12-2016, 11:42 PM
Post: #7
 Namir Senior Member Posts: 693 Joined: Dec 2013
RE: Simple Series to calculate tan(x)
(09-12-2016 08:28 PM)Dieter Wrote:
(09-12-2016 10:09 AM)Willy R. Kunz Wrote:  Anyway, here' the result. With tolerance = 1E-8, we get
tan(pi/4) = 0.999968175

This shows very nicely that if the last added term drops below a given tolerance, this does not automatically mean that the sum of all subsequent terms does so either. Here the tolerance was set to 1E–8 but the error in the result is > 3E–5.

In other words: with the given algorithm you cannot be sure that the tolerance level is actually met.

Dieter

The use of the tolerance value is in a relative context. It is a rough indicator. Calculating the error assumes we know the exact function value. This works fine in the context of an exercise. How did the programmings in the 50s compare trig function approximations with their exact counterparts? It was not easy!
 « 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)