More accurate summations [was Re: This math scares me]
Grant Edwards
grante at visi.com
Sat Mar 17 11:26:30 EST 2001
On 17 Mar 2001 03:43:57 GMT, Edward Jason Riedy <ejr at cs.berkeley.edu> wrote:
>And <jurgen.defurne at philips.com> writes:
> -
> - Try summing all financial operations of one day together, or
> - better, all operations involving percentages and then adding them
> - together : cumulative errors.
>
>More concretely, look at the Vancouver Stock Exchange index's
>problems of the late 70s-early 80s. They had chosen to
>truncate floating point values rather than round them, causing
>a downward drift of around 20 points a month[1].
>
>You could say that's because of poor handling of floating-point
>arithmetic, and you'd be right. However, just about every
>inaccuracy in floating-point financial calculations can be
>attributed to poor handling of fp arithmetic.
The problem is that proper handling of fp arithmetic is not
easy even though it appears trivial to the uneducated. It
requires quite a bit of knowlege, thought, and work. After one
undergrad numerical analysis class, I know that I don't know
enough to do it right.
>That doesn't mean floating point is a poor choice for all
>financial programs. Indeed, the HP financial calculators _all_
>use floating point, although decimal.
That was (I think) the original topic: BCD floating point vs.
binary floating point.
--
Grant Edwards grante Yow! Now KEN is having
at a MENTAL CRISIS beacuse
visi.com his "R.V." PAYMENTS are
OVER-DUE!!
More information about the Python-list
mailing list