Accuracy and the power function

02192014, 09:54 AM
(This post was last modified: 02192014 10:07 AM by Werner.)
Post: #7




RE: Accuracy and the power function
(02182014 08:28 PM)Dieter Wrote: 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 1E12 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. There are two things at work here. First, the 15digit routines indeed are not exact to the last digit. In your example, %%LN(6.28318530718) is off by one ULP. Secondly, the 15digit routines (%%*, %%+, %%, %%/) do not round, they truncate. They are, after all, meant as intermediates to produce a correctly rounded 12digit result (for the elementary operations). Code:
Not only is the %%LN one ULP off, but the subsequent multiplication by 372 actually ends in ..968, but is truncated to ..96. The last line demonstrates what a 15digit %%LN, 15digit %%EXP and 15digit rounding arithmetic would produce. Werner 

« Next Oldest  Next Newest »

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