[Python-bugs-list] [ python-Bugs-496104 ] FP behaviour changed from 2.1.1

noreply@sourceforge.net noreply@sourceforge.net
Sat, 22 Dec 2001 06:33:29 -0800


Bugs item #496104, was opened at 2001-12-22 06:33
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=496104&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Andreas Dietrich (quasi)
Assigned to: Nobody/Anonymous (nobody)
Summary: FP behaviour changed from 2.1.1

Initial Comment:

Python2.2 floating point behaviour 
is different from 2.1.1 on Linux. 
Instead of Inf and nan an OverflowError is
raised. (sometimes):


Python 2.2 (#5, Dec 22 2001, 14:57:12)
[GCC 2.96 20000731 (Mandrake Linux 8.2 2.96-0.68mdk)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> 1e308**10
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
OverflowError: (34, 'Numerical result out of range')
>>> math.tan(1e308**10)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
OverflowError: (34, 'Numerical result out of range')
>>> 1e308*10
inf
>>> math.tan(1e308*10)
nan

Python 2.1.1 (#1, Oct 24 2001, 13:07:11)
[GCC 2.96 20000731 (Mandrake Linux 8.2 2.96-0.66mdk)] on linux-i386
Type "copyright", "credits" or "license" for more information.
>>> import math
>>> 1e308**10
inf
>>> math.tan(1e308**10)
nan
>>> 1e308*10
inf
>>> math.tan(1e308*10)
nan




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

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=496104&group_id=5470