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



Bits error versus x
Results
Initial program 31.6
Taylor expanded around inf 0.3
Simplified0.3
rmApplied flip-+_binary64_278063.2
Applied log-div_binary64_289363.2
Simplified63.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2021019
(FPCore (x)
:name "Hyperbolic arc-cosine"
:precision binary64
(log (+ x (sqrt (- (* x x) 1.0)))))