File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,10 +10,8 @@ extern "C" {
1010
1111
1212/* _Py_ADJUST_ERANGE1(x)
13- * _Py_ADJUST_ERANGE2(x, y)
14- * Set errno to 0 before calling a libm function, and invoke one of these
15- * macros after, passing the function result(s) (_Py_ADJUST_ERANGE2 is useful
16- * for functions returning complex results). This makes two kinds of
13+ * Set errno to 0 before calling a libm function, and invoke macro after.
14+ * This makes two kinds of
1715 * adjustments to errno: (A) If it looks like the platform libm set
1816 * errno=ERANGE due to underflow, clear errno. (B) If it looks like the
1917 * platform libm overflowed but didn't set errno, force errno to ERANGE. In
@@ -42,20 +40,6 @@ static inline void _Py_ADJUST_ERANGE1(double x)
4240 }
4341}
4442
45- static inline void _Py_ADJUST_ERANGE2 (double x , double y )
46- {
47- if (x == INFINITY || x == - INFINITY ||
48- y == INFINITY || y == - INFINITY )
49- {
50- if (errno == 0 ) {
51- errno = ERANGE ;
52- }
53- }
54- else if (errno == ERANGE ) {
55- errno = 0 ;
56- }
57- }
58-
5943
6044//--- HAVE_PY_SET_53BIT_PRECISION macro ------------------------------------
6145//
Original file line number Diff line number Diff line change 1111#include "pycore_freelist.h" // _Py_FREELIST_FREE(), _Py_FREELIST_POP()
1212#include "pycore_long.h" // _PyLong_GetZero()
1313#include "pycore_object.h" // _PyObject_Init()
14- #include "pycore_pymath.h" // _Py_ADJUST_ERANGE2()
1514
1615
1716#define _PyComplexObject_CAST (op ) ((PyComplexObject *)(op))
You can’t perform that action at this time.
0 commit comments