



Bits error versus x




Bits error versus y
Results
| Original | 19.9 |
|---|---|
| Target | 0.0 |
| Herbie | 5.3 |
if y < -1.357340002977744e+154Initial program 63.6
Taylor expanded around 0 0
if -1.357340002977744e+154 < y < -1.787951934820732e-159 or 7.233557195507802e-162 < y Initial program 0.0
rmApplied add-cube-cbrt0.1
if -1.787951934820732e-159 < y < 7.233557195507802e-162Initial program 29.9
Taylor expanded around -inf 16.5
Final simplification5.3
herbie shell --seed 2019010
(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: 25.5s)Debug log
| 291.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 19.5b
Found 2 expressions with local error:
| 19.5b | (/ (* (- 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)) |
| 37.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 14.0ms | (+ (* x x) (* y y)) |
| 550.0ms | (- (log (* (- x y) (+ x y))) (log (+ (* x x) (* y y)))) |
| 457.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 313.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
| 288.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)))) |
| 282.0ms | (* (- (* x x) (* y y)) (+ (pow x 3) (pow y 3))) |
5 alts after pruning (5 fresh and 0 done)
Merged error: 0.5b
Found 0 expressions with local error:
5 alts after pruning (4 fresh and 1 done)
Merged error: 0.5b
Found 4 expressions with local error:
| 19.5b | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 19.5b | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 19.5b | (/ (* (- 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 |
| 17.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 14.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))) |
| 8.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 182.0ms | (* (cbrt (/ (* (- x y) (+ x y)) (+ (* x x) (* y y)))) (cbrt (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))))) |
| 56.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))) |
| 467.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 401.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 396.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
| 364.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
| 357.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
5 alts after pruning (3 fresh and 2 done)
Merged error: 0.5b
Found 4 expressions with local error:
| 19.3b | (/ (* (- x y) (+ x y)) (sqrt (+ (* x x) (* y y)))) |
| 19.2b | (sqrt (+ (* x x) (* y y))) |
| 19.2b | (sqrt (+ (* x x) (* y y))) |
| 0.0b | (+ (* x x) (* y y)) |
| 12× | sqrt-prod |
| 12× | add-sqr-sqrt |
| 10× | add-cube-cbrt |
| 10× | *-un-lft-identity |
| 9× | add-exp-log |
| 9× | add-cbrt-cube |
| 8× | associate-/l/ |
| 7× | flip-+ |
| 7× | flip3-+ |
| 6× | add-log-exp |
| 6× | sqrt-div |
| 6× | times-frac |
| 6× | associate-/r* |
| 4× | pow1 |
| 4× | frac-times |
| 3× | flip-- |
| 3× | flip3-- |
| 2× | associate-/r/ |
| 2× | associate-*r/ |
| 2× | associate-*l/ |
| 2× | div-exp |
| 2× | pow1/2 |
| 2× | rem-sqrt-square |
| 2× | cbrt-undiv |
| 1× | associate-/l* |
| 1× | div-inv |
| 1× | cbrt-unprod |
| 1× | prod-exp |
| 1× | frac-2neg |
| 1× | sum-log |
| 1× | clear-num |
| 1× | +-commutative |
| 16.0ms | (/ (* (- x y) (+ x y)) (sqrt (+ (* x x) (* y y)))) |
| 4.0ms | (+ (* x x) (* y y)) |
| 4.0ms | (sqrt (+ (* x x) (* y y))) |
| 4.0ms | (sqrt (+ (* x x) (* y y))) |
| 62.0ms | (/ (* (- x y) (+ x y)) (sqrt (+ (* x x) (* y y)))) |
| 19.0ms | (sqrt (+ (* x x) (* y y))) |
| 18.0ms | (sqrt (+ (* x x) (* y y))) |
| 14.0ms | (+ (* x x) (* y y)) |
| 429.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
| 387.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 239.0ms | (* (- (* x x) (* y y)) (+ (pow x 3) (pow y 3))) |
| 199.0ms | (/ (* (* (* (- x y) (- x y)) (- x y)) (* (* (+ x y) (+ x y)) (+ x y))) (* (* (sqrt (+ (* x x) (* y y))) (sqrt (+ (* x x) (* y y)))) (sqrt (+ (* x x) (* y y))))) |
| 187.0ms | (* (- (pow x 3) (pow y 3)) (+ x y)) |
5 alts after pruning (2 fresh and 3 done)
Merged error: 0.5b
76.9% (4.8b remaining)
Error of 5.3b against oracle of 0.5b and baseline of 21.4b