[Python-bugs-list] [ python-Bugs-576593 ] pyport.h INFINITY and HUGE_VAL treatment

noreply@sourceforge.net noreply@sourceforge.net
Tue, 02 Jul 2002 13:45:39 -0700


Bugs item #576593, was opened at 2002-07-02 22:45
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=576593&group_id=5470

Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jack Jansen (jackjansen)
Assigned to: Tim Peters (tim_one)
Summary: pyport.h INFINITY and HUGE_VAL treatment

Initial Comment:
pyport.h prefers to use INFINITY over HUGE_VAL, if it is available. However, for a future version of Mac OS X math.h may include both constants, but with INFINITY being a value (1e50) that will be represented as IEEE Infinity if stuffed into a float, while HUGE_VAL has the same role for a double (1e500).

The path supplied is a simple hack to undefine INFINITY for the Apple gcc compiler (which, to my knowledge, has always had a correct value for HUGE_VAL), but discussion on python-dev hinted that it may be better to get rid of all references to INFINITY here altogether, and in stead use a configure-based define of Py_HUGE_VAL in pyconfig.h on platforms where HUGE_VAL is broken. I agree with this, as long as I don't have to write the configure mods:-)

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

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