Staging
v0.5.1
https://github.com/python/cpython
Revision f97cf81f2f567e3b47ba25f68da504e81ded71eb authored by Michael W. Hudson on 11 March 2002, 10:17:17 UTC, committed by Michael W. Hudson on 11 March 2002, 10:17:17 UTC
    revision 2.111 of floatobject.c

SF bug 525705:  [2.2] underflow raise OverflowException.
Another year in the quest to out-guess random C behavior.

Added macros Py_ADJUST_ERANGE1(X) and Py_ADJUST_ERANGE2(X, Y).  The latter
is useful for functions with complex results.  Two corrections to errno-
after-libm-call are attempted:

1. If the platform set errno to ERANGE due to underflow, clear errno.
   Some unknown subset of libm versions and link options do this.  It's
   allowed by C89, but I never figured anyone would do it.

2. If the platform did not set errno but overflow occurred, force
   errno to ERANGE.  C89 required setting errno to ERANGE, but C99
   doesn't.  Some unknown subset of libm versions and link options do
   it the C99 way now.

Bugfix candidate, but hold off until some Linux people actually try it,
with and without -lieee.  I'll send a help plea to Python-Dev.
1 parent b5c2042
History
Tip revision: f97cf81f2f567e3b47ba25f68da504e81ded71eb authored by Michael W. Hudson on 11 March 2002, 10:17:17 UTC
backport tim_one's checkin of
Tip revision: f97cf81
File Mode Size
Demo
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Python
RISCOS
Tools
.cvsignore -rw-r--r-- 109 bytes
.hgtags -rw-r--r-- 2.1 KB
LICENSE -rw-r--r-- 12.1 KB
Makefile.pre.in -rw-r--r-- 25.9 KB
PLAN.txt -rw-r--r-- 14.1 KB
README -rw-r--r-- 39.6 KB
acconfig.h -rw-r--r-- 7.5 KB
configure -rwxr-xr-x 209.1 KB
configure.in -rw-r--r-- 54.0 KB
install-sh -rwxr-xr-x 5.5 KB
pyconfig.h.in -rw-r--r-- 19.6 KB
setup.py -rw-r--r-- 34.4 KB

README

back to top