Elementary confusion
Keith
kroc at blueyonder.co.uk
Mon Sep 23 17:04:08 EDT 2002
Hi,
I am working through O'Reilly's "Learning Python". I am up to page 33,
and already I have a problem. The text outlines a cli entry about math
operators, all really straight forward;
.>>>a=3
.>>>b=4
.>>>b/2+a
5
.>>>b/(2.0+a)
0.8
This is so straight forward that I wasn't going to type it in, but I
did anyway, and got instead of '0.8' something I cannot account for. I
got '0.80000000000000004'.
So after 32 pages, I am already flumoxed. What is going on
--
Keith.
More information about the Python-list
mailing list