A recent thread involved a *redux* of my "Area between two curves" challenge for RPL. James Prange posted an HP-48 solution in which the uncertainty of the input function was specified by setting the display mode. Valentin Albillo questioned the clarity of this, as opposed to the syntax of "INTEG" on the HP-71B Math ROM:

Quote:

If you want to specify a particular precision, why, just do it, include the desired precision as a parameter to the integration process, which is just what my BASIC version does. Remember, we're talking about someone who's trying to fathom what the code does, and changing display modes instead of explicitly specifying a desired accuracy seems much more obscure, arbitrary, and less clean to me.

To which James responded,

Quote:

Now there's a point that I heartily agree with you on! Assuming any association between the current display mode and the desired accuracy is pure nonsense to me.Interestingly, in the 28 series, the accuracy is a parameter for the integral function, and even the order of the parameters makes more sense to me. What ever possessed them to change this for the 48 series is beyond me.

A bit of background: The method of setting the display mode to specify the *uncertainty of the input function* to be integrated, was introduced on the original implementation of INTEG on the HP-34C, and carried over to other RPN implementations of the INTEG function: the HP-15C, HP-41C Advantage Pac, HP-32S. Although not entirely logical, it was expedient and saved a stack argument or setting function.

This prompted me to consult the respective manuals to see how the input-function uncertainty for INTEG is specified on various models:

__34C, 15C, 41C* Advantage Pac, 32S, 32SII, 33S, 48*, 49*:__

Use FIX to specify uncertainty in a particular *decimal* digit; use SCI or ENG to specify uncertainty in a particular *significant* digit.

__28C, 28S:__

Specify uncertainty in a particular *decimal* digit as a numerical parameter to the INTEG function.

__42S, 71B Math ROM:__

Specify a *relative* uncertainty as a per-unit fraction of the function-value magnitude, as a numerical parameter to the INTEG function.

The latter (42S, 71B) approach seems to be the ideal one: flexible and scalable, without the possible discontinuities inherent to using SCI for relative uncertainty. Calculation of the estimated error is a bit more complicated.

-----------------------------

Excellent and detailed technical documentation on this topic is found in the HP-34C Owner's Handbook (Section 9 and Appendix B). The same material is essentially repeated in the HP-15C Owner's Handbook (Section 14 and Appendix E).

The HP-15C Advanced Functions Handbook (Section 2) contains further in-depth discussions of pitfalls and techniques for numerical integration.

This material makes one appreciate the diligent effort and high quality of HP's product documentation in the late 1970's to mid-1980's. The same topics are not covered or written as well in the HP-28C and HP-42S manuals that followed shortly thereafter.

-- KS

*Edited: 28 Nov 2005, 4:14 a.m. *