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



Bits error versus x
Results
Initial program 30.7
Applied add-sqr-sqrt_binary6430.9
Simplified30.9
Simplified0.5
Applied rem-square-sqrt_binary640.1
Final simplification0.1
herbie shell --seed 2022024
(FPCore (x)
:name "sqrt C"
:precision binary64
(sqrt (* 2.0 (* x x))))