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









Bits error versus x
Results
| Alternative 1 | |
|---|---|
| Error | 31.8 |
| Cost | 13248 |
| Alternative 2 | |
|---|---|
| Error | 0.4 |
| Cost | 6848 |
| Alternative 3 | |
|---|---|
| Error | 0.7 |
| Cost | 6592 |
| Alternative 4 | |
|---|---|
| Error | 55.0 |
| Cost | 64 |
| Alternative 5 | |
|---|---|
| Error | 62.0 |
| Cost | 64 |
| Alternative 6 | |
|---|---|
| Error | 63.0 |
| Cost | 64 |

Initial program 31.8
rmApplied difference-of-sqr-1_binary64_209431.8
Applied sqrt-prod_binary64_21400.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2021022
(FPCore (x)
:name "Hyperbolic arc-cosine"
:precision binary64
(log (+ x (sqrt (- (* x x) 1.0)))))