(num)
| 12 | |
| 13 | # Special-case zero and subnormals, since num.hex() can return '0x0.0p+0' |
| 14 | # or a non-'0x1.' form, which would break the split below. |
| 15 | if num == 0.0: |
| 16 | return '0' * 64 |
| 17 | |
| 18 | parts = num.hex().split('0x1.')[-1].split('p') |
| 19 | hex_mantissa = '1' + parts[0] |
| 20 | unshifted = bin(int(hex_mantissa, 16))[2:] |
| 21 | place = int(parts[1]) |
| 22 |
nothing calls this directly
no test coverage detected