Accuracy and the power function
02-19-2014, 11:36 AM
Post: #8
 walter b On Vacation Posts: 1,957 Joined: Dec 2013
RE: Accuracy and the power function
(02-19-2014 09:54 AM)Werner Wrote:  In your example, %%LN(6.28318530718) is off by one ULP.
Secondly, the 15-digit routines (%%*, %%+, %%-, %%/) do not round, they truncate. They are, after all, meant as intermediates to produce a correctly rounded 12-digit result (for the elementary operations).
Code:
           %%LN                    %% 372 %%*              %%EXP exact   1.8378770664094112978.. 683.69026870430100..    8.37357721132000..e296 HP48    1.83787706640940        683.690268704296        8.37357721127809e296 trunc15 1.83787706640941        683.690268704300        8.37357721131159e296 round15                         683.690268704301        8.37357721131998e296

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 15-digit %%LN, 15-digit %%EXP and 15-digit rounding arithmetic would produce.

Anything special you want to tell us using %% ??

d#-?
 « Next Oldest | Next Newest »

 Messages In This Thread Accuracy and the power function - Dieter - 02-16-2014, 02:43 PM RE: Accuracy and the power function - Joe Horn - 02-16-2014, 03:11 PM RE: Accuracy and the power function - Dieter - 02-16-2014, 05:45 PM RE: Accuracy and the power function - Joe Horn - 02-16-2014, 10:11 PM RE: Accuracy and the power function - Dieter - 02-18-2014, 08:28 PM RE: Accuracy and the power function - Joe Horn - 02-19-2014, 12:33 AM RE: Accuracy and the power function - Werner - 02-19-2014, 09:54 AM RE: Accuracy and the power function - walter b - 02-19-2014 11:36 AM RE: Accuracy and the power function - Dieter - 02-19-2014, 12:35 PM RE: Accuracy and the power function - Werner - 02-19-2014, 11:47 AM RE: Accuracy and the power function - Werner - 02-19-2014, 01:07 PM RE: Accuracy and the power function - Dieter - 02-20-2014, 05:17 PM RE: Accuracy and the power function - Werner - 02-21-2014, 07:11 AM RE: Accuracy and the power function - Dieter - 02-23-2014, 02:19 PM RE: Accuracy and the power function - Thomas Klemm - 02-23-2014, 08:09 PM RE: Accuracy and the power function - Werner - 02-23-2014, 09:06 PM

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