This math scares me
tjreedy at udel.edu
Wed Mar 14 21:46:02 CET 2001
"Grant Edwards" <grante at visi.com> wrote in message
news:7bQr6.644$lz1.17686 at ruti.visi.com...
> In article <98ohuc$du9$1 at news.udel.edu>, Terry Reedy wrote:
> >> Bill Gates got this right in the early days, delivering two Basic
> >> interpreters: binary floating point for speed, and decimal floating
> >> point for money and such
> >If one counts pennies instead of dollars, then 32 bit ints (+- $20
> >will serve for many purposes. Exact, faster, and more widely available
> >than BCD
> In fiancial calculations you also need to represent numbers
> that aren't amounts of money. Interest rates for example.
So? Floats (double precision) work well enough for this, I believe.
Note that binary fraction stock prices are exact with floats and not with
More information about the Python-list