@@ -536,31 +536,7 @@ def dec(*args, **kwargs):
536536def _have_ieee_doubles ():
537537 if sys .implementation .name == 'cpython' :
538538 return True
539- import math
540- import struct
541- # Check parameters for encoding of floats; a quick exit
542- # if they aren't same as for IEC 60559 doubles. Check
543- # also that subnormals are present.
544- if (struct .calcsize ('d' ) != 8
545- or sys .float_info .radix != 2
546- or sys .float_info .mant_dig != 53
547- or sys .float_info .dig != 15
548- or sys .float_info .min_exp != - 1021
549- or sys .float_info .min_10_exp != - 307
550- or sys .float_info .max_exp != 1024
551- or sys .float_info .max_10_exp != 308
552- or not math .issubnormal (math .nextafter (0 , 1 ))):
553- return False
554- # We attempt to determine if this machine is using IEC
555- # floating-point formats by peering at the bits of some
556- # carefully chosen value. Assume that integer and
557- # floating-point types have same endianness.
558- d = 9006104071832581.0
559- d_be_bytes = b"\x43 \x3f \xff \x01 \x02 \x03 \x04 \x05 "
560- d_packed = struct .pack ('d' , d )
561- if sys .byteorder == 'little' :
562- return d_packed == bytes (reversed (d_be_bytes ))
563- return d_packed == d_be_bytes
539+ return False
564540
565541HAVE_IEEE_754 = _have_ieee_doubles ()
566542
0 commit comments