



Bits error versus x
Results
| Original | 39.0 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
if x < 0.00014066850350312815Initial program 59.0
Taylor expanded around 0 0.2
Simplified0.2
if 0.00014066850350312815 < x Initial program 0.1
Final simplification0.2
herbie shell --seed 2019022
(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: 25.9s)Debug log
| 71.0ms | 80× | body | 1280 | valid |
| 22.0ms | 47× | body | 640 | valid |
| 6.0ms | 24× | body | 320 | valid |
| 5.0ms | 93× | body | 80 | valid |
| 3.0ms | 76× | body | 80 | nan |
| 2.0ms | 12× | body | 160 | valid |
| 2.0ms | (log (+ 1 x)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 38.2b
Found 1 expressions with local error:
| 4.4b | (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-+ |
| 2.0ms | (log (+ 1 x)) |
| 38.0ms | (log (+ 1 x)) |
| 324.0ms | (- (+ (/ 1 x) (log -1)) (+ (log (/ -1 x)) (* 1/2 (/ 1 (pow x 2))))) |
| 124.0ms | (- (/ 1 x) (+ (log (/ 1 x)) (* 1/2 (/ 1 (pow x 2))))) |
| 113.0ms | (- (+ x (* 1/3 (pow x 3))) (* 1/2 (pow x 2))) |
| 8.0ms | (log (- (* 1 1) (* x x))) |
| 6.0ms | (log (+ (pow 1 3) (pow x 3))) |
2 alts after pruning (1 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.3b | (* x 1/3) |
| 0.1b | (* (- (* x 1/3) 1/2) (* x x)) |
| 0.0b | (- (* x 1/3) 1/2) |
| 0.0b | (+ (* (- (* x 1/3) 1/2) (* x x)) x) |
| 6× | add-exp-log |
| 6× | add-cbrt-cube |
| 6× | pow1 |
| 5× | add-cube-cbrt |
| 5× | *-un-lft-identity |
| 5× | add-sqr-sqrt |
| 4× | add-log-exp |
| 3× | associate-*l* |
| 2× | flip-- |
| 2× | *-commutative |
| 2× | associate-*l/ |
| 2× | flip3-- |
| 1× | flip-+ |
| 1× | cbrt-unprod |
| 1× | prod-exp |
| 1× | pow-prod-down |
| 1× | associate-*r* |
| 1× | flip3-+ |
| 1× | sub-neg |
| 1× | +-commutative |
| 11.0ms | (* (- (* x 1/3) 1/2) (* x x)) |
| 7.0ms | (+ (* (- (* x 1/3) 1/2) (* x x)) x) |
| 3.0ms | (- (* x 1/3) 1/2) |
| 0.0ms | (* x 1/3) |
| 38.0ms | (* (- (* x 1/3) 1/2) (* x x)) |
| 25.0ms | (- (* x 1/3) 1/2) |
| 16.0ms | (+ (* (- (* x 1/3) 1/2) (* x x)) x) |
| 7.0ms | (* x 1/3) |
| 401.0ms | (* (- (* (* x 1/3) (* x 1/3)) (* 1/2 1/2)) (* x x)) |
| 371.0ms | (* (- (pow (* x 1/3) 3) (pow 1/2 3)) (* x x)) |
| 363.0ms | (* (* (* (- (* x 1/3) 1/2) (- (* x 1/3) 1/2)) (- (* x 1/3) 1/2)) (* (* (* x x) (* x x)) (* x x))) |
| 108.0ms | (- (+ x (* 1/3 (pow x 3))) (* 1/2 (pow x 2))) |
| 102.0ms | (- (+ x (* 1/3 (pow x 3))) (* 1/2 (pow x 2))) |
3 alts after pruning (1 fresh and 2 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 12.6b | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 12.6b | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 12.6b | (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 |
| 37.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)) |
| 81.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 76.0ms | (* (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x))) |
| 71.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 62.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 906.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)))) |
| 841.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)))) |
| 583.0ms | (cbrt (+ (pow (* (- (* x 1/3) 1/2) (* x x)) 3) (pow x 3))) |
| 555.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)))) |
| 515.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))) |
4 alts after pruning (2 fresh and 2 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 12.6b | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 12.6b | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 12.6b | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 12.6b | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 12× | cbrt-prod |
| 8× | add-cube-cbrt |
| 8× | *-un-lft-identity |
| 8× | cbrt-div |
| 8× | add-sqr-sqrt |
| 4× | add-log-exp |
| 4× | flip-+ |
| 4× | add-exp-log |
| 4× | pow1/3 |
| 4× | add-cbrt-cube |
| 4× | flip3-+ |
| 4× | pow1 |
| 7.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 5.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)) |
| 71.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 67.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 63.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 59.0ms | (cbrt (+ (* (- (* x 1/3) 1/2) (* x x)) x)) |
| 793.0ms | (cbrt (+ (pow (* (- (* x 1/3) 1/2) (* x x)) 3) (pow x 3))) |
| 573.0ms | (cbrt (+ (pow (* (- (* x 1/3) 1/2) (* x x)) 3) (pow x 3))) |
| 483.0ms | (cbrt (+ (pow (* (- (* x 1/3) 1/2) (* x x)) 3) (pow x 3))) |
| 459.0ms | (cbrt (+ (pow (* (- (* x 1/3) 1/2) (* x x)) 3) (pow x 3))) |
| 374.0ms | (cbrt (- (* (* (- (* x 1/3) 1/2) (* x x)) (* (- (* x 1/3) 1/2) (* x x))) (* x x))) |
4 alts after pruning (1 fresh and 3 done)
Merged error: 0.0b
99.4% (0.1b remaining)
Error of 0.2b against oracle of 0.1b and baseline of 20.9b
| 1.6s | 2239× | body | 1280 | valid |
| 685.0ms | 1677× | body | 640 | valid |
| 206.0ms | 879× | body | 320 | valid |
| 135.0ms | 2826× | body | 80 | valid |
| 118.0ms | 2590× | body | 80 | nan |
| 46.0ms | 379× | body | 160 | valid |