Re: Accuracy and Precision Specifications for BuiltIn Functions Message #10 Posted by Rodger Rosenbaum on 13 June 2006, 3:44 p.m., in response to message #9 by James M. Prange (Michigan)
I said:
I checked the accuracy of the HP48G UPTN function for values ( 0 1 x on the stack, then press UTPN) from {0 1 6} to {0 1 47}, for every integer value of x from 6 to 47, and compared the result with the value given by Mathematica. The HP48G returned the correct value for every case except for x=27, where the HP48G got 7.38948100688E161, but the correct (12digit) value is 7.38948100689E161. The correct 16digit value is 7.389481006885018E161, and you can see that the HP failed to round up, thus giving an error of just larger than .5 ULP. This suggests to me that the HP may be able to give a result accurate to about 1 ULP.
Then James Prange said:
Probably, but an alternative explanation would be that the 16digit value 7.389481006885018E161 isn't correct. Has anyone checked these values by another method?
The usual reference books of tables typically don't have values to 16 digits, especially for higher functions. They may have a few values for small, simple arguments to many digits for reference, but not for all arguments elsewhere in the tables.
And, what will you do if you need a really large number of digits, say as many as 100, or 1000, digits? Nowadays, the answer to this question is to use one of the socalled mathematical assistant programs such as Mathematica, Maple, Derive, Gauss, Maxima, etc. These programs typically can compute almost any mathematical function you can imagine to hundreds, or thousands, of decimal places.
If you need some function to 500 decimal places, how can you verify its correctness? There are no printed books of tables to be found that have that many digits. The only option is to compare the results of a couple (or more) of mathematical assistant programs. Or, I suppose you could use an arbitrary precision package (which will probably also be one of these programs), and write an expression yourself for some function you care about, with many hundreds of terms. Then how will you be confident that your result is correct? Probably by comparing with the result from Mathematica or Maple, etc.
I have done these intercomparisons many times, and I have come to trust Mathematica, especially if all I need is, say, 16 digits.
But, since you ask, I computed UPTN(0,1,27) to 1000 digits on both Mathematica and Maple, and the results agree exactly.
I don't bother with Abramowitz & Stegun, or Jahnke & Emde, for numerical values any more; Mathematica is more convenient and accurate. For algorithms or formulas, though, you can't beat Abramowitz & Stegun.
