def hypot(x, y):
    x = abs(x)
    y = abs(y)
    x, y = max(x, y), min(x, y)
    return x * sqrt(1 + (y/x) * (y/x))
Calculate the hypotenuse the safe way, avoiding over- and underflows
dataset/ETHPy150Open pyjs/pyjs/pyjs/lib/math.py/hypot