\log \left(x + \sqrt{x \cdot x - 1}\right)\log \left(x + \left(\sqrt{x + \sqrt{1}} \cdot \sqrt{\sqrt{x - \sqrt{1}}}\right) \cdot \sqrt{\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(sqrt((x - sqrt(1.0))))) * sqrt(sqrt((x - sqrt(1.0)))))));
}



Bits error versus x
Results
Initial program 32.4
rmApplied add-sqr-sqrt32.4
Applied difference-of-squares32.4
Applied sqrt-prod0.1
rmApplied add-sqr-sqrt0.1
Applied sqrt-prod0.1
Applied associate-*r*0.1
Final simplification0.1
herbie shell --seed 2020060
(FPCore (x)
:name "Hyperbolic arc-cosine"
:precision binary64
(log (+ x (sqrt (- (* x x) 1)))))