()
| 18 | FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL |
| 19 | |
| 20 | def _floatconstants(): |
| 21 | _BYTES = '7FF80000000000007FF0000000000000'.decode('hex') |
| 22 | # The struct module in Python 2.4 would get frexp() out of range here |
| 23 | # when an endian is specified in the format string. Fixed in Python 2.5+ |
| 24 | if sys.byteorder != 'big': |
| 25 | _BYTES = _BYTES[:8][::-1] + _BYTES[8:][::-1] |
| 26 | nan, inf = struct.unpack('dd', _BYTES) |
| 27 | return nan, inf, -inf |
| 28 | |
| 29 | NaN, PosInf, NegInf = _floatconstants() |
| 30 |
no test coverage detected
searching dependent graphs…