chickadee » math » fphypot

fphypot x yprocedure
x
flonum
y
flonum

Computes (fpsqrt (+ (* x x) (* y y))) in way that overflows only when the answer is too large.

Examples:

> (fpsqrt (+ (* 1e+200 1e+200) (* 1e+199 1e+199)))
+inf.0
> (fphypot 1e+200 1e+199)
1.0049875621120889e+200