\sqrt{x \cdot x + x \cdot x}
\mathsf{hypot}\left(x, x\right)
(FPCore (x) :precision binary64 (sqrt (+ (* x x) (* x x))))
(FPCore (x) :precision binary64 (hypot x x))
double code(double x) {
return sqrt((x * x) + (x * x));
}
double code(double x) {
return hypot(x, x);
}



Bits error versus x
Results
Initial program 30.9
Simplified0.1
Final simplification0.1
herbie shell --seed 2022067
(FPCore (x)
:name "sqrt A"
:precision binary64
(sqrt (+ (* x x) (* x x))))