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



Bits error versus x
Results
Initial program 31.0
rmApplied sqrt-prod_binary64_9231.1
Simplified0.4
rmApplied add-sqr-sqrt_binary64_980.7
Applied associate-*r*_binary64_190.6
rmApplied sqrt-unprod_binary64_960.4
Final simplification0.4
herbie shell --seed 2020280
(FPCore (x)
:name "sqrt C"
:precision binary64
(sqrt (* 2.0 (* x x))))