On Tue, Aug 01, 2006, M.-A. Lemburg wrote: > > You often have a need for controlled rounding when doing financial > calculations or in situations where you want to compare two floats > with a given accuracy, e.g. to work around rounding problems ;-) > > The usual approach is to use full float accuracy throughout the > calculation and then apply rounding a certain key places. That's what Decimal() is for. (Note that I don't care all that much about round(), but I do think we want to canonicalize Decimal() for all purposes in standard Python where people care about accuracy. Additional float features can go into NumPy.) -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian W. Kernighan
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4