



Bits error versus x
| Original | 14.5 |
|---|---|
| Target | 0.1 |
| Herbie | 0.0 |
if x < -1.357340002977744e+154 or 15474336.42221833 < x Initial program 39.6
Simplified39.6
Taylor expanded around -inf 0.0
if -1.357340002977744e+154 < x < 15474336.42221833Initial program 0.1
Simplified0.1
rmApplied add-sqr-sqrt0.1
Applied associate-/r*0.0
Final simplification0.0
herbie shell --seed 2019010 +o rules:numerics
(FPCore (x)
:name "x / (x^2 + 1)"
:herbie-target
(/ 1 (+ x (/ 1 x)))
(/ x (+ (* x x) 1)))
Time bar (total: 11.2s)Debug log
| 5.0ms | (/ x (+ (* x x) 1)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 12.7b
Found 1 expressions with local error:
| 12.7b | (/ 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)) |
| 64.0ms | (- (+ (/ 1 (pow x 5)) (/ 1 x)) (/ 1 (pow x 3))) |
| 63.0ms | (- (+ (/ 1 (pow x 5)) (/ 1 x)) (/ 1 (pow x 3))) |
| 42.0ms | (- (+ x (pow x 5)) (pow x 3)) |
| 3.0ms | (sqrt (fma x x 1)) |
| 3.0ms | (cbrt (fma x x 1)) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 0b
Found 2 expressions with local error:
| 12.6b | (sqrt (fma x x 1)) |
| 12.6b | (sqrt (fma x x 1)) |
| 6× | sqrt-prod |
| 6× | add-sqr-sqrt |
| 4× | add-cube-cbrt |
| 4× | *-un-lft-identity |
| 2× | add-log-exp |
| 2× | log1p-expm1-u |
| 2× | add-exp-log |
| 2× | pow1/2 |
| 2× | add-cbrt-cube |
| 2× | rem-sqrt-square |
| 2× | pow1 |
| 2× | expm1-log1p-u |
| 1.0ms | (sqrt (fma x x 1)) |
| 1.0ms | (sqrt (fma x x 1)) |
| 25.0ms | (sqrt (fma x x 1)) |
| 21.0ms | (sqrt (fma x x 1)) |
| 195.0ms | (- (+ x (* 1/2 (/ 1 x))) (* 1/8 (/ 1 (pow x 3)))) |
| 181.0ms | (- (* 1/8 (/ 1 (pow x 3))) (+ x (* 1/2 (/ 1 x)))) |
| 163.0ms | (- (* 1/8 (/ 1 (pow x 3))) (+ x (* 1/2 (/ 1 x)))) |
| 155.0ms | (- (+ x (* 1/2 (/ 1 x))) (* 1/8 (/ 1 (pow x 3)))) |
| 50.0ms | (- (+ (* 1/2 (pow x 2)) 1) (* 1/8 (pow x 4))) |
2 alts after pruning (1 fresh and 1 done)
Merged error: 0b
Found 3 expressions with local error:
| 19.8b | (- (+ (/ 1 (pow x 5)) (/ 1 x)) (/ 1 (pow x 3))) |
| 0.2b | (/ 1 (pow x 3)) |
| 0.0b | (/ 1 (pow x 5)) |
| 52× | *-un-lft-identity |
| 42× | div-inv |
| 28× | distribute-lft-out |
| 28× | prod-diff |
| 19× | add-sqr-sqrt |
| 17× | add-cube-cbrt |
| 10× | distribute-lft-out-- |
| 8× | add-log-exp |
| 8× | associate-/r* |
| 7× | fma-neg |
| 5× | add-exp-log |
| 4× | rec-exp |
| 3× | log1p-expm1-u |
| 3× | frac-sub |
| 3× | add-cbrt-cube |
| 3× | pow1 |
| 3× | expm1-log1p-u |
| 2× | inv-pow |
| 2× | pow-flip |
| 2× | diff-log |
| 2× | frac-2neg |
| 2× | clear-num |
| 2× | pow-to-exp |
| 1× | difference-of-squares |
| 1× | flip-- |
| 1× | flip-+ |
| 1× | associate--l+ |
| 1× | frac-add |
| 1× | unpow3 |
| 1× | flip3-- |
| 1× | flip3-+ |
| 1× | sub-neg |
| 1× | sum-log |
| 1× | cube-mult |
| 29.0ms | (- (+ (/ 1 (pow x 5)) (/ 1 x)) (/ 1 (pow x 3))) |
| 1.0ms | (/ 1 (pow x 3)) |
| 1.0ms | (/ 1 (pow x 5)) |
| 33.0ms | (/ 1 (pow x 5)) |
| 22.0ms | (/ 1 (pow x 3)) |
| 19.0ms | (- (+ (/ 1 (pow x 5)) (/ 1 x)) (/ 1 (pow x 3))) |
| 341.0ms | (* (- (/ 1 (pow x 5)) (/ 1 x)) (pow x 3)) |
| 318.0ms | (- (* (+ (pow (/ 1 (pow x 5)) 3) (pow (/ 1 x) 3)) (pow x 3)) (* (+ (* (/ 1 (pow x 5)) (/ 1 (pow x 5))) (- (* (/ 1 x) (/ 1 x)) (* (/ 1 (pow x 5)) (/ 1 x)))) 1)) |
| 276.0ms | (- (* (- (* (/ 1 (pow x 5)) (/ 1 (pow x 5))) (* (/ 1 x) (/ 1 x))) (pow x 3)) (* (- (/ 1 (pow x 5)) (/ 1 x)) 1)) |
| 254.0ms | (- (* (+ (* 1 x) (* (pow x 5) 1)) (pow x 3)) (* (* (pow x 5) x) 1)) |
| 215.0ms | (fma 1 (+ (/ 1 (pow x 5)) (/ 1 x)) (- (* (/ 1 (pow x 3)) 1))) |
2 alts after pruning (0 fresh and 2 done)
Merged error: 0b
100% (0.0b remaining)
Error of 0.0b against oracle of 0.0b and baseline of 14.4b