def to_ulps(x):
    n = struct.unpack('<q', struct.pack('<d', x))[0]
    if n < 0:
        n = ~(n+2**63)
    return n
Convert a non-NaN float x to an integer, in such a way that
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_math.py/to_ulps