\sqrt{x - 1} \cdot \sqrt{x}x - \left(0.5 + \frac{0.125}{x}\right)(FPCore (x) :precision binary64 (* (sqrt (- x 1.0)) (sqrt x)))
(FPCore (x) :precision binary64 (- x (+ 0.5 (/ 0.125 x))))
double code(double x) {
return sqrt(x - 1.0) * sqrt(x);
}
double code(double x) {
return x - (0.5 + (0.125 / x));
}



Bits error versus x
Results
Initial program 0.5
Taylor expanded around inf 0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2020232
(FPCore (x)
:name "sqrt times"
:precision binary64
(* (sqrt (- x 1.0)) (sqrt x)))