


Bits error versus x
Results
Initial program 58.3
Simplified58.3
Taylor expanded around 0 0.3
Final simplification0.3
herbie shell --seed 2019016
(FPCore (x)
:name "Hyperbolic arc-(co)tangent"
(* (/ 1 2) (log (/ (+ 1 x) (- 1 x)))))
Time bar (total: 15.0s)Debug log
| 524× | (pre true 80) |
| 268× | (body nan 80) |
| 105× | (body real 1280) |
| 82× | (body real 640) |
| 41× | (body real 320) |
| 17× | (body real 160) |
| 11× | (body real 80) |
| 73.0ms | (* (/ 1 2) (log (/ (+ 1 x) (- 1 x)))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 58.2b
Found 2 expressions with local error:
| 6.1b | (log (/ (+ x 1) (- 1 x))) |
| 0.0b | (/ (+ x 1) (- 1 x)) |
| 18× | times-frac |
| 17× | add-cube-cbrt |
| 17× | *-un-lft-identity |
| 17× | add-sqr-sqrt |
| 15× | log-prod |
| 7× | add-exp-log |
| 4× | associate-/r/ |
| 4× | add-cbrt-cube |
| 3× | associate-/l* |
| 3× | associate-/r* |
| 3× | pow1 |
| 2× | associate-/l/ |
| 2× | add-log-exp |
| 2× | flip-- |
| 2× | div-inv |
| 2× | rem-log-exp |
| 2× | div-exp |
| 2× | flip3-- |
| 1× | flip-+ |
| 1× | log-pow |
| 1× | flip3-+ |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | log-div |
| 1× | cbrt-undiv |
| 3.0ms | (/ (+ x 1) (- 1 x)) |
| 1.0ms | (log (/ (+ x 1) (- 1 x))) |
| 95.0ms | (log (/ (+ x 1) (- 1 x))) |
| 16.0ms | (/ (+ x 1) (- 1 x)) |
| 331.0ms | (/ (* (* (+ x 1) (+ x 1)) (+ x 1)) (* (* (- 1 x) (- 1 x)) (- 1 x))) |
| 167.0ms | (- (+ (* 2 (/ 1 (pow x 2))) (+ (* 2 (/ 1 x)) 1))) |
| 157.0ms | (- (+ (* 2 (/ 1 (pow x 2))) (+ (* 2 (/ 1 x)) 1))) |
| 98.0ms | (log (/ (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (cbrt (- 1 x)) (cbrt (- 1 x))))) |
| 60.0ms | (+ (* 2 (/ 1 x)) (+ (* 2/3 (/ 1 (pow x 3))) (log -1))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 0.0b
Found 3 expressions with local error:
| 0.1b | (* 2/3 (pow x 3)) |
| 0.1b | (* 2/5 (pow x 5)) |
| 0.0b | (+ (* 2/3 (pow x 3)) (* 2/5 (pow x 5))) |
| 8× | associate-*r* |
| 5× | add-log-exp |
| 5× | add-cube-cbrt |
| 5× | *-un-lft-identity |
| 5× | add-sqr-sqrt |
| 3× | add-exp-log |
| 3× | add-cbrt-cube |
| 3× | pow1 |
| 2× | *-commutative |
| 1× | flip-+ |
| 1× | unpow3 |
| 1× | flip3-+ |
| 1× | sum-log |
| 1× | +-commutative |
| 1× | cube-mult |
| 3.0ms | (+ (* 2/3 (pow x 3)) (* 2/5 (pow x 5))) |
| 1.0ms | (* 2/3 (pow x 3)) |
| 1.0ms | (* 2/5 (pow x 5)) |
| 83.0ms | (+ (* 2/3 (pow x 3)) (* 2/5 (pow x 5))) |
| 25.0ms | (* 2/5 (pow x 5)) |
| 16.0ms | (* 2/3 (pow x 3)) |
| 20.0ms | (+ (* 2/3 (pow x 3)) (* 2/5 (pow x 5))) |
| 18.0ms | (* (exp (* 2/3 (pow x 3))) (exp (* 2/5 (pow x 5)))) |
| 13.0ms | (+ (* 2/3 (pow x 3)) (* 2/5 (pow x 5))) |
| 12.0ms | (+ (* 2/3 (pow x 3)) (* 2/5 (pow x 5))) |
| 6.0ms | (* 2/3 (pow x 3)) |
3 alts after pruning (2 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 2.3b | (log (exp (* 2/5 (pow x 5)))) |
| 0.1b | (* 2/3 (pow x 3)) |
| 0.1b | (* 2/5 (pow x 5)) |
| 0.0b | (+ (* 2/3 (pow x 3)) (log (exp (* 2/5 (pow x 5))))) |
| 8× | add-cube-cbrt |
| 8× | associate-*r* |
| 8× | *-un-lft-identity |
| 8× | add-sqr-sqrt |
| 6× | log-prod |
| 5× | add-log-exp |
| 5× | pow1 |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 3× | associate-+r+ |
| 2× | *-commutative |
| 2× | log-pow |
| 1× | flip-+ |
| 1× | rem-log-exp |
| 1× | unpow3 |
| 1× | flip3-+ |
| 1× | sum-log |
| 1× | exp-prod |
| 1× | +-commutative |
| 1× | cube-mult |
| 10.0ms | (+ (* 2/3 (pow x 3)) (log (exp (* 2/5 (pow x 5))))) |
| 3.0ms | (log (exp (* 2/5 (pow x 5)))) |
| 2.0ms | (* 2/3 (pow x 3)) |
| 2.0ms | (* 2/5 (pow x 5)) |
| 91.0ms | (+ (* 2/3 (pow x 3)) (log (exp (* 2/5 (pow x 5))))) |
| 38.0ms | (* 2/5 (pow x 5)) |
| 35.0ms | (log (exp (* 2/5 (pow x 5)))) |
| 27.0ms | (* 2/3 (pow x 3)) |
| 34.0ms | (* (exp (* 2/3 (pow x 3))) (exp (* 2/5 (pow x 5)))) |
| 24.0ms | (+ (* 2/3 (pow x 3)) (* 2/5 (pow x 5))) |
| 24.0ms | (+ (* 2/3 (pow x 3)) (* 2/5 (pow x 5))) |
| 24.0ms | (+ (* 2/3 (pow x 3)) (* 2/5 (pow x 5))) |
| 13.0ms | (log (exp (* 2/5 (pow x 5)))) |
3 alts after pruning (1 fresh and 2 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 6.3b | (log (sqrt (+ 1 x))) |
| 6.1b | (log (/ (sqrt (+ x 1)) (- 1 x))) |
| 0.0b | (/ (sqrt (+ x 1)) (- 1 x)) |
| 0.0b | (+ (log (sqrt (+ 1 x))) (log (/ (sqrt (+ x 1)) (- 1 x)))) |
| 60× | log-prod |
| 54× | times-frac |
| 53× | *-un-lft-identity |
| 49× | add-cube-cbrt |
| 49× | add-sqr-sqrt |
| 36× | sqrt-prod |
| 24× | associate-+r+ |
| 10× | add-exp-log |
| 10× | pow1 |
| 7× | log-pow |
| 6× | associate-/l* |
| 6× | associate-/r/ |
| 6× | sqrt-div |
| 6× | add-cbrt-cube |
| 6× | associate-+l+ |
| 6× | log-div |
| 4× | add-log-exp |
| 4× | distribute-lft-out |
| 4× | flip-+ |
| 4× | flip3-+ |
| 3× | flip-- |
| 3× | div-inv |
| 3× | rem-log-exp |
| 3× | flip3-- |
| 3× | associate-/r* |
| 2× | associate-/l/ |
| 2× | associate-+l- |
| 2× | div-exp |
| 1× | pow1/2 |
| 1× | frac-2neg |
| 1× | sum-log |
| 1× | associate-+r- |
| 1× | clear-num |
| 1× | +-commutative |
| 1× | cbrt-undiv |
| 9.0ms | (+ (log (sqrt (+ 1 x))) (log (/ (sqrt (+ x 1)) (- 1 x)))) |
| 7.0ms | (/ (sqrt (+ x 1)) (- 1 x)) |
| 4.0ms | (log (/ (sqrt (+ x 1)) (- 1 x))) |
| 2.0ms | (log (sqrt (+ 1 x))) |
| 146.0ms | (+ (log (sqrt (+ 1 x))) (log (/ (sqrt (+ x 1)) (- 1 x)))) |
| 63.0ms | (log (/ (sqrt (+ x 1)) (- 1 x))) |
| 35.0ms | (log (sqrt (+ 1 x))) |
| 22.0ms | (/ (sqrt (+ x 1)) (- 1 x)) |
| 162.0ms | (- (+ (* 1/2 x) (* 1/6 (pow x 3))) (* 1/4 (pow x 2))) |
| 161.0ms | (/ (* (* (sqrt (+ x 1)) (sqrt (+ x 1))) (sqrt (+ x 1))) (* (* (- 1 x) (- 1 x)) (- 1 x))) |
| 133.0ms | (+ (* 3/2 x) (+ (* 1/2 (pow x 3)) (* 1/4 (pow x 2)))) |
| 74.0ms | (log (/ (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))) (* (cbrt (- 1 x)) (cbrt (- 1 x))))) |
| 58.0ms | (log (/ (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))) 1)) |
3 alts after pruning (1 fresh and 2 done)
Merged error: 0b
0% (0.2b remaining)
Error of 0.3b against oracle of 0.0b and baseline of 0.3b
| 15997× | (pre true 80) |
| 7996× | (body nan 80) |
| 3363× | (body real 1280) |
| 2518× | (body real 640) |
| 1257× | (body real 320) |
| 636× | (body real 160) |
| 227× | (body real 80) |