\log \left(x + \sqrt{x \cdot x - 1}\right)\log \left(x + \sqrt{x + \sqrt{1}} \cdot \sqrt{x - \sqrt{1}}\right)double code(double x) {
return log((x + sqrt(((x * x) - 1.0))));
}
double code(double x) {
return log((x + (sqrt((x + sqrt(1.0))) * sqrt((x - sqrt(1.0))))));
}



Bits error versus x
Results
Initial program 31.4
rmApplied add-sqr-sqrt31.4
Applied difference-of-squares31.4
Applied sqrt-prod0.1
Final simplification0.1
herbie shell --seed 2020091
(FPCore (x)
:name "Hyperbolic arc-cosine"
:precision binary64
(log (+ x (sqrt (- (* x x) 1)))))