Looking for TVM formulas
|
04-03-2014, 01:22 PM
(This post was last modified: 04-03-2014 01:34 PM by Dieter.)
Post: #18
|
|||
|
|||
RE: Looking for TVM formulas
(04-03-2014 01:10 AM)Manolo Sobrino Wrote:(04-02-2014 07:40 PM)Dieter Wrote: ln 0,9 < z < ln 2 is all that's required. ;-) Simple: the basic idea of a dedicated ex—1 function is better accuracy than a simple ex minus one. For x > 0 this is true if the result is less than one. And ex—1 < 1 means that x is less than ln 2. For x < 0, ex—1 is something between –1 and 0. Results within [–1; –0,1] have full accuracy even without a dedicated ex—1 function. Which is required only for results > –0,1. Which means that x > ln 0,9. So we only have to consider the interval from ln 0,9 to ln 2. Using the contiued fraction method up to n=9 this yields a largest error (at ln 2) of 3,6 units in the 12th place, i.e. 11 valid digits. In all other cases a simple ex minus one will return exact results, so the approximation is not required. For more details, visit Casio's Keisan calculator, set the accuracy to 22 digits and copy the following code into the "Expression" window: Code: approx = z/(1 - z/(2 + z/(3 - z/(2 + z/(5 - z/(2 + z/(7 - z/(2 + z/(9 - z/2))))))))); Press "Execute", and then enter -1, 0.02, 101 at the now appearing "Variable" input line below. You will get a table for z = –1 to +1 with the true value, the approximation and the error, expressed in units of the nth significant digit (i.e. 3,5E-14 means the approximation is off by 3,5 units in the 14th digit). Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)