| Alternative 1 | |
|---|---|
| Accuracy | 66.6% |
| Cost | 64 |
\[1
\]
(FPCore (x) :precision binary64 (/.f64 (-.f64 (exp.f64 x) 1) x))
(FPCore (x) :precision binary64 (/.f64 (expm1.f64 x) x))
\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{exp.f64}\left(x\right), 1\right), x\right)
\mathsf{/.f64}\left(\mathsf{expm1.f64}\left(x\right), x\right)
| Original | 37.9% |
|---|---|
| Target | 37.2% |
| Herbie | 100.0% |
Initial program 37.9%
Simplified100.0%
[Start]37.9 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{exp.f64}\left(x\right), 1\right), x\right)
\] |
|---|---|
expm1-def [=>]100.0 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{expm1.f64}\left(x\right)}, x\right)
\] |
Final simplification100.0%
| Alternative 1 | |
|---|---|
| Accuracy | 66.6% |
| Cost | 64 |
herbie shell --seed 2023144
(FPCore (x)
:name "Kahan's exp quotient"
:precision binary64
:herbie-target
(if (and (< x 1.0) (> x -1.0)) (/ (- (exp x) 1.0) (log (exp x))) (/ (- (exp x) 1.0) x))
(/ (- (exp x) 1.0) x))