[Python-Dev] calculator module

Tim Peters tim.one at comcast.net
Wed Mar 10 23:47:50 EST 2004


[Tim, on HP's Solve and Integrate abilities]
> ...
> Kahan wrote some articles about them which are worth tracking down.
> Alas, I think they appeared in the HP Systems Journal, and offhand I
> wasn't able to find them online just now.

Had more time to search, and found them here:

    http://www.cs.berkeley.edu/~wkahan/Math128/

    The SOLVE key on the HP-34C
    The INTEGRATE key on the HP-34C

These papers are simply superb, lucidly explaining (among other things)
exactly how and why users can be hoodwinked by these routines despite how
much effort went into them -- and also why this is inescapable.  A quote
from the end of the SOLVE paper:

    The reader will recognize, first, how little the pathologies
    illustrated above have to do with the specifics of the SOLVE
    key, and second, how nearly certain is the user of so powerful
    a key to stumble into pathologies sooner or later, however
    rarely.  While the SOLVE key enhances its user's powers it
    obliges its user to use it prudently or be misled.

    And here is Hewlett-Packard's dilemma.  The company cannot
    afford a massive effort to educate the public in numerical
    analysis.  But without some such effort most potential
    purchasers may blame their calculator for troubles that are
    intrinsic in the problems they are trying to SOLVE.  To
    nearly minimize that required effort and its attendant
    risks, SOLVE has been designed to be more robust, more
    reliable and much easier to use than other equation solvers
    previously accepted widely by the computing industry.
    Whether the effort is enough remains to be seen.  Meanwhile
    we enjoy the time SOLVE saves us when it works to our
    satisfaction, which is almost always.

IMO, SOLVE remains a great improvement over almost all of its "mass market"
successors.  Excel is a fine example of the latter; e.g.,

    On the Accuracy of Statistical Distributions in Microsoft Excel 97
    http://www.stat.uni-muenchen.de/~knuesel/elv/excelacc.pdf

A later paper concluded that Excels 2000 and 2002 were no better:

    http://portal.acm.org/citation.cfm?id=635312&dl=ACM&coll=portal

    The problems that rendered Excel 97 unfit for use as a statistical
    package have not been fixed in either Excel 2000 or Excel 2002 (also
    called "Excel XP").  Microsoft attempted to fix errors in the
    standard normal random number generator and the inverse normal
    function, and in the former case actually made the problem worse.

Unfortunately, naive users are the ones worst served by "good enough for me"
implementations -- they have no basis for understanding the troubles they
may be getting into, and often neither even for recognizing that they are in
deep numerical weeds.

Most numeric software should be declared illegal <0.837 wink>.




More information about the Python-Dev mailing list