\log \left(x + \sqrt{x \cdot x - 1}\right)\log \left(x + \sqrt{\sqrt{x + 1}} \cdot \left(\sqrt{\sqrt[3]{x - 1} \cdot \sqrt[3]{x - 1}} \cdot \left(\sqrt{\sqrt{x + 1}} \cdot \sqrt{\sqrt[3]{x - 1}}\right)\right)\right)(FPCore (x) :precision binary64 (log (+ x (sqrt (- (* x x) 1.0)))))
(FPCore (x)
:precision binary64
(log
(+
x
(*
(sqrt (sqrt (+ x 1.0)))
(*
(sqrt (* (cbrt (- x 1.0)) (cbrt (- x 1.0))))
(* (sqrt (sqrt (+ x 1.0))) (sqrt (cbrt (- x 1.0)))))))))double code(double x) {
return log(x + sqrt((x * x) - 1.0));
}
double code(double x) {
return log(x + (sqrt(sqrt(x + 1.0)) * (sqrt(cbrt(x - 1.0) * cbrt(x - 1.0)) * (sqrt(sqrt(x + 1.0)) * sqrt(cbrt(x - 1.0))))));
}






Bits error versus x
Results
| Alternative 1 | |
|---|---|
| Accuracy | 0.1 |
| Cost | 2048 |
| Alternative 2 | |
|---|---|
| Accuracy | 21.3 |
| Cost | 1152 |
| Alternative 3 | |
|---|---|
| Accuracy | 42.9 |
| Cost | 2688 |
Initial program 31.7
rmApplied difference-of-sqr-1_binary64_73031.7
Applied sqrt-prod_binary64_7760.1
rmApplied add-sqr-sqrt_binary64_7820.1
Applied associate-*l*_binary64_7010.1
Simplified0.1
rmApplied add-cube-cbrt_binary64_7950.1
Applied sqrt-prod_binary64_7760.1
Applied associate-*l*_binary64_7010.1
Simplified0.1
rmApplied add-sqr-sqrt_binary64_7820.1
Simplified0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020322
(FPCore (x)
:name "Hyperbolic arc-cosine"
:precision binary64
(log (+ x (sqrt (- (* x x) 1.0)))))