\sqrt{x - 1} \cdot \sqrt{x}
x - 0.5
(FPCore (x) :precision binary64 (* (sqrt (- x 1.0)) (sqrt x)))
(FPCore (x) :precision binary64 (- x 0.5))
double code(double x) {
return sqrt(x - 1.0) * sqrt(x);
}
double code(double x) {
return x - 0.5;
}



Bits error versus x
Results
Initial program 0.5
Taylor expanded in x around inf 0.6
Final simplification0.6
herbie shell --seed 2022020
(FPCore (x)
:name "sqrt times"
:precision binary64
(* (sqrt (- x 1.0)) (sqrt x)))