A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-August/074348.html below:

[Python-Dev] PEP 238 - The /

[Python-Dev] PEP 238 - The // operator should truncate instead of floor [Python-Dev] PEP 238 - The // operator should truncate instead of floor"Martin v. Löwis" martin at v.loewis.de
Wed Aug 29 18:30:16 CEST 2007
> This non-quotient division leads to some odd results, e.g. Python seems 
> to think -3/2+3/2 = -1. This is clearly, and correct me if I'm mistaken 
> - wrong.

Lino already pointed you to the relevant FAQ entry, but since you
explicitly asked for it: you are mistaken, the result is right.

It would have been good if you had indicated what result you had
expected instead. I assume 0; to get 0, you have to write -(3/2)+3/2,
or 0-3/2+3/2.

Regards,
Martin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4