


Bits error versus x
if x < -16001.301308519196 or 1.0187194309816852 < x Initial program 58.7
Taylor expanded around -inf 0.6
Simplified0.3
if -16001.301308519196 < x < 1.0187194309816852Initial program 0.1
rmApplied flip--0.1
Applied associate-/r/0.1
Applied add-cube-cbrt0.1
Applied prod-diff0.1
Simplified0.1
Simplified0.1
rmApplied add-exp-log0.1
Final simplification0.2
herbie shell --seed 2019016 +o rules:numerics
(FPCore (x)
:name "Asymptote C"
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))
Time bar (total: 2.4m)Debug log
| 256× | (pre true 80) |
| 131× | (body real 80) |
| 56× | (body real 1280) |
| 39× | (body real 640) |
| 16× | (body real 320) |
| 14× | (body real 160) |
| 22.0ms | (- (/ x (+ x 1)) (/ (+ x 1) (- x 1))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 29.2b
Found 3 expressions with local error:
| 3.5b | (- (/ x (+ x 1)) (/ (+ x 1) (- x 1))) |
| 0.0b | (/ (+ x 1) (- x 1)) |
| 0.0b | (/ x (+ x 1)) |
| 90× | prod-diff |
| 75× | add-sqr-sqrt |
| 72× | *-un-lft-identity |
| 70× | add-cube-cbrt |
| 64× | times-frac |
| 48× | associate-/r/ |
| 24× | div-inv |
| 18× | flip-+ |
| 18× | flip3-+ |
| 8× | flip-- |
| 8× | flip3-- |
| 6× | fma-neg |
| 6× | associate-/r* |
| 5× | add-log-exp |
| 5× | add-exp-log |
| 5× | add-cbrt-cube |
| 3× | associate-/l* |
| 3× | log1p-expm1-u |
| 3× | pow1 |
| 3× | expm1-log1p-u |
| 2× | associate-/l/ |
| 2× | difference-of-squares |
| 2× | frac-2neg |
| 2× | clear-num |
| 1× | distribute-lft-out-- |
| 1× | frac-sub |
| 1× | div-exp |
| 1× | diff-log |
| 1× | sub-neg |
| 1× | cbrt-undiv |
| 16.0ms | (- (/ x (+ x 1)) (/ (+ x 1) (- x 1))) |
| 7.0ms | (/ (+ x 1) (- x 1)) |
| 1.0ms | (/ x (+ x 1)) |
| 43.0ms | (- (/ x (+ x 1)) (/ (+ x 1) (- x 1))) |
| 14.0ms | (/ x (+ x 1)) |
| 10.0ms | (/ (+ x 1) (- x 1)) |
| 1.1s | (fma (/ x (- (* x x) (* 1 1))) (- x 1) (- (* (/ 1 (- x 1)) (+ x 1)))) |
| 826.0ms | (fma x (/ 1 (+ x 1)) (- (* (+ x 1) (/ (+ x 1) (- (* x x) (* 1 1)))))) |
| 775.0ms | (fma 1 (/ x (+ x 1)) (- (* (+ x 1) (/ (+ x 1) (- (* x x) (* 1 1)))))) |
| 763.0ms | (fma (/ x (- (* x x) (* 1 1))) (- x 1) (- (* (sqrt (/ (+ x 1) (- x 1))) (sqrt (/ (+ x 1) (- x 1)))))) |
| 728.0ms | (fma (/ x (- (* x x) (* 1 1))) (- x 1) (- (* (cbrt (/ (+ x 1) (- x 1))) (* (cbrt (/ (+ x 1) (- x 1))) (cbrt (/ (+ x 1) (- x 1))))))) |
3 alts after pruning (3 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 3.5b | (- (/ x (+ x 1)) (/ (+ x 1) (- x 1))) |
| 3.5b | (- (/ x (+ x 1)) (/ (+ x 1) (- x 1))) |
| 0.0b | (* (sqrt (- (/ x (+ x 1)) (/ (+ x 1) (- x 1)))) (sqrt (- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))) |
| 0.0b | (sqrt (- (/ x (+ x 1)) (/ (+ x 1) (- x 1)))) |
| 180× | prod-diff |
| 151× | add-sqr-sqrt |
| 135× | *-un-lft-identity |
| 125× | add-cube-cbrt |
| 113× | times-frac |
| 88× | associate-/r/ |
| 44× | div-inv |
| 32× | flip-+ |
| 32× | flip3-+ |
| 27× | sqrt-div |
| 23× | flip-- |
| 23× | flip3-- |
| 18× | sqrt-prod |
| 12× | fma-neg |
| 11× | frac-sub |
| 10× | difference-of-squares |
| 9× | associate-*l* |
| 9× | associate-*r* |
| 9× | pow1 |
| 9× | frac-times |
| 8× | add-log-exp |
| 6× | add-exp-log |
| 6× | add-cbrt-cube |
| 5× | distribute-lft-out-- |
| 5× | pow1/2 |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 3× | associate-*r/ |
| 3× | associate-*l/ |
| 2× | pow-prod-up |
| 2× | pow-prod-down |
| 2× | diff-log |
| 2× | sub-neg |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | sqrt-unprod |
| 1× | pow-plus |
| 1× | rem-square-sqrt |
| 1× | rem-sqrt-square |
| 1× | pow2 |
| 28.0ms | (* (sqrt (- (/ x (+ x 1)) (/ (+ x 1) (- x 1)))) (sqrt (- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))) |
| 17.0ms | (- (/ x (+ x 1)) (/ (+ x 1) (- x 1))) |
| 12.0ms | (sqrt (- (/ x (+ x 1)) (/ (+ x 1) (- x 1)))) |
| 9.0ms | (- (/ x (+ x 1)) (/ (+ x 1) (- x 1))) |
| 50.0ms | (sqrt (- (/ x (+ x 1)) (/ (+ x 1) (- x 1)))) |
| 48.0ms | (- (/ x (+ x 1)) (/ (+ x 1) (- x 1))) |
| 33.0ms | (* (sqrt (- (/ x (+ x 1)) (/ (+ x 1) (- x 1)))) (sqrt (- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))) |
| 30.0ms | (- (/ x (+ x 1)) (/ (+ x 1) (- x 1))) |
| 1.0s | (fma (/ x (- (* x x) (* 1 1))) (- x 1) (- (* (/ 1 (- x 1)) (+ x 1)))) |
| 960.0ms | (fma (/ x (- (* x x) (* 1 1))) (- x 1) (- (* (/ 1 (- x 1)) (+ x 1)))) |
| 822.0ms | (fma (/ x (- (* x x) (* 1 1))) (- x 1) (- (* (cbrt (/ (+ x 1) (- x 1))) (* (cbrt (/ (+ x 1) (- x 1))) (cbrt (/ (+ x 1) (- x 1))))))) |
| 792.0ms | (fma (- (+ (* x x) (+ (* 1 1) (* x 1)))) (/ (+ x 1) (- (pow x 3) (pow 1 3))) (* (+ (* x x) (+ (* 1 1) (* x 1))) (/ (+ x 1) (- (pow x 3) (pow 1 3))))) |
| 742.0ms | (fma (sqrt (/ x (+ x 1))) (sqrt (/ x (+ x 1))) (- (* (+ x 1) (/ (+ x 1) (- (* x x) (* 1 1)))))) |
3 alts after pruning (2 fresh and 1 done)
Merged error: 0.0b
Found 3 expressions with local error:
| 29.7b | (fma (/ -1 (+ -1 x)) (+ 1 x) (/ x (+ 1 x))) |
| 0.0b | (/ -1 (+ -1 x)) |
| 0.0b | (/ x (+ 1 x)) |
| 6× | associate-/r* |
| 5× | add-cube-cbrt |
| 5× | *-un-lft-identity |
| 5× | add-sqr-sqrt |
| 4× | associate-/r/ |
| 3× | add-log-exp |
| 3× | log1p-expm1-u |
| 3× | add-exp-log |
| 3× | add-cbrt-cube |
| 3× | pow1 |
| 3× | expm1-log1p-u |
| 2× | div-inv |
| 2× | flip-+ |
| 2× | flip3-+ |
| 2× | frac-2neg |
| 2× | clear-num |
| 1× | fma-udef |
| 1.0ms | (/ -1 (+ -1 x)) |
| 1.0ms | (/ x (+ 1 x)) |
| 0.0ms | (fma (/ -1 (+ -1 x)) (+ 1 x) (/ x (+ 1 x))) |
| 28.0ms | (fma (/ -1 (+ -1 x)) (+ 1 x) (/ x (+ 1 x))) |
| 10.0ms | (/ x (+ 1 x)) |
| 10.0ms | (/ -1 (+ -1 x)) |
| 494.0ms | (- (+ (* 3 (/ 1 (pow x 3))) (+ (/ 1 (pow x 2)) (* 3 (/ 1 x))))) |
| 486.0ms | (- (+ (* 3 (/ 1 (pow x 3))) (+ (/ 1 (pow x 2)) (* 3 (/ 1 x))))) |
| 75.0ms | (+ (* 1 1) (- (* x x) (* 1 x))) |
| 66.0ms | (- (+ (/ 1 (pow x 3)) (+ (/ 1 (pow x 2)) (/ 1 x)))) |
| 61.0ms | (- (+ x (pow x 3)) (pow x 2)) |
3 alts after pruning (2 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 29.7b | (fma (/ -1 (+ -1 x)) (+ 1 x) (/ x (+ 1 x))) |
| 3.7b | (log (fma (/ -1 (+ -1 x)) (+ 1 x) (/ x (+ 1 x)))) |
| 0.4b | (exp (log (fma (/ -1 (+ -1 x)) (+ 1 x) (/ x (+ 1 x))))) |
| 0.0b | (/ -1 (+ -1 x)) |
| 8× | add-cube-cbrt |
| 8× | *-un-lft-identity |
| 8× | add-sqr-sqrt |
| 6× | log-prod |
| 6× | pow1 |
| 5× | add-exp-log |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | add-cbrt-cube |
| 4× | exp-prod |
| 4× | expm1-log1p-u |
| 3× | exp-sum |
| 3× | associate-/r* |
| 2× | log-pow |
| 2× | associate-/r/ |
| 1× | rem-exp-log |
| 1× | div-inv |
| 1× | fma-udef |
| 1× | flip-+ |
| 1× | rem-log-exp |
| 1× | flip3-+ |
| 1× | frac-2neg |
| 1× | clear-num |
| 2.0ms | (exp (log (fma (/ -1 (+ -1 x)) (+ 1 x) (/ x (+ 1 x))))) |
| 1.0ms | (log (fma (/ -1 (+ -1 x)) (+ 1 x) (/ x (+ 1 x)))) |
| 1.0ms | (/ -1 (+ -1 x)) |
| 0.0ms | (fma (/ -1 (+ -1 x)) (+ 1 x) (/ x (+ 1 x))) |
| 68.0ms | (log (fma (/ -1 (+ -1 x)) (+ 1 x) (/ x (+ 1 x)))) |
| 42.0ms | (exp (log (fma (/ -1 (+ -1 x)) (+ 1 x) (/ x (+ 1 x))))) |
| 33.0ms | (fma (/ -1 (+ -1 x)) (+ 1 x) (/ x (+ 1 x))) |
| 11.0ms | (/ -1 (+ -1 x)) |
| 961.0ms | (- (+ (* 3 (/ 1 (pow x 3))) (+ (/ 1 (pow x 2)) (* 3 (/ 1 x))))) |
| 564.0ms | (+ (log -3) (+ (log (/ 1 x)) (+ (* 17/18 (/ 1 (pow x 2))) (* 1/3 (/ 1 x))))) |
| 560.0ms | (- (+ (* 3 (/ 1 (pow x 3))) (+ (/ 1 (pow x 2)) (* 3 (/ 1 x))))) |
| 537.0ms | (- (+ (* 3 (/ 1 (pow x 3))) (+ (/ 1 (pow x 2)) (* 3 (/ 1 x))))) |
| 517.0ms | (- (+ (* 3 (/ 1 (pow x 3))) (+ (/ 1 (pow x 2)) (* 3 (/ 1 x))))) |
3 alts after pruning (1 fresh and 2 done)
Merged error: 0.0b
100% (0.0b remaining)
Error of 0.2b against oracle of 0.2b and baseline of 30.0b
| 8000× | (pre true 80) |
| 4096× | (body real 80) |
| 1767× | (body real 1280) |
| 1213× | (body real 640) |
| 610× | (body real 320) |
| 314× | (body real 160) |