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



Bits error versus x
Results
Initial program 30.9
Applied add-sqr-sqrt_binary6431.1
Simplified31.1
Simplified0.5
Applied pow1_binary640.5
Applied pow1_binary640.5
Applied pow-prod-down_binary640.5
Simplified0.1
Final simplification0.1
herbie shell --seed 2022067
(FPCore (x)
:name "sqrt D"
:precision binary64
(sqrt (* 2.0 (pow x 2.0))))