



Bits error versus x
Results
| Original | 15.2 |
|---|---|
| Target | 0.1 |
| Herbie | 0.8 |
Initial program 15.2
Simplified15.2
rmApplied add-sqr-sqrt15.2
Applied associate-/r*15.1
rmApplied *-un-lft-identity15.1
Applied sqrt-prod15.1
Applied add-cube-cbrt15.9
Applied times-frac15.9
Simplified15.9
Simplified0.8
Final simplification0.8
herbie shell --seed 2019016 +o rules:numerics
(FPCore (x)
:name "x / (x^2 + 1)"
:herbie-target
(/ 1 (+ x (/ 1 x)))
(/ x (+ (* x x) 1)))
Time bar (total: 8.8s)Debug log
| 256× | (pre true 80) |
| 256× | (body real 80) |
| 2.0ms | (/ x (+ (* x x) 1)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 14.4b
Found 1 expressions with local error:
| 14.4b | (/ x (fma x x 1)) |
| 3× | associate-/r* |
| 2× | add-cube-cbrt |
| 2× | *-un-lft-identity |
| 2× | add-sqr-sqrt |
| 1× | add-log-exp |
| 1× | div-inv |
| 1× | log1p-expm1-u |
| 1× | add-exp-log |
| 1× | add-cbrt-cube |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | pow1 |
| 1× | expm1-log1p-u |
| 1.0ms | (/ x (fma x x 1)) |
| 38.0ms | (/ x (fma x x 1)) |
| 43.0ms | (- (+ (/ 1 (pow x 5)) (/ 1 x)) (/ 1 (pow x 3))) |
| 41.0ms | (- (+ (/ 1 (pow x 5)) (/ 1 x)) (/ 1 (pow x 3))) |
| 25.0ms | (- (+ x (pow x 5)) (pow x 3)) |
| 4.0ms | (cbrt (fma x x 1)) |
| 4.0ms | (sqrt (fma x x 1)) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0b
Found 4 expressions with local error:
| 14.4b | (sqrt (fma x x 1)) |
| 14.4b | (sqrt (fma x x 1)) |
| 0.0b | (/ (/ x (sqrt (fma x x 1))) (sqrt (fma x x 1))) |
| 0.0b | (/ x (sqrt (fma x x 1))) |
| 27× | add-sqr-sqrt |
| 25× | add-cube-cbrt |
| 25× | *-un-lft-identity |
| 24× | sqrt-prod |
| 24× | times-frac |
| 12× | associate-/r* |
| 9× | div-inv |
| 6× | add-exp-log |
| 6× | add-cbrt-cube |
| 4× | add-log-exp |
| 4× | associate-/l* |
| 4× | log1p-expm1-u |
| 4× | pow1 |
| 4× | expm1-log1p-u |
| 2× | pow1/2 |
| 2× | frac-2neg |
| 2× | clear-num |
| 2× | rem-sqrt-square |
| 1× | associate-/l/ |
| 1× | div-exp |
| 1× | cbrt-undiv |
| 9.0ms | (/ (/ x (sqrt (fma x x 1))) (sqrt (fma x x 1))) |
| 2.0ms | (sqrt (fma x x 1)) |
| 2.0ms | (sqrt (fma x x 1)) |
| 1.0ms | (/ x (sqrt (fma x x 1))) |
| 43.0ms | (/ x (sqrt (fma x x 1))) |
| 35.0ms | (/ (/ x (sqrt (fma x x 1))) (sqrt (fma x x 1))) |
| 30.0ms | (sqrt (fma x x 1)) |
| 20.0ms | (sqrt (fma x x 1)) |
| 231.0ms | (- (* 1/8 (/ 1 (pow x 3))) (+ x (* 1/2 (/ 1 x)))) |
| 217.0ms | (/ (* (* (/ x (sqrt (fma x x 1))) (/ x (sqrt (fma x x 1)))) (/ x (sqrt (fma x x 1)))) (* (* (sqrt (fma x x 1)) (sqrt (fma x x 1))) (sqrt (fma x x 1)))) |
| 207.0ms | (- (+ x (* 1/2 (/ 1 x))) (* 1/8 (/ 1 (pow x 3)))) |
| 180.0ms | (- (* 1/8 (/ 1 (pow x 3))) (+ x (* 1/2 (/ 1 x)))) |
| 178.0ms | (- (+ (* 3/8 (/ 1 (pow x 4))) 1) (* 1/2 (/ 1 (pow x 2)))) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0b
Found 4 expressions with local error:
| 0.3b | (cbrt (/ x (hypot 1 x))) |
| 0.3b | (cbrt (/ x (hypot 1 x))) |
| 0.3b | (cbrt (/ x (hypot 1 x))) |
| 0.3b | (* (cbrt (/ x (hypot 1 x))) (cbrt (/ x (hypot 1 x)))) |
| 20× | cbrt-prod |
| 11× | add-cube-cbrt |
| 11× | *-un-lft-identity |
| 11× | add-sqr-sqrt |
| 9× | pow1 |
| 7× | associate-*l* |
| 7× | associate-*r* |
| 7× | pow1/3 |
| 7× | cbrt-div |
| 6× | add-exp-log |
| 5× | div-inv |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | add-cbrt-cube |
| 4× | expm1-log1p-u |
| 2× | pow-prod-up |
| 2× | pow-prod-down |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | associate-*r/ |
| 1× | prod-exp |
| 1× | associate-*l/ |
| 1× | pow-plus |
| 1× | frac-times |
| 1× | pow2 |
| 10.0ms | (* (cbrt (/ x (hypot 1 x))) (cbrt (/ x (hypot 1 x)))) |
| 1.0ms | (cbrt (/ x (hypot 1 x))) |
| 1.0ms | (cbrt (/ x (hypot 1 x))) |
| 1.0ms | (cbrt (/ x (hypot 1 x))) |
| 212.0ms | (cbrt (/ x (hypot 1 x))) |
| 198.0ms | (* (cbrt (/ x (hypot 1 x))) (cbrt (/ x (hypot 1 x)))) |
| 192.0ms | (cbrt (/ x (hypot 1 x))) |
| 168.0ms | (cbrt (/ x (hypot 1 x))) |
| 223.0ms | (- (+ (* 2/9 (/ (pow (cbrt -1) 2) (pow x 4))) (pow (cbrt -1) 2)) (* 1/3 (/ (pow (cbrt -1) 2) (pow x 2)))) |
| 212.0ms | (- (+ (cbrt -1) (* 7/72 (/ (cbrt -1) (pow x 4)))) (* 1/6 (/ (cbrt -1) (pow x 2)))) |
| 194.0ms | (- (+ (cbrt -1) (* 7/72 (/ (cbrt -1) (pow x 4)))) (* 1/6 (/ (cbrt -1) (pow x 2)))) |
| 192.0ms | (- (+ (cbrt -1) (* 7/72 (/ (cbrt -1) (pow x 4)))) (* 1/6 (/ (cbrt -1) (pow x 2)))) |
| 177.0ms | (- (+ (* 2/9 (/ 1 (pow x 4))) 1) (* 1/3 (/ 1 (pow x 2)))) |
4 alts after pruning (2 fresh and 2 done)
Merged error: 0b
Found 2 expressions with local error:
| 14.5b | (* x (/ 1 (fma x x 1))) |
| 0.1b | (/ 1 (fma x x 1)) |
| 4× | add-cube-cbrt |
| 4× | associate-*r* |
| 4× | *-un-lft-identity |
| 4× | add-sqr-sqrt |
| 3× | add-exp-log |
| 3× | associate-/r* |
| 3× | pow1 |
| 2× | add-log-exp |
| 2× | div-inv |
| 2× | log1p-expm1-u |
| 2× | add-cbrt-cube |
| 2× | expm1-log1p-u |
| 1× | inv-pow |
| 1× | pow-flip |
| 1× | *-commutative |
| 1× | un-div-inv |
| 1× | associate-*r/ |
| 1× | frac-2neg |
| 1× | clear-num |
| 1× | rec-exp |
| 5.0ms | (* x (/ 1 (fma x x 1))) |
| 1.0ms | (/ 1 (fma x x 1)) |
| 27.0ms | (* x (/ 1 (fma x x 1))) |
| 21.0ms | (/ 1 (fma x x 1)) |
| 51.0ms | (- (+ (/ 1 (pow x 2)) (/ 1 (pow x 6))) (/ 1 (pow x 4))) |
| 47.0ms | (- (+ (/ 1 (pow x 2)) (/ 1 (pow x 6))) (/ 1 (pow x 4))) |
| 41.0ms | (- (+ (/ 1 (pow x 5)) (/ 1 x)) (/ 1 (pow x 3))) |
| 40.0ms | (- (+ (/ 1 (pow x 5)) (/ 1 x)) (/ 1 (pow x 3))) |
| 36.0ms | (- (+ x (pow x 5)) (pow x 3)) |
4 alts after pruning (1 fresh and 3 done)
Merged error: 0b
0% (0.8b remaining)
Error of 0.8b against oracle of 0.0b and baseline of 0.8b
| 8000× | (pre true 80) |
| 8000× | (body real 80) |