| Alternative 1 | |
|---|---|
| Accuracy | 99.0% |
| Cost | 6592 |
\[\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, x\right)\right)
\]
(FPCore (x) :precision binary64 (log.f64 (+.f64 x (sqrt.f64 (-.f64 (*.f64 x x) 1)))))
(FPCore (x) :precision binary64 (log.f64 (+.f64 x (-.f64 x (/.f64 1/2 x)))))
\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(x, x\right), 1\right)\right)\right)\right)
\mathsf{log.f64}\left(\mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\frac{1}{2}, x\right)\right)\right)\right)
Initial program 51.4%
Taylor expanded in x around inf 99.4%
Simplified99.4%
[Start]99.4 | \[ \mathsf{log.f64}\left(\mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(1, x\right)\right)\right)\right)\right)
\] |
|---|---|
associate-*r/ [=>]99.4 | \[ \mathsf{log.f64}\left(\mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(x, \color{blue}{\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, 1\right), x\right)}\right)\right)\right)
\] |
metadata-eval [=>]99.4 | \[ \mathsf{log.f64}\left(\mathsf{+.f64}\left(x, \mathsf{\_.f64}\left(x, \mathsf{/.f64}\left(\color{blue}{\frac{1}{2}}, x\right)\right)\right)\right)
\] |
Final simplification99.4%
| Alternative 1 | |
|---|---|
| Accuracy | 99.0% |
| Cost | 6592 |
| Alternative 2 | |
|---|---|
| Accuracy | 3.1% |
| Cost | 64 |
herbie shell --seed 2023144
(FPCore (x)
:name "Hyperbolic arc-cosine"
:precision binary64
(log (+ x (sqrt (- (* x x) 1.0)))))