[Python-ideas] Python Numbers as Human Concept Decimal System

Steven D'Aprano steve at pearwood.info
Sun Mar 9 01:39:25 CET 2014


On Sat, Mar 08, 2014 at 03:44:25PM -0800, Mark H. Harris wrote:

> There are two user issues:
> 
>    1) maths should not give surprises
>    2) inputs should have a reasonable "expected" interpretation

Computer maths cannot fail to give surprises.

py> x = 1/Decimal(3)
py> sum([x, x, x]) == 1
False

"No surprises" is simply an impossible request.



-- 
Steven


More information about the Python-ideas mailing list