



Bits error versus x




Bits error versus y
Results
| Original | 20.0 |
|---|---|
| Target | 0.1 |
| Herbie | 4.9 |
if y < -1.3385669613614879e+154Initial program 63.6
Taylor expanded around 0 0
if -1.3385669613614879e+154 < y < -4.11638679057694e-162 or 1.6449638335729248e-162 < y Initial program 0.1
rmApplied associate-/l*0.5
rmApplied flip-+0.1
Applied associate-/r/0.1
Applied associate-/r*0.1
rmApplied +-commutative0.1
if -4.11638679057694e-162 < y < 1.6449638335729248e-162Initial program 29.6
rmApplied associate-/l*30.0
rmApplied flip-+29.6
Applied associate-/r/29.6
Applied associate-/r*29.6
Taylor expanded around -inf 15.2
Final simplification4.9
herbie shell --seed 2019004
(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: 1.7m)Debug log
1 calls. Slowest were:
| 187.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 23.5b
Found 2 expressions with local error:
| 23.5b | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 0.0b | (+ (* x x) (* y y)) |
2 calls. Slowest were:
| 8.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 2.0ms | (+ (* x x) (* y y)) |
2 calls. Slowest were:
| 41.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 15.0ms | (+ (* x x) (* y y)) |
31 calls. Slowest were:
| 419.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 342.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
| 319.0ms | (* (- (* x x) (* y y)) (+ (pow x 3) (pow y 3))) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0.8b
Found 0 expressions with local error:
0 calls. Slowest were:
0 calls. Slowest were:
0 calls. Slowest were:
4 alts after pruning (3 fresh and 1 done)
Merged error: 0.8b
Found 3 expressions with local error:
| 22.6b | (/ (+ (* x x) (* y y)) (+ x y)) |
| 0.0b | (/ (- x y) (/ (+ (* x x) (* y y)) (+ x y))) |
| 0.0b | (+ (* x x) (* y y)) |
3 calls. Slowest were:
| 8.0ms | (/ (+ (* x x) (* y y)) (+ x y)) |
| 5.0ms | (/ (- x y) (/ (+ (* x x) (* y y)) (+ x y))) |
| 2.0ms | (+ (* x x) (* y y)) |
3 calls. Slowest were:
| 41.0ms | (/ (+ (* x x) (* y y)) (+ x y)) |
| 40.0ms | (/ (- x y) (/ (+ (* x x) (* y y)) (+ x y))) |
| 17.0ms | (+ (* x x) (* y y)) |
154 calls. Slowest were:
| 550.0ms | (/ (* (* (- x y) (- x y)) (- x y)) (* (* (/ (+ (* x x) (* y y)) (+ x y)) (/ (+ (* x x) (* y y)) (+ x y))) (/ (+ (* x x) (* y y)) (+ x y)))) |
| 359.0ms | (/ (* (cbrt (- x y)) (cbrt (- x y))) (/ (* (cbrt (+ (* x x) (* y y))) (cbrt (+ (* x x) (* y y)))) (* (cbrt (+ x y)) (cbrt (+ x y))))) |
| 316.0ms | (/ (* (cbrt (- x y)) (cbrt (- x y))) (/ (+ (* x x) (* y y)) (+ (pow x 3) (pow y 3)))) |
4 alts after pruning (2 fresh and 2 done)
Merged error: 0.8b
Found 4 expressions with local error:
| 23.5b | (/ (+ (* x x) (* y y)) (- (* x x) (* y y))) |
| 0.0b | (/ (/ (- x y) (/ (+ (* x x) (* y y)) (- (* x x) (* y y)))) (- x y)) |
| 0.0b | (/ (- x y) (/ (+ (* x x) (* y y)) (- (* x x) (* y y)))) |
| 0.0b | (+ (* x x) (* y y)) |
4 calls. Slowest were:
| 28.0ms | (/ (/ (- x y) (/ (+ (* x x) (* y y)) (- (* x x) (* y y)))) (- x y)) |
| 19.0ms | (/ (+ (* x x) (* y y)) (- (* x x) (* y y))) |
| 14.0ms | (/ (- x y) (/ (+ (* x x) (* y y)) (- (* x x) (* y y)))) |
4 calls. Slowest were:
| 48.0ms | (/ (- x y) (/ (+ (* x x) (* y y)) (- (* x x) (* y y)))) |
| 45.0ms | (/ (+ (* x x) (* y y)) (- (* x x) (* y y))) |
| 34.0ms | (/ (/ (- x y) (/ (+ (* x x) (* y y)) (- (* x x) (* y y)))) (- x y)) |
| 23.0ms | (+ (* x x) (* y y)) |
610 calls. Slowest were:
| 1.6s | (/ (/ (* (cbrt (- x y)) (cbrt (- x y))) (/ 1 (+ x y))) (* (cbrt (- x y)) (cbrt (- x y)))) |
| 1.3s | (/ (/ (* (cbrt (- x y)) (cbrt (- x y))) (/ 1 (sqrt (- (* x x) (* y y))))) (* (cbrt (- x y)) (cbrt (- x y)))) |
| 1.0s | (/ (/ (* (cbrt (- x y)) (cbrt (- x y))) 1) (* (cbrt (- x y)) (cbrt (- x y)))) |
5 alts after pruning (3 fresh and 2 done)
Merged error: 0.8b
79.2% (4.4b remaining)
Error of 4.9b against oracle of 0.5b and baseline of 21.6b