Post Reply 
Simple Series to calculate tan(x)
09-12-2016, 11:42 PM
Post: #7
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.


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!
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
Simple Series to calculate tan(x) - Namir - 09-07-2016, 05:59 PM
RE: Simple Series to calculate tan(x) - Namir - 09-12-2016 11:42 PM

User(s) browsing this thread: 1 Guest(s)