Bugs item #1729280, was opened at 2007-05-31 20:08
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1729280&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: accdak (accdak)
Assigned to: Nobody/Anonymous (nobody)
Summary: Error in example

Initial Comment:
On http://docs.python.org/tut/node5.html the example:
There is full support for floating point; operators with mixed type operands 
convert the integer operand to floating point:

>>> 3 * 3.75 / 1.5
7.5

is incorrect.  The resulting value is 5.5 not 7.5

----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2007-05-31 22:35

Message:
Logged In: YES 
user_id=33168
Originator: NO

Perhaps you misread the star (*) as a plus (+)?

>>> 3 * 3.75 / 1.5
7.5
>>> 3 + 3.75 / 1.5
5.5

For multiplication (*), 7.5 is correct.  For addition (+), 5.5 is correct.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1729280&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to