[Python-Dev] RE: Adding decimal (aka FixedPoint) numbers to Python

Michael Hudson mwh@python.net
16 Dec 2002 16:57:36 +0000


Michael McLay <mclay@nist.gov> writes:

> On Monday 16 December 2002 01:48 am, Tim Peters wrote:
> > [Michael McLay]
> >
> > > ...
> > > The semantics of the precision parameter may be incorrect because
> > > it is only addressing the precision of the fraction part of the
> > > number.
> >
> > That's why the module was called FixedPoint.
> 
> Fixing the decimal place would make sense for applications having to do with 
> money. That is quite different than how numbers are treated in scientific 
> calculations. That is were I borrowed the idea of significant digits. 
> Accountants tend to think that all digits are significant, down to the last 
> penny.

I'm a little confused; you're borrowing terms from scientific papers
to explain things to accountants?

[...]
> This is a very good long term goal. So for Python3k the standard numerical 
> type will be Cowlishaw's decimal numbers.

*I* would hope not; there are reasons to prefer binary fp to decimal
fp if you're not a money man.

Cheers,
M.

-- 
  ... with these conditions cam the realisation that ... nothing
  turned a perfectly normal healthy individual into a great political
  or military leader better than irreversible brain damage.
                   -- The Hitch-Hikers Guide to the Galaxy, Episode 11