How an HP-27 computes N.D.

All other HP calculators

How an HP-27 computes N.D.

Postby mike-stgt » Sun Sep 13, 2020 3:44 pm

The trace feature of a well known system running almost all classical HP calculators virtually (look for 'Free Downloads' at enabled me to easily find out the procedure how an HP-27 computes "N.D." (Normal Distribution). It uses from Abramowitz and Stegun (further on "A&S") formula 26.2.17, constants b3..b5 rounded to nine digits, respecting the area of validity mentioned there, also 26.2.1, 26.2.5, and 26.2.6. The formula is evaluated using Horner's method but rounding intermediate results to ten digits.

Plotting e(x), the difference to (1-erf(x/sqrt(2)))/2, once with the a. m. roundings and restrictions and again with all constants as given in A&S and computing with 25 digits precision show apparently identical diagrams.
Delta Q27 red.png
(Sorry for the funny ordinate's lettering, I was not able from within Reduce to tell gnuplot how to do it more useful.)
Delta Q27 red.png (10.97 KiB) Viewed 207 times

One more word about using A&S. It is favourable to pay attention to the area of validity. A bad example here (just for fun run the routine with input x = -100000/47047). It is A&S formula 7.1.25 which is not applicable for x<0. The author of the routine once posted it in the general section of MoHPC forum and some jester moderator moved it to 'HP Software Libraries' what smells like "approved" alas with incorrect formula and incomplete routine. Although filed in a somewhat seriously looking library, the quality of few contributions could be quite doubtful. It seems there is neither an admin, nor moderator nor an interested community any more willing to take the role as lector.
Posts: 42
Joined: Tue Dec 24, 2019 12:12 pm

Return to Other HP Calculators

Who is online

Users browsing this forum: No registered users and 1 guest