



Bits error versus x




Bits error versus y
Results
| Original | 20.0 |
|---|---|
| Target | 0.0 |
| Herbie | 5.4 |
if y < -1.3396022331219297e+154 or -1.0705598109984798e-175 < y < -2.4722449832826208e-216Initial program 56.9
rmApplied add-sqr-sqrt56.9
Applied associate-/r*56.9
Taylor expanded around 0 8.1
if -1.3396022331219297e+154 < y < -1.0705598109984798e-175 or 1.7274153437829284e-162 < y Initial program 0.7
if -2.4722449832826208e-216 < y < 1.7274153437829284e-162Initial program 28.4
rmApplied add-sqr-sqrt28.4
Applied associate-/r*28.4
Taylor expanded around -inf 12.7
Final simplification5.4
herbie shell --seed 2019007
(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: 26.5s)Debug log
1 calls. Slowest were:
| 255.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 21.3b
Found 2 expressions with local error:
| 21.3b | (/ (* (- 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))) |
| 4.0ms | (+ (* x x) (* y y)) |
2 calls. Slowest were:
| 53.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 30.0ms | (+ (* x x) (* y y)) |
31 calls. Slowest were:
| 401.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 316.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
| 253.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)))) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0.6b
Found 4 expressions with local error:
| 20.4b | (/ (* (- x y) (+ x y)) (sqrt (+ (* x x) (* y y)))) |
| 20.3b | (sqrt (+ (* x x) (* y y))) |
| 20.3b | (sqrt (+ (* x x) (* y y))) |
| 0.0b | (/ (/ (* (- x y) (+ x y)) (sqrt (+ (* x x) (* y y)))) (sqrt (+ (* x x) (* y y)))) |
4 calls. Slowest were:
| 12.0ms | (/ (/ (* (- x y) (+ x y)) (sqrt (+ (* x x) (* y y)))) (sqrt (+ (* x x) (* y y)))) |
| 11.0ms | (/ (* (- x y) (+ x y)) (sqrt (+ (* x x) (* y y)))) |
| 2.0ms | (sqrt (+ (* x x) (* y y))) |
4 calls. Slowest were:
| 54.0ms | (/ (/ (* (- x y) (+ x y)) (sqrt (+ (* x x) (* y y)))) (sqrt (+ (* x x) (* y y)))) |
| 46.0ms | (/ (* (- x y) (+ x y)) (sqrt (+ (* x x) (* y y)))) |
| 34.0ms | (sqrt (+ (* x x) (* y y))) |
| 32.0ms | (sqrt (+ (* x x) (* y y))) |
227 calls. Slowest were:
| 411.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 358.0ms | (/ (* (- x y) (+ x y)) (sqrt (- (* (* x x) (* x x)) (* (* y y) (* y y))))) |
| 353.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
4 alts after pruning (2 fresh and 2 done)
Merged error: 0.6b
Found 0 expressions with local error:
0 calls. Slowest were:
0 calls. Slowest were:
0 calls. Slowest were:
4 alts after pruning (1 fresh and 3 done)
Merged error: 0.6b
Found 0 expressions with local error:
0 calls. Slowest were:
0 calls. Slowest were:
0 calls. Slowest were:
4 alts after pruning (0 fresh and 4 done)
Merged error: 0.6b
74.8% (4.9b remaining)
Error of 5.4b against oracle of 0.4b and baseline of 20.0b