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



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