



Bits error versus x
Results
| Original | 40.7 |
|---|---|
| Target | 39.8 |
| Herbie | 0.3 |
if x < -0.0001541232739399493Initial program 0.1
rmApplied div-sub0.1
Taylor expanded around -inf 0.1
Simplified0.1
if -0.0001541232739399493 < x Initial program 60.3
Taylor expanded around 0 0.4
Final simplification0.3
herbie shell --seed 2019010
(FPCore (x)
:name "Kahan's exp quotient"
:herbie-target
(if (and (< x 1) (> x -1)) (/ (- (exp x) 1) (log (exp x))) (/ (- (exp x) 1) x))
(/ (- (exp x) 1) x))
Time bar (total: 5.4s)Debug log
| 14.0ms | (/ (- (exp x) 1) x) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 39.9b
Found 2 expressions with local error:
| 3.6b | (- (exp x) 1) |
| 0.0b | (/ (- (exp x) 1) x) |
| 5× | add-sqr-sqrt |
| 4× | associate-/l* |
| 3× | add-cube-cbrt |
| 3× | *-un-lft-identity |
| 2× | associate-/l/ |
| 2× | add-log-exp |
| 2× | flip-- |
| 2× | add-exp-log |
| 2× | difference-of-sqr-1 |
| 2× | add-cbrt-cube |
| 2× | flip3-- |
| 2× | pow1 |
| 1× | div-inv |
| 1× | div-sub |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | clear-num |
| 13.0ms | (/ (- (exp x) 1) x) |
| 6.0ms | (- (exp x) 1) |
| 35.0ms | (/ (- (exp x) 1) x) |
| 19.0ms | (- (exp x) 1) |
| 126.0ms | (+ x (+ (* 1/6 (pow x 3)) (* 1/2 (pow x 2)))) |
| 72.0ms | (* -1 (/ (- 1 (exp x)) x)) |
| 40.0ms | (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) |
| 15.0ms | (/ (- (exp x) 1) x) |
| 15.0ms | (- (* (exp x) (exp x)) (* 1 1)) |
3 alts after pruning (3 fresh and 0 done)
Merged error: 0.0b
Found 2 expressions with local error:
| 0.2b | (* 1/6 (pow x 2)) |
| 0.0b | (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) |
| 4× | add-log-exp |
| 4× | associate-*r* |
| 3× | add-cube-cbrt |
| 3× | *-un-lft-identity |
| 3× | add-sqr-sqrt |
| 2× | add-exp-log |
| 2× | add-cbrt-cube |
| 2× | pow1 |
| 1× | unpow2 |
| 1× | flip-+ |
| 1× | *-commutative |
| 1× | flip3-+ |
| 1× | sum-log |
| 1× | associate-+r+ |
| 1× | +-commutative |
| 10.0ms | (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) |
| 3.0ms | (* 1/6 (pow x 2)) |
| 19.0ms | (* 1/6 (pow x 2)) |
| 11.0ms | (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) |
| 45.0ms | (* (exp (* 1/2 x)) (exp (+ (* 1/6 (pow x 2)) 1))) |
| 35.0ms | (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) |
| 20.0ms | (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) |
| 19.0ms | (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) |
| 4.0ms | (* 1/6 (pow x 2)) |
3 alts after pruning (2 fresh and 1 done)
Merged error: 0.0b
Found 2 expressions with local error:
| 3.2b | (- (/ (exp x) x) (/ 1 x)) |
| 0.0b | (/ (exp x) x) |
| 7× | *-un-lft-identity |
| 5× | div-inv |
| 5× | add-sqr-sqrt |
| 4× | add-log-exp |
| 3× | associate-/l* |
| 3× | add-cube-cbrt |
| 2× | distribute-lft-out-- |
| 2× | add-exp-log |
| 2× | distribute-rgt-out-- |
| 2× | add-cbrt-cube |
| 2× | pow1 |
| 1× | difference-of-squares |
| 1× | sub-div |
| 1× | flip-- |
| 1× | frac-sub |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | clear-num |
| 9.0ms | (- (/ (exp x) x) (/ 1 x)) |
| 4.0ms | (/ (exp x) x) |
| 21.0ms | (- (/ (exp x) x) (/ 1 x)) |
| 13.0ms | (/ (exp x) x) |
| 65.0ms | (* -1 (/ (- 1 (exp x)) x)) |
| 22.0ms | (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) |
| 17.0ms | (+ (* 1/2 x) (+ (/ 1 x) 1)) |
| 13.0ms | (/ (exp (/ (exp x) x)) (exp (/ 1 x))) |
| 9.0ms | (- (/ (exp x) x) (/ 1 x)) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0.0b
Found 2 expressions with local error:
| 3.6b | (+ (exp x) -1) |
| 0.0b | (/ (+ (exp x) -1) x) |
| 5× | add-sqr-sqrt |
| 4× | associate-/l* |
| 3× | add-cube-cbrt |
| 3× | *-un-lft-identity |
| 2× | associate-/l/ |
| 2× | add-log-exp |
| 2× | flip-+ |
| 2× | add-exp-log |
| 2× | add-cbrt-cube |
| 2× | flip3-+ |
| 2× | difference-of-sqr--1 |
| 2× | pow1 |
| 1× | div-inv |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | +-commutative |
| 9.0ms | (/ (+ (exp x) -1) x) |
| 2.0ms | (+ (exp x) -1) |
| 21.0ms | (/ (+ (exp x) -1) x) |
| 11.0ms | (+ (exp x) -1) |
| 131.0ms | (* -1 (/ (- 1 (exp x)) x)) |
| 95.0ms | (+ x (+ (* 1/6 (pow x 3)) (* 1/2 (pow x 2)))) |
| 30.0ms | (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) |
| 25.0ms | (- (* (exp x) (exp x)) (* -1 -1)) |
| 17.0ms | (/ (- (exp x) 1) x) |
4 alts after pruning (2 fresh and 2 done)
Merged error: 0.0b
98.9% (0.2b remaining)
Error of 0.3b against oracle of 0.0b and baseline of 20.3b