Post Reply 
Accurate Normal Distribution for the HP67/97
12-15-2018, 06:38 PM (This post was last modified: 12-15-2018 06:44 PM by Dieter.)
Post: #40
RE: Accurate Normal Distribution for the HP67/97
(12-14-2018 10:25 PM)John Keith Wrote:  I did try both -5 RND and -7 RND and both made the error much worse. I did not try other values, however. I just saw Albert's latest posts and haven't tried any of the ideas there.

Then you have found your best way to round the input. And indeed rounding to 6 significant digits may be the best choice here. The square of such a number is exact, and the division by 2 will still be exact if the mantissa of x² does not exceed 2. This is true if the mantissa of x does not exceed √20, i.e. up to 4,47213. Which accounts for 44,72% of all possible x. The remaining 55,28% are also exact if the final digit of x² is even. Otherwise the value of x²/2 may be 1/2 ULP high. So an error only occurs in only 27,64% of all cases, and even if this happens the result if only half an ULP off. I have not analyzed what this means for the final Z(z) result, but a slight error in the last digit may always remain in such calculations.

After all there is no guarantee that the ex function is accurate to half an ULP. Take a look at the 15C Advanced Functions Handbook where the possible errors of different functions are explained in detail. Here an error of slightly more than 1 ULP (but less than 3 ULP) is possible.

Please correct me if I'm wrong here. ;-)

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


Messages In This Thread
RE: Accurate Normal Distribution for the HP67/97 - Dieter - 12-15-2018 06:38 PM



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