floating point woes

Grant Edwards invalid at invalid.invalid
Wed Feb 16 05:18:40 CET 2011


On 2011-02-16, Hans-Peter Jansen <hpj at urpla.net> wrote:

> Thanks for the explanation, Benjamin. Not that I like it, but anyway.
> If I hadn't quitted smoking a long time ago, I would go and ask, what
> these engineers smoked during the course of inventing this sh*t.

Like most tools, IEEE floating point works brilliantly for what it was
intended when used by people who know how to use it.  The problem is
that it's used for all sorts of things it shouldn't be by people who
don't understand how it works (again, like most tools).  The problem
is that it _appears_ easy to use, but it actually takes some study and
effort to use it right.

Back in the days before FP hardware was affordable, it used to be
fairly common for BCD to be the default FP representation in many
non-Fortran languages (BASIC, Pascal, etc.).  I think that probably
provided a lot fewer surprises to most users.

> Even more probably, they took way too much of a special form of
> lysergic acid.
>
> OTOH, cdecimals, as in Stefan Krah's package are long overdue to get 
> into the core.

There probably needs to be some sort of BCD FP option for the casual
user since most people would probably be better off with BCD.  Those
who need HW FP probably know it (and might even know how to use it).

[I may have just barely passed undergrad numerical analysis, but I
learned enough to know how ignorant I was.]

-- 
Grant






More information about the Python-list mailing list