Accuracy and the power function

02162014, 10:11 PM
Post: #4




RE: Accuracy and the power function
Methinks it may be explained by the HP15C Advanced Functions Handbook (warning: this searchable PDF is 75.8 MB), which devotes 40 pages to "Accuracy of Numerical Calculations". Keep in mind that the 15C had only a 10digit mantissa, with intermediate internal math using 13digit mantissas. Page 179 includes the following:
Quote:A function that grows to ∞ or decays to 0 exponentially fast as its argument approaches ±∞ may suffer an error larger than one unit in its 10th significant digit, but only if its magnitude is smaller than 10^{20} or larger than 10^{20}; and though the relative error gets worse as the result gets more extreme (small or large), the error stays below three units in the last (10th) significant digit. The reason for this error is explained later. Functions so affected are e^{x}, y^{x}, x! (for noninteger x), SINH, and COSH for real arguments. The worst case known is 3^{201}, which is calculated as 7.968419664 × 10^{95}. The last digit 4 should be 6 instead ... [jump to page 183] To understand the error in 3^{201}, note that this is calculated as e^{201 ln(3)} = e^{220.821...} To keep the final relative error below one unit in the 10th significant digit, 201 ln(3) would have to be calculated with an absolute error rather smaller than 10^{10}, which would entail carrying at least 14 significant digits for that intermediate value. The calculator does carry 13 significant digits for certain intermediate calculations of its own, but a 14th digit would cost more than it's worth. [bold emphasis added by jkh] Since 13 internal digits can result in errors up to 3 ULP, I hypothesize that 15 internal digits (as most modern HP's use) can yield errors up to 4 ULP in those functions, if their inputs have sufficiently "extreme" magnitudes. I think your 3rd example above validates this hypothesis. <0ɸ0> Joe 

« Next Oldest  Next Newest »

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