Post Reply 
Accuracy and the power function
02-18-2014, 08:28 PM
Post: #5
RE: Accuracy and the power function
(02-16-2014 10:11 PM)Joe Horn Wrote:  Methinks it may be explained by the HP-15C Advanced Functions Handbook (warning: this searchable PDF is 75.8 MB), which devotes 40 pages to "Accuracy of Numerical Calculations".

Ah, the 15C Advanced Functions Handbook. I have a PDF copy here and of course I read the section on accuracy more than once. By the way, the current PDF at (2012 version) has merely 3,8 MB.

Right, the power function \(a^b\) is evaluated as \(e^{b · ln a}\). But both the 10-digit calculators as well as those with 12 digits use three additional guard digits, so the expected error should be the same. The more important point here seems to be the much wider working range of the 12 digit devices:

For a result less than 1E+100 the largest possible exponent is 230,258... If the 13-digit internal result is off by 1 ULP, the absolute error is 1E-10. Which after the following exponentiation results in a relative error of 1E-10 or at most 1 ULP in the returned result.

If results up to 1E+500 are possible, the largest exponent is 1151,29..., i.e. there is one more digit left of the decimal point and therefore one digit less to the right. An error of merely one ULP in the 15th digit of the exponent equals 1E-11, so the final result may have a relative error of up to 10 ULP (!). Even if the exponent is correctly rounded to 15 digits, the result may be off by 5 ULP.

However, in the example with 4 ULP error the internally calculated exponent is 372*ln(2*pi) = 683,69... One ULP more or less equals an absolute error of 1E-12 or an (acceptable) error of 1 ULP in the returned result. If larger errors occur, one may conclude that 15 digit internal precision does not mean that all 15 are exact.

Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
Accuracy and the power function - Dieter - 02-16-2014, 02:43 PM
RE: Accuracy and the power function - Dieter - 02-18-2014 08:28 PM

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