MCPcopy Index your code
hub / github.com/clips/pattern / _floatconstants

Function _floatconstants

pattern/web/json/decoder.py:20–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL
19
20def _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
29NaN, PosInf, NegInf = _floatconstants()
30

Callers 1

decoder.pyFile · 0.85

Calls 1

decodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…