


Bits error versus x
Results
Initial program 58.3
rmApplied tanh-undef0.0
Final simplification0.0
herbie shell --seed 2019010 +o rules:numerics
(FPCore (x)
:name "Hyperbolic tangent"
(/ (- (exp x) (exp (- x))) (+ (exp x) (exp (- x)))))
Time bar (total: 16.2s)Debug log
| 33.0ms | (/ (- (exp x) (exp (- x))) (+ (exp x) (exp (- x)))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 58.7b
Found 2 expressions with local error:
| 5.4b | (- (exp x) (exp (- x))) |
| 0.7b | (/ (- (exp x) (exp (- x))) (+ (exp x) (exp (- x)))) |
| 44× | *-un-lft-identity |
| 32× | add-sqr-sqrt |
| 20× | add-cube-cbrt |
| 20× | times-frac |
| 9× | prod-diff |
| 6× | difference-of-squares |
| 6× | distribute-lft-out-- |
| 6× | distribute-lft-out |
| 5× | associate-/l* |
| 4× | add-log-exp |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | associate-/r* |
| 3× | fma-neg |
| 2× | associate-/l/ |
| 2× | flip-- |
| 2× | log1p-expm1-u |
| 2× | associate-/r/ |
| 2× | flip3-- |
| 2× | pow1 |
| 2× | expm1-log1p-u |
| 1× | div-inv |
| 1× | flip-+ |
| 1× | tanh-undef |
| 1× | div-exp |
| 1× | div-sub |
| 1× | diff-log |
| 1× | flip3-+ |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | clear-num |
| 1× | cbrt-undiv |
| 25.0ms | (/ (- (exp x) (exp (- x))) (+ (exp x) (exp (- x)))) |
| 5.0ms | (- (exp x) (exp (- x))) |
| 86.0ms | (/ (- (exp x) (exp (- x))) (+ (exp x) (exp (- x)))) |
| 55.0ms | (- (exp x) (exp (- x))) |
| 379.0ms | (- (* (exp x) (exp x)) (* (exp (- x)) (exp (- x)))) |
| 198.0ms | (+ (* (exp x) (exp x)) (- (* (exp (- x)) (exp (- x))) (* (exp x) (exp (- x))))) |
| 115.0ms | (- (pow (exp x) 3) (pow (exp (- x)) 3)) |
| 91.0ms | (+ (* 2 x) (+ (* 1/3 (pow x 3)) (* 1/60 (pow x 5)))) |
| 76.0ms | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 0b
Found 1 expressions with local error:
| 0.0b | (tanh x) |
| 1× | add-log-exp |
| 1× | tanh-def |
| 1× | log1p-expm1-u |
| 1× | add-cube-cbrt |
| 1× | add-exp-log |
| 1× | add-cbrt-cube |
| 1× | *-un-lft-identity |
| 1× | pow1 |
| 1× | expm1-log1p-u |
| 1× | add-sqr-sqrt |
| 0.0ms | (tanh x) |
| 106.0ms | (tanh x) |
| 128.0ms | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
| 49.0ms | (/ (- (exp x) (exp (* -1 x))) (+ (exp (* -1 x)) (exp x))) |
| 28.0ms | (/ (- (exp x) (exp (- x))) (+ (exp x) (exp (- x)))) |
2 alts after pruning (1 fresh and 1 done)
Merged error: 0b
Found 4 expressions with local error:
| 0.1b | (* 1/3 (pow x 3)) |
| 0.1b | (* 2/15 (pow x 5)) |
| 0.0b | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
| 0.0b | (+ x (* 2/15 (pow x 5))) |
| 8× | add-cube-cbrt |
| 8× | associate-*r* |
| 8× | *-un-lft-identity |
| 8× | add-sqr-sqrt |
| 6× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 3× | prod-diff |
| 3× | fma-neg |
| 2× | *-commutative |
| 1× | flip-- |
| 1× | flip-+ |
| 1× | associate--l+ |
| 1× | unpow3 |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | flip3-+ |
| 1× | sub-neg |
| 1× | +-commutative |
| 1× | cube-mult |
| 11.0ms | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
| 3.0ms | (* 1/3 (pow x 3)) |
| 2.0ms | (* 2/15 (pow x 5)) |
| 2.0ms | (+ x (* 2/15 (pow x 5))) |
| 50.0ms | (+ x (* 2/15 (pow x 5))) |
| 41.0ms | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
| 25.0ms | (* 2/15 (pow x 5)) |
| 16.0ms | (* 1/3 (pow x 3)) |
| 151.0ms | (fma 1 (+ x (* 2/15 (pow x 5))) (- (* (pow x 3) 1/3))) |
| 119.0ms | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
| 109.0ms | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
| 105.0ms | (/ (exp (+ x (* 2/15 (pow x 5)))) (exp (* 1/3 (pow x 3)))) |
| 100.0ms | (- (+ x (* 2/15 (pow x 5))) (* 1/3 (pow x 3))) |
2 alts after pruning (0 fresh and 2 done)
Merged error: 0b
0% (0.0b remaining)
Error of 0.0b against oracle of 0.0b and baseline of 0.0b