ANN: Decimal.py 0.0.0
stevewilliams at wwc.com
Sun May 20 03:27:27 CEST 2001
Tim Peters wrote:
> [Niki Spahiev]
> > Why not long instead of tuple?
> I'll add that I encouraged Aahz to implement a sequence-based prototype in
> Python, so that if this pans out, the algorithms can be migrated easily to C
> for speed (functions slinging tuples of small ints in Python will be easy to
> recast as C functions slinging pointer-to-small-int+length pairs).
Speed is not the issue. You don't use decimal arithmetic for eigenvalues or
I did a study of decimal arithmetic in COBOL programs back in the dark ages and
found that, mostly, decimal arithmetic is a negligible part of the commercial
One seldom inverts a matrix in a payroll program.
Decimal arithmetic is not about speed, it's about doing the right thing.
Any IBM COBOL Programmers Guide has a two or three page summary about decimal
arithmetic--truncation, rounding, intermediate results, sign representations.
If you ignore this well-established and well-accepted body of knowledge and go
to [other sources], you're re-inventing the sledge.
More information about the Python-list