PEP 327: Decimal Data Type
Josiah Carlson
jcarlson at nospam.uci.edu
Sat Jan 31 12:35:09 EST 2004
> If I needed more than that, I'd use a rational type - I speak from
> experience as I set out to write a base N float library for C++ once
> upon a time and ended up writing a rational instead. A rational, BTW,
> isn't too bad to get working but that's as far as I got - doing it
> well would probably take a lot of work. And if getting Base N floats
> working was harder than for rationals, getting them to work well would
> probably be an order of magnitude harder - for no real benefit to 99%
> or more of users.
I also wrote a rational type (last summer). It took around 45 minutes.
Floating point takes a bit longer to get right.
> Just because a thing can be done, that doesn't make it worth doing.
Indeed :)
- Josiah
More information about the Python-list
mailing list