Beef up the rationale a bit, as per Konrad Hinsen's request.
This commit is contained in:
parent
fdd5b0e759
commit
8e525837c0
10
pep-0240.txt
10
pep-0240.txt
|
@ -19,10 +19,14 @@ Abstract
|
|||
|
||||
Rationale
|
||||
|
||||
Rational numbers are useful, and are much harder to use without
|
||||
literals. Making the "obvious" non-integer type one with more
|
||||
Rational numbers are useful for exact and unsurprising arithmetic.
|
||||
They give the correct results people have been taught in various
|
||||
math classes. Making the "obvious" non-integer type one with more
|
||||
predictable semantics will surprise new programmers less then
|
||||
using floating point numbers.
|
||||
using floating point numbers. As quite a few posts on c.l.py and
|
||||
on tutor@python.org have shown, people often get bit by strange
|
||||
semantics of floating point numbers: for example, round(0.98, 2)
|
||||
still gives 0.97999999999999998.
|
||||
|
||||
|
||||
Proposal
|
||||
|
|
Loading…
Reference in New Issue