



Bits error versus x
Results
| Original | 39.3 |
|---|---|
| Target | 38.3 |
| Herbie | 0.4 |
if x < -0.0001003945160317758Initial program 0.1
rmApplied flip3--0.1
if -0.0001003945160317758 < x Initial program 59.8
Taylor expanded around 0 0.5
rmApplied associate-+r+0.5
Final simplification0.4
herbie shell --seed 2019016
(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: 9.1s)Debug log
| 316× | (pre true 80) |
| 168× | (body real 80) |
| 64× | (body real 1280) |
| 46× | (body real 640) |
| 26× | (body real 320) |
| 12× | (body real 160) |
| 14.0ms | (/ (- (exp x) 1) x) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 36.0b
Found 2 expressions with local error:
| 4.2b | (- (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 |
| 14.0ms | (/ (- (exp x) 1) x) |
| 6.0ms | (- (exp x) 1) |
| 50.0ms | (/ (- (exp x) 1) x) |
| 19.0ms | (- (exp x) 1) |
| 145.0ms | (+ x (+ (* 1/6 (pow x 3)) (* 1/2 (pow x 2)))) |
| 87.0ms | (* -1 (/ (- 1 (exp x)) x)) |
| 30.0ms | (- (* (exp x) (exp x)) (* 1 1)) |
| 27.0ms | (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) |
| 17.0ms | (- (pow (exp x) 3) (pow 1 3)) |
3 alts after pruning (3 fresh and 0 done)
Merged error: 0.1b
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 |
| 6.0ms | (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) |
| 1.0ms | (* 1/6 (pow x 2)) |
| 18.0ms | (* 1/6 (pow x 2)) |
| 10.0ms | (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) |
| 65.0ms | (* (exp (* 1/2 x)) (exp (+ (* 1/6 (pow x 2)) 1))) |
| 43.0ms | (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) |
| 35.0ms | (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) |
| 23.0ms | (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1)) |
| 4.0ms | (* 1/6 (pow x 2)) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0.1b
Found 2 expressions with local error:
| 0.2b | (* 1/6 (pow x 2)) |
| 0.0b | (+ (* 1/2 x) (* 1/6 (pow x 2))) |
| 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× | +-commutative |
| 3.0ms | (+ (* 1/2 x) (* 1/6 (pow x 2))) |
| 1.0ms | (* 1/6 (pow x 2)) |
| 54.0ms | (+ (* 1/2 x) (* 1/6 (pow x 2))) |
| 19.0ms | (* 1/6 (pow x 2)) |
| 39.0ms | (* (exp (* 1/2 x)) (exp (* 1/6 (pow x 2)))) |
| 26.0ms | (+ (* 1/2 x) (* 1/6 (pow x 2))) |
| 13.0ms | (+ (* 1/2 x) (* 1/6 (pow x 2))) |
| 13.0ms | (+ (* 1/2 x) (* 1/6 (pow x 2))) |
| 6.0ms | (* 1/6 (pow x 2)) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0.1b
Found 4 expressions with local error:
| 12.7b | (cbrt (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1))) |
| 12.7b | (cbrt (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1))) |
| 12.7b | (cbrt (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1))) |
| 0.2b | (* 1/6 (pow x 2)) |
| 9× | cbrt-prod |
| 8× | add-cube-cbrt |
| 8× | *-un-lft-identity |
| 8× | add-sqr-sqrt |
| 6× | cbrt-div |
| 4× | add-log-exp |
| 4× | add-exp-log |
| 4× | associate-*r* |
| 4× | add-cbrt-cube |
| 4× | pow1 |
| 3× | flip-+ |
| 3× | pow1/3 |
| 3× | flip3-+ |
| 1× | unpow2 |
| 1× | *-commutative |
| 11.0ms | (cbrt (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1))) |
| 4.0ms | (cbrt (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1))) |
| 4.0ms | (cbrt (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1))) |
| 1.0ms | (* 1/6 (pow x 2)) |
| 67.0ms | (cbrt (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1))) |
| 65.0ms | (cbrt (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1))) |
| 51.0ms | (cbrt (+ (* 1/2 x) (+ (* 1/6 (pow x 2)) 1))) |
| 11.0ms | (* 1/6 (pow x 2)) |
| 487.0ms | (cbrt (+ (pow (* 1/2 x) 3) (pow (+ (* 1/6 (pow x 2)) 1) 3))) |
| 449.0ms | (cbrt (+ (pow (* 1/2 x) 3) (pow (+ (* 1/6 (pow x 2)) 1) 3))) |
| 413.0ms | (cbrt (+ (pow (* 1/2 x) 3) (pow (+ (* 1/6 (pow x 2)) 1) 3))) |
| 285.0ms | (+ (/ (exp (* 1/3 (- (log 1/6) (* 2 (log (/ -1 x)))))) x) (+ (/ (exp (* 1/3 (- (log 1/6) (* 2 (log (/ -1 x)))))) (pow x 2)) (exp (* 1/3 (- (log 1/6) (* 2 (log (/ -1 x)))))))) |
| 264.0ms | (+ (/ (exp (* 1/3 (- (log 1/6) (* 2 (log (/ -1 x)))))) x) (+ (/ (exp (* 1/3 (- (log 1/6) (* 2 (log (/ -1 x)))))) (pow x 2)) (exp (* 1/3 (- (log 1/6) (* 2 (log (/ -1 x)))))))) |
5 alts after pruning (4 fresh and 1 done)
Merged error: 0.0b
98.7% (0.3b remaining)
Error of 0.4b against oracle of 0.1b and baseline of 21.5b
| 10628× | (pre true 80) |
| 5514× | (body real 80) |
| 2240× | (body real 1280) |
| 1669× | (body real 640) |
| 789× | (body real 320) |
| 416× | (body real 160) |