



Bits error versus x




Bits error versus y
Results
| Original | 19.8 |
|---|---|
| Target | 0.1 |
| Herbie | 5.5 |
if y < -1.3290708708971715e+154 or 3.2282516006894912e-220 < y < 1.293098316436877e-183Initial program 57.4
Taylor expanded around 0 7.4
if -1.3290708708971715e+154 < y < -1.571247438036767e-162Initial program 0.0
rmApplied add-cube-cbrt0.0
rmApplied add-log-exp0.0
if -1.571247438036767e-162 < y < 3.2282516006894912e-220Initial program 29.2
Taylor expanded around inf 12.8
if 1.293098316436877e-183 < y Initial program 3.4
rmApplied add-cube-cbrt3.4
rmApplied add-cube-cbrt3.4
Final simplification5.5
herbie shell --seed 2019022
(FPCore (x y)
:name "Kahan p9 Example"
:pre (and (< 0 x 1) (< y 1))
:herbie-target
(if (< 0.5 (fabs (/ x y)) 2) (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) (- 1 (/ 2 (+ 1 (* (/ x y) (/ x y))))))
(/ (* (- x y) (+ x y)) (+ (* x x) (* y y))))
Time bar (total: 46.8s)Debug log
| 34.0ms | 256× | body | 80 | valid |
| 11.0ms | 256× | pre | 80 | true |
| 228.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 19.0b
Found 2 expressions with local error:
| 19.0b | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 0.0b | (+ (* x x) (* y y)) |
| 8× | associate-/l/ |
| 7× | add-exp-log |
| 7× | add-cbrt-cube |
| 5× | flip-+ |
| 5× | flip3-+ |
| 4× | add-log-exp |
| 4× | add-cube-cbrt |
| 4× | *-un-lft-identity |
| 4× | frac-times |
| 4× | add-sqr-sqrt |
| 3× | flip-- |
| 3× | flip3-- |
| 3× | times-frac |
| 3× | associate-/r* |
| 2× | associate-/r/ |
| 2× | associate-*r/ |
| 2× | associate-*l/ |
| 2× | div-exp |
| 2× | cbrt-undiv |
| 2× | pow1 |
| 1× | associate-/l* |
| 1× | div-inv |
| 1× | cbrt-unprod |
| 1× | prod-exp |
| 1× | frac-2neg |
| 1× | sum-log |
| 1× | clear-num |
| 1× | +-commutative |
| 8.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 2.0ms | (+ (* x x) (* y y)) |
| 41.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 14.0ms | (+ (* x x) (* y y)) |
| 359.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 344.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
| 266.0ms | (* (- (* x x) (* y y)) (+ (pow x 3) (pow y 3))) |
| 260.0ms | (/ (* (* (* (- x y) (+ x y)) (* (- x y) (+ x y))) (* (- x y) (+ x y))) (* (* (+ (* x x) (* y y)) (+ (* x x) (* y y))) (+ (* x x) (* y y)))) |
| 221.0ms | (/ (* (* (* (- x y) (- x y)) (- x y)) (* (* (+ x y) (+ x y)) (+ x y))) (* (* (+ (* x x) (* y y)) (+ (* x x) (* y y))) (+ (* x x) (* y y)))) |
6 alts after pruning (6 fresh and 0 done)
Merged error: 0.7b
Found 4 expressions with local error:
| 19.0b | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 19.0b | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 19.0b | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 0.0b | (* (cbrt (/ (* (- x y) (+ x y)) (+ (* x x) (* y y)))) (cbrt (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))))) |
| 24× | associate-/l/ |
| 21× | add-exp-log |
| 19× | add-cbrt-cube |
| 18× | cbrt-prod |
| 16× | add-cube-cbrt |
| 16× | *-un-lft-identity |
| 16× | add-sqr-sqrt |
| 15× | times-frac |
| 14× | flip-+ |
| 14× | flip3-+ |
| 13× | frac-times |
| 12× | associate-*l* |
| 12× | associate-*r* |
| 10× | associate-/r/ |
| 9× | flip-- |
| 9× | flip3-- |
| 9× | associate-/r* |
| 9× | pow1 |
| 7× | associate-*r/ |
| 7× | associate-*l/ |
| 6× | div-exp |
| 6× | cbrt-undiv |
| 5× | div-inv |
| 4× | add-log-exp |
| 4× | cbrt-unprod |
| 4× | prod-exp |
| 4× | pow1/3 |
| 4× | cbrt-div |
| 3× | associate-/l* |
| 3× | frac-2neg |
| 3× | clear-num |
| 2× | pow-prod-up |
| 2× | pow-prod-down |
| 1× | *-commutative |
| 1× | pow-plus |
| 1× | pow2 |
| 18.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 15.0ms | (* (cbrt (/ (* (- x y) (+ x y)) (+ (* x x) (* y y)))) (cbrt (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))))) |
| 15.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 15.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 179.0ms | (* (cbrt (/ (* (- x y) (+ x y)) (+ (* x x) (* y y)))) (cbrt (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))))) |
| 51.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 46.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 44.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 430.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 391.0ms | (* (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) (/ (* (- x y) (+ x y)) (+ (* x x) (* y y)))) |
| 386.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
| 365.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 347.0ms | (* (- (* x x) (* y y)) (+ x y)) |
6 alts after pruning (6 fresh and 0 done)
Merged error: 0.7b
Found 4 expressions with local error:
| 19.0b | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 19.0b | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 19.0b | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 0.0b | (* (cbrt (/ (* (- x y) (+ x y)) (+ (* x x) (* y y)))) (cbrt (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))))) |
| 24× | associate-/l/ |
| 21× | add-exp-log |
| 19× | add-cbrt-cube |
| 18× | cbrt-prod |
| 16× | add-cube-cbrt |
| 16× | *-un-lft-identity |
| 16× | add-sqr-sqrt |
| 15× | times-frac |
| 14× | flip-+ |
| 14× | flip3-+ |
| 13× | frac-times |
| 12× | associate-*l* |
| 12× | associate-*r* |
| 10× | associate-/r/ |
| 9× | flip-- |
| 9× | flip3-- |
| 9× | associate-/r* |
| 9× | pow1 |
| 7× | associate-*r/ |
| 7× | associate-*l/ |
| 6× | div-exp |
| 6× | cbrt-undiv |
| 5× | div-inv |
| 4× | add-log-exp |
| 4× | cbrt-unprod |
| 4× | prod-exp |
| 4× | pow1/3 |
| 4× | cbrt-div |
| 3× | associate-/l* |
| 3× | frac-2neg |
| 3× | clear-num |
| 2× | pow-prod-up |
| 2× | pow-prod-down |
| 1× | *-commutative |
| 1× | pow-plus |
| 1× | pow2 |
| 11.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 9.0ms | (* (cbrt (/ (* (- x y) (+ x y)) (+ (* x x) (* y y)))) (cbrt (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))))) |
| 8.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 7.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 173.0ms | (* (cbrt (/ (* (- x y) (+ x y)) (+ (* x x) (* y y)))) (cbrt (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))))) |
| 34.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 33.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 32.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 728.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 376.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 368.0ms | (* (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) (/ (* (- x y) (+ x y)) (+ (* x x) (* y y)))) |
| 358.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
| 346.0ms | (* (- (* x x) (* y y)) (+ x y)) |
6 alts after pruning (5 fresh and 1 done)
Merged error: 0.7b
Found 4 expressions with local error:
| 19.0b | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 19.0b | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 19.0b | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 19.0b | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 32× | associate-/l/ |
| 24× | add-exp-log |
| 24× | add-cbrt-cube |
| 16× | flip-+ |
| 16× | flip3-+ |
| 16× | frac-times |
| 12× | flip-- |
| 12× | add-cube-cbrt |
| 12× | flip3-- |
| 12× | times-frac |
| 12× | *-un-lft-identity |
| 12× | associate-/r* |
| 12× | add-sqr-sqrt |
| 8× | associate-/r/ |
| 8× | associate-*r/ |
| 8× | associate-*l/ |
| 8× | div-exp |
| 8× | cbrt-undiv |
| 4× | add-log-exp |
| 4× | associate-/l* |
| 4× | div-inv |
| 4× | cbrt-unprod |
| 4× | prod-exp |
| 4× | frac-2neg |
| 4× | clear-num |
| 4× | pow1 |
| 10.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 8.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 7.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 7.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 53.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 50.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 36.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 35.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 452.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 427.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
| 387.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
| 380.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 366.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
6 alts after pruning (4 fresh and 2 done)
Merged error: 0.7b
73.9% (5.1b remaining)
Error of 5.5b against oracle of 0.4b and baseline of 19.8b
| 1.1s | 8000× | body | 80 | valid |
| 300.0ms | 8000× | pre | 80 | true |