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



Bits error versus x
Results
Initial program 29.9
Applied egg-rr0.4
Applied egg-rr1.4
Applied egg-rr0.4
Final simplification0.4
herbie shell --seed 2022129
(FPCore (x)
:name "sqrt B"
:precision binary64
(sqrt (* (* 2.0 x) x)))