Torture tests: what do they mean?
|
05-14-2014, 05:49 AM
(This post was last modified: 05-14-2014 05:52 AM by Dieter.)
Post: #7
|
|||
|
|||
RE: Torture tests: what do they mean?
(05-13-2014 10:58 PM)jebem Wrote: For example, the tan(355/226) has an ideal result of -7497258.185... Sure. They all do not calculate tan(355/226). The argument cannot be respresented exactly in 10, 12 or even 16 or 30 digits. All you can expect on a 12-digit machine is a 12-digit result for a 12-digit-rounded input, i.e. tan(1,57079646018). Take a look at the derivative. At 355/226 it is 1/cos²(355/226) = 5,62 E+13. On an n-digit calculator, the input may be off by 5 E–n (half a ULP), which means that the tangent can by off by 2,81 E+14 · 10–n. For a 12-digit machine this means that the result has a tolerance of ±281. In other words: you cannot even trust the three last digits left (!) of the decimal point! Your results prove this. The possible relative error is 3,7· 107–n, which means that 8 digits are lost and only n – 8 digits of the result can be trusted. Quote:Clearly the HP models algorithms deviates somehow from the expected result, contrary to what the Walter&Pauli algorithms which are giving fantastic close results. Even with a "perfect" algorithm a 10-digit calculator will only get two (!) digits right, and on an 8-digit machine the result is completely meaningless. If you want 12 valid digits in the result, you need 20 digit precision for 355/226. We should always keep in mind that our calculators usually do not work with exact numbers. So the output cannot be exact either. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)