



Bits error versus x0




Bits error versus x1
| Original | 8.4 |
|---|---|
| Target | 0.5 |
| Herbie | 4.6 |
if x1 < 0.00023680172729492185Initial program 11.3
rmApplied add-sqr-sqrt10.7
Applied fma-neg11.6
rmApplied add-log-exp10.4
rmApplied add-exp-log10.4
rmApplied add-sqr-sqrt10.4
Applied exp-prod10.4
Applied log-pow11.6
Applied log-prod11.6
Applied exp-sum11.6
Simplified8.3
if 0.00023680172729492185 < x1 Initial program 5.5
rmApplied add-sqr-sqrt4.4
Applied fma-neg3.2
rmApplied add-log-exp1.6
rmApplied add-exp-log1.0
Final simplification4.6
herbie shell --seed 2019010 +o rules:numerics
(FPCore (x0 x1)
:name "(- (/ x0 (- 1 x1)) x0)"
:pre (or (and (== x0 1.855) (== x1 0.000209)) (and (== x0 2.985) (== x1 0.0186)))
:herbie-target
(/ (* x0 x1) (- 1 x1))
(- (/ x0 (- 1 x1)) x0))
Time bar (total: 4.5s)Debug log
| 8.0ms | (- (/ x0 (- 1 x1)) x0) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 8.4b
Found 2 expressions with local error:
| 7.5b | (- (/ x0 (- 1 x1)) x0) |
| 1.0b | (/ x0 (- 1 x1)) |
| 6× | fma-neg |
| 4× | add-cube-cbrt |
| 4× | associate-/r/ |
| 4× | *-un-lft-identity |
| 4× | add-sqr-sqrt |
| 3× | flip-- |
| 3× | flip3-- |
| 3× | associate-/r* |
| 2× | add-log-exp |
| 2× | div-inv |
| 2× | log1p-expm1-u |
| 2× | add-exp-log |
| 2× | add-cbrt-cube |
| 2× | pow1 |
| 2× | expm1-log1p-u |
| 1× | frac-2neg |
| 1× | sub-neg |
| 1× | clear-num |
| 10.0ms | (- (/ x0 (- 1 x1)) x0) |
| 1.0ms | (/ x0 (- 1 x1)) |
| 37.0ms | (- (/ x0 (- 1 x1)) x0) |
| 24.0ms | (/ x0 (- 1 x1)) |
| 806.0ms | (+ (* x0 (pow x1 3)) (+ (* x0 (pow x1 2)) (* x0 x1))) |
| 176.0ms | (+ x0 (+ (* x0 x1) (* x0 (pow x1 2)))) |
| 59.0ms | (- (+ (/ x0 (pow x1 3)) (+ (/ x0 (pow x1 2)) (/ x0 x1)))) |
| 50.0ms | (- (+ x0 (+ (/ x0 x1) (/ x0 (pow x1 2))))) |
| 49.0ms | (- (+ (/ x0 (pow x1 3)) (+ (/ x0 (pow x1 2)) (/ x0 x1)))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 6.8b
Found 3 expressions with local error:
| 7.4b | (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)) |
| 1.0b | (/ x0 (- 1 x1)) |
| 1.0b | (/ x0 (- 1 x1)) |
| 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× | flip-- |
| 2× | div-inv |
| 2× | flip3-- |
| 2× | frac-2neg |
| 2× | clear-num |
| 1× | fma-udef |
| 1.0ms | (/ x0 (- 1 x1)) |
| 1.0ms | (/ x0 (- 1 x1)) |
| 0.0ms | (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)) |
| 93.0ms | (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)) |
| 26.0ms | (/ x0 (- 1 x1)) |
| 24.0ms | (/ x0 (- 1 x1)) |
| 173.0ms | (+ x0 (+ (* x0 x1) (* x0 (pow x1 2)))) |
| 154.0ms | (+ x0 (+ (* x0 x1) (* x0 (pow x1 2)))) |
| 80.0ms | (- (+ (/ x0 (pow x1 3)) (+ (/ x0 (pow x1 2)) (/ x0 x1)))) |
| 72.0ms | (- (+ (/ x0 (pow x1 3)) (+ (/ x0 (pow x1 2)) (/ x0 x1)))) |
| 52.0ms | (- (+ (/ x0 (pow x1 3)) (+ (/ x0 (pow x1 2)) (/ x0 x1)))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 6.0b
Found 4 expressions with local error:
| 7.4b | (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)) |
| 6.0b | (log (exp (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)))) |
| 1.0b | (/ x0 (- 1 x1)) |
| 1.0b | (/ x0 (- 1 x1)) |
| 8× | add-cube-cbrt |
| 8× | *-un-lft-identity |
| 8× | add-sqr-sqrt |
| 6× | associate-/r* |
| 5× | pow1 |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | log-pow |
| 4× | associate-/r/ |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | log-prod |
| 4× | expm1-log1p-u |
| 3× | exp-prod |
| 2× | flip-- |
| 2× | div-inv |
| 2× | fma-udef |
| 2× | flip3-- |
| 2× | frac-2neg |
| 2× | clear-num |
| 1× | exp-sum |
| 1× | rem-log-exp |
| 2.0ms | (log (exp (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)))) |
| 0.0ms | (/ x0 (- 1 x1)) |
| 0.0ms | (/ x0 (- 1 x1)) |
| 0.0ms | (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)) |
| 87.0ms | (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)) |
| 78.0ms | (log (exp (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)))) |
| 27.0ms | (/ x0 (- 1 x1)) |
| 25.0ms | (/ x0 (- 1 x1)) |
| 165.0ms | (+ x0 (+ (* x0 x1) (* x0 (pow x1 2)))) |
| 135.0ms | (+ x0 (+ (* x0 x1) (* x0 (pow x1 2)))) |
| 83.0ms | (- (+ (/ x0 (pow x1 3)) (+ (/ x0 (pow x1 2)) (/ x0 x1)))) |
| 55.0ms | (- (+ (/ x0 (pow x1 3)) (+ (/ x0 (pow x1 2)) (/ x0 x1)))) |
| 46.0ms | (- (+ (/ x0 (pow x1 3)) (+ (/ x0 (pow x1 2)) (/ x0 x1)))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 4.6b
Found 4 expressions with local error:
| 7.4b | (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)) |
| 6.0b | (log (exp (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)))) |
| 1.0b | (exp (log (log (exp (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)))))) |
| 1.0b | (/ x0 (- 1 x1)) |
| 11× | log-prod |
| 10× | add-cube-cbrt |
| 10× | *-un-lft-identity |
| 10× | exp-prod |
| 10× | add-sqr-sqrt |
| 9× | log-pow |
| 8× | exp-sum |
| 7× | pow1 |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | expm1-log1p-u |
| 3× | associate-/r* |
| 2× | fma-udef |
| 2× | associate-/r/ |
| 1× | rem-exp-log |
| 1× | flip-- |
| 1× | div-inv |
| 1× | rem-log-exp |
| 1× | flip3-- |
| 1× | frac-2neg |
| 1× | clear-num |
| 4.0ms | (exp (log (log (exp (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)))))) |
| 4.0ms | (log (exp (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)))) |
| 0.0ms | (/ x0 (- 1 x1)) |
| 0.0ms | (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)) |
| 112.0ms | (exp (log (log (exp (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)))))) |
| 86.0ms | (log (exp (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)))) |
| 84.0ms | (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)) |
| 24.0ms | (/ x0 (- 1 x1)) |
| 129.0ms | (+ x0 (+ (* x0 x1) (* x0 (pow x1 2)))) |
| 82.0ms | (- (+ (/ x0 (pow x1 3)) (+ (/ x0 (pow x1 2)) (/ x0 x1)))) |
| 56.0ms | (- (+ (/ x0 (pow x1 3)) (+ (/ x0 (pow x1 2)) (/ x0 x1)))) |
| 54.0ms | (exp (sqrt (log (log (exp (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0))))))) |
| 47.0ms | (exp (* (cbrt (log (log (exp (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)))))) (cbrt (log (log (exp (fma (sqrt (/ x0 (- 1 x1))) (sqrt (/ x0 (- 1 x1))) (- x0)))))))) |
2 alts after pruning (1 fresh and 1 done)
Merged error: 4.6b
100% (0.0b remaining)
Error of 4.6b against oracle of 4.6b and baseline of 5.7b