Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fa9e273

Browse files
committed
Clarification in the fp appendix suggested on c.l.py by Michael Chermside.
Also replaced a *star* style emphasis in the Representation Error section with an \emph{} thingie.
1 parent 4157dd5 commit fa9e273

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Doc/tut/tut.tex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4180,7 +4180,8 @@ \chapter{Floating Point Arithmetic: Issues and Limitations
41804180
Note that this is in the very nature of binary floating-point: this is
41814181
not a bug in Python, it is not a bug in your code either, and you'll
41824182
see the same kind of thing in all languages that support your
4183-
hardware's floating-point arithmetic.
4183+
hardware's floating-point arithmetic (although some languages may
4184+
not \emph{display} the difference by default, or in all output modes).
41844185
41854186
Python's builtin \function{str()} function produces only 12
41864187
significant digits, and you may wish to use that instead. It's
@@ -4326,7 +4327,7 @@ \section{Representation Error
43264327

43274328
Note that since we rounded up, this is actually a little bit larger than
43284329
1/10; if we had not rounded up, the quotient would have been a little
4329-
bit smaller than 1/10. But in no case can it be *exactly* 1/10!
4330+
bit smaller than 1/10. But in no case can it be \emph{exactly} 1/10!
43304331

43314332
So the computer never ``sees'' 1/10: what it sees is the exact
43324333
fraction given above, the best 754 double approximation it can get:

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Brad Chapman
7171
Mitch Chapman
7272
David Chaum
7373
Nicolas Chauvat
74+
Michael Chermside
7475
Albert Chin-A-Young
7576
Tom Christiansen
7677
Vadim Chugunov

0 commit comments

Comments
 (0)