Jewett, Jim wrote: #- For that matter, Decimal might be a better default format for 1.1, if #- a language were starting fresh. It still wouldn't be #- perfect, though. #- How many digits should 1.1/3 print? That depends of your context. If the precision in your context is set to 9 (default), it'll print: >>> import Decimal >>> d1 = Decimal.Decimal(1) >>> d3 = Decimal.Decimal(3) >>> d1 / d3 Decimal( (0, (3, 3, 3, 3, 3, 3, 3, 3, 3), -9L) ) >>> str(d1/d3) '0.333333333' . Facundo
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