This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author josiahcarlson
Recipients
Date 2007-03-17.08:20:32
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Python's behavior with respect to floating point arithmetic is left to the platform's C floating point libraries.  For example, on my Windows machine running Python 2.3.5, float("infinity") raises a ValueError.  I would also point out that 0/0 is integer division in Python 2.3.5 .

For other examples of platform-specific behavior:
Python 2.3.5 (#62, Feb  8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> inf*0
-1.#IND
>>> inf**0
1.0
>>> 1**inf
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ValueError: (33, 'Domain error')
>>> inf*0
-1.#IND
>>> inf/inf
-1.#IND
>>> inf-inf
-1.#IND
>>>

So yeah.  If you don't like how Python does math, complain to your vendor (Apple) or compile a version of Python with a C floating point library that works the way you want it to.
History
Date User Action Args
2007-08-23 14:52:29adminlinkissue1681671 messages
2007-08-23 14:52:29admincreate