For me, Math.hypot(10, 5)**2 is 125.00000000000001.

Float numbers are simply not accurate; you should perform "fuzzy"
comparisons - checking whether the difference between two floats is
smaller than a hard-coded really small number.

def fuzzy_eq a, b, eps = 1e-6
  (a-b).abs < eps
end

-- Matma Rex