



Bits error versus x
Results
| Original | 38.7 |
|---|---|
| Target | 0.3 |
| Herbie | 0.2 |
if x < 0.00013149958412846043Initial program 58.8
Taylor expanded around 0 0.2
Simplified0.2
if 0.00013149958412846043 < x Initial program 0.1
Final simplification0.2
herbie shell --seed 2019016
(FPCore (x)
:name "ln(1 + x)"
:herbie-target
(if (== (+ 1 x) 1) x (/ (* x (log (+ 1 x))) (- (+ 1 x) 1)))
(log (+ 1 x)))
Time bar (total: 26.8s)Debug log
| 385× | (pre true 80) |
| 128× | (body nan 80) |
| 81× | (body real 80) |
| 75× | (body real 1280) |
| 54× | (body real 640) |
| 32× | (body real 320) |
| 15× | (body real 160) |
| 2.0ms | (log (+ 1 x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 41.5b
Found 1 expressions with local error:
| 4.9b | (log (+ 1 x)) |
| 3× | log-prod |
| 2× | add-cube-cbrt |
| 2× | add-exp-log |
| 2× | *-un-lft-identity |
| 2× | log-div |
| 2× | pow1 |
| 2× | add-sqr-sqrt |
| 1× | add-log-exp |
| 1× | flip-+ |
| 1× | log-pow |
| 1× | rem-log-exp |
| 1× | add-cbrt-cube |
| 1× | flip3-+ |
| 1.0ms | (log (+ 1 x)) |
| 34.0ms | (log (+ 1 x)) |
| 279.0ms | (- (+ (/ 1 x) (log -1)) (+ (log (/ -1 x)) (* 1/2 (/ 1 (pow x 2))))) |
| 158.0ms | (- (/ 1 x) (+ (log (/ 1 x)) (* 1/2 (/ 1 (pow x 2))))) |
| 154.0ms | (- (+ x (* 1/3 (pow x 3))) (* 1/2 (pow x 2))) |
| 5.0ms | (log (- (* 1 1) (* x x))) |
| 4.0ms | (log (+ (pow 1 3) (pow x 3))) |
3 alts after pruning (2 fresh and 1 done)
Merged error: 0.1b
Found 3 expressions with local error:
| 0.3b | (* x 1/3) |
| 0.0b | (* (- (* x 1/3) 1/2) (* x x)) |
| 0.0b | (+ (* (- (* x 1/3) 1/2) (* x x)) x) |
| 5× | add-exp-log |
| 5× | add-cbrt-cube |
| 5× | pow1 |
| 4× | add-cube-cbrt |
| 4× | *-un-lft-identity |
| 4× | add-sqr-sqrt |
| 3× | add-log-exp |
| 3× | associate-*l* |
| 2× | *-commutative |
| 2× | associate-*l/ |
| 1× | flip-- |
| 1× | flip-+ |
| 1× | cbrt-unprod |
| 1× | prod-exp |
| 1× | pow-prod-down |
| 1× | associate-*r* |
| 1× | flip3-- |
| 1× | flip3-+ |
| 1× | +-commutative |
| 6.0ms | (* (- (* x 1/3) 1/2) (* x x)) |
| 6.0ms | (+ (* (- (* x 1/3) 1/2) (* x x)) x) |
| 0.0ms | (* x 1/3) |
| 30.0ms | (* (- (* x 1/3) 1/2) (* x x)) |
| 21.0ms | (+ (* (- (* x 1/3) 1/2) (* x x)) x) |
| 7.0ms | (* x 1/3) |
| 522.0ms | (* (- (* (* x 1/3) (* x 1/3)) (* 1/2 1/2)) (* x x)) |
| 444.0ms | (* (* (* (- (* x 1/3) 1/2) (- (* x 1/3) 1/2)) (- (* x 1/3) 1/2)) (* (* (* x x) (* x x)) (* x x))) |
| 327.0ms | (* (- (pow (* x 1/3) 3) (pow 1/2 3)) (* x x)) |
| 145.0ms | (- (+ x (* 1/3 (pow x 3))) (* 1/2 (pow x 2))) |
| 108.0ms | (- (+ x (* 1/3 (pow x 3))) (* 1/2 (pow x 2))) |
4 alts after pruning (2 fresh and 2 done)
Merged error: 0.1b
Found 4 expressions with local error:
| 12.9b | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 12.9b | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 12.9b | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 0.4b | (* (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x))) |
| 18× | cbrt-div |
| 15× | cbrt-prod |
| 11× | add-cube-cbrt |
| 11× | *-un-lft-identity |
| 11× | add-sqr-sqrt |
| 9× | flip-+ |
| 9× | flip3-+ |
| 9× | pow1 |
| 7× | pow1/3 |
| 6× | add-exp-log |
| 6× | associate-*l* |
| 6× | associate-*r* |
| 4× | add-log-exp |
| 4× | add-cbrt-cube |
| 4× | frac-times |
| 2× | pow-prod-up |
| 2× | associate-*r/ |
| 2× | associate-*l/ |
| 2× | pow-prod-down |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | pow-plus |
| 1× | pow2 |
| 43.0ms | (* (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x))) |
| 4.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 4.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 4.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 87.0ms | (* (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x))) |
| 80.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 80.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 66.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 946.0ms | (* (cbrt (- (* (* (- (* x 1/3) 1/2) (* x x)) (* (- (* x 1/3) 1/2) (* x x))) (* x x))) (cbrt (+ (pow (* (- (* x 1/3) 1/2) (* x x)) 3) (pow x 3)))) |
| 900.0ms | (* (cbrt (+ (pow (* (- (* x 1/3) 1/2) (* x x)) 3) (pow x 3))) (cbrt (- (* (* (- (* x 1/3) 1/2) (* x x)) (* (- (* x 1/3) 1/2) (* x x))) (* x x)))) |
| 839.0ms | (* (cbrt (+ (* (* (- (* x 1/3) 1/2) (* x x)) (* (- (* x 1/3) 1/2) (* x x))) (- (* x x) (* (* (- (* x 1/3) 1/2) (* x x)) x)))) (cbrt (+ (* (* (- (* x 1/3) 1/2) (* x x)) (* (- (* x 1/3) 1/2) (* x x))) (- (* x x) (* (* (- (* x 1/3) 1/2) (* x x)) x))))) |
| 666.0ms | (* (cbrt (+ (pow (* (- (* x 1/3) 1/2) (* x x)) 3) (pow x 3))) (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x))) |
| 620.0ms | (* (cbrt (+ (pow (* (- (* x 1/3) 1/2) (* x x)) 3) (pow x 3))) (cbrt (+ (pow (* (- (* x 1/3) 1/2) (* x x)) 3) (pow x 3)))) |
5 alts after pruning (3 fresh and 2 done)
Merged error: 0.1b
Found 4 expressions with local error:
| 29.9b | (cbrt (pow x 4)) |
| 18.0b | (cbrt (pow x 7)) |
| 12.9b | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 12.9b | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 12× | cbrt-prod |
| 8× | add-cube-cbrt |
| 8× | *-un-lft-identity |
| 8× | add-sqr-sqrt |
| 4× | add-log-exp |
| 4× | add-exp-log |
| 4× | pow1/3 |
| 4× | add-cbrt-cube |
| 4× | cbrt-div |
| 4× | pow1 |
| 2× | flip-+ |
| 2× | flip3-+ |
| 8.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 8.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 1.0ms | (cbrt (pow x 4)) |
| 1.0ms | (cbrt (pow x 7)) |
| 332.0ms | (cbrt (pow x 7)) |
| 316.0ms | (cbrt (pow x 4)) |
| 67.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 59.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 510.0ms | (cbrt (+ (pow (* (- (* x 1/3) 1/2) (* x x)) 3) (pow x 3))) |
| 457.0ms | (cbrt (+ (pow (* (- (* x 1/3) 1/2) (* x x)) 3) (pow x 3))) |
| 313.0ms | (cbrt (- (* (* (- (* x 1/3) 1/2) (* x x)) (* (- (* x 1/3) 1/2) (* x x))) (* x x))) |
| 292.0ms | (cbrt (- (* (* (- (* x 1/3) 1/2) (* x x)) (* (- (* x 1/3) 1/2) (* x x))) (* x x))) |
| 225.0ms | (- (+ (* 3/4 (/ (exp (* 1/3 (- (log 1/3) (* 3 (log (/ 1 x)))))) (pow x 2))) (exp (* 1/3 (- (log 1/3) (* 3 (log (/ 1 x))))))) (* 1/2 (/ (exp (* 1/3 (- (log 1/3) (* 3 (log (/ 1 x)))))) x))) |
5 alts after pruning (3 fresh and 2 done)
Merged error: 0.1b
99.4% (0.1b remaining)
Error of 0.2b against oracle of 0.1b and baseline of 21.0b
| 10752× | (pre true 80) |
| 2849× | (body real 80) |
| 2752× | (body nan 80) |
| 2248× | (body real 1280) |
| 1693× | (body real 640) |
| 793× | (body real 320) |
| 417× | (body real 160) |