



Bits error versus x




Bits error versus y
Results
| Original | 20.2 |
|---|---|
| Target | 0.1 |
| Herbie | 6.0 |
if y < -1.3266524044529779e+154 or 1.8045349817621806e-222 < y < 2.0891795127861158e-165Initial program 55.1
Taylor expanded around 0 10.2
if -1.3266524044529779e+154 < y < -6.45209558740925e-161 or 2.0891795127861158e-165 < y Initial program 0.4
if -6.45209558740925e-161 < y < 1.8045349817621806e-222Initial program 28.4
rmApplied associate-/l*28.9
Taylor expanded around inf 13.4
Final simplification6.0
herbie shell --seed 2018362
(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: 19.8s)Debug log
1 alts after pruning (1 fresh and 0 done)
Merged error: 20.5b
Found 1 expressions with local error:
| 20.5b | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
1 calls. Slowest were:
| 8.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
1 calls. Slowest were:
| 43.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
27 calls. Slowest were:
| 479.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 351.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
| 300.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)))) |
5 alts after pruning (4 fresh and 1 done)
Merged error: 0.9b
Found 0 expressions with local error:
0 calls. Slowest were:
0 calls. Slowest were:
0 calls. Slowest were:
5 alts after pruning (3 fresh and 2 done)
Merged error: 0.9b
Found 2 expressions with local error:
| 20.0b | (/ (+ (* x x) (* y y)) (+ x y)) |
| 0.0b | (/ (- x y) (/ (+ (* x x) (* y y)) (+ x y))) |
2 calls. Slowest were:
| 11.0ms | (/ (+ (* x x) (* y y)) (+ x y)) |
| 6.0ms | (/ (- x y) (/ (+ (* x x) (* y y)) (+ x y))) |
2 calls. Slowest were:
| 44.0ms | (/ (+ (* x x) (* y y)) (+ x y)) |
| 33.0ms | (/ (- x y) (/ (+ (* x x) (* y y)) (+ x y))) |
150 calls. Slowest were:
| 537.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)))) |
| 399.0ms | (/ (* (cbrt (- x y)) (cbrt (- x y))) (/ (* (cbrt (+ (* x x) (* y y))) (cbrt (+ (* x x) (* y y)))) (* (cbrt (+ x y)) (cbrt (+ x y))))) |
| 374.0ms | (/ (sqrt (- x y)) (/ (+ (* x x) (* y y)) (- (* x x) (* y y)))) |
4 alts after pruning (2 fresh and 2 done)
Merged error: 0.9b
Found 3 expressions with local error:
| 20.0b | (/ (+ (* x x) (* y y)) (+ x y)) |
| 0.0b | (/ 1 (/ (/ (+ (* x x) (* y y)) (+ x y)) (- x y))) |
| 0.0b | (/ (/ (+ (* x x) (* y y)) (+ x y)) (- x y)) |
3 calls. Slowest were:
| 11.0ms | (/ (/ (+ (* x x) (* y y)) (+ x y)) (- x y)) |
| 9.0ms | (/ (+ (* x x) (* y y)) (+ x y)) |
| 4.0ms | (/ 1 (/ (/ (+ (* x x) (* y y)) (+ x y)) (- x y))) |
3 calls. Slowest were:
| 56.0ms | (/ 1 (/ (/ (+ (* x x) (* y y)) (+ x y)) (- x y))) |
| 55.0ms | (/ (/ (+ (* x x) (* y y)) (+ x y)) (- x y)) |
| 45.0ms | (/ (+ (* x x) (* y y)) (+ x y)) |
205 calls. Slowest were:
| 366.0ms | (/ (* (* (/ (+ (* x x) (* y y)) (+ x y)) (/ (+ (* x x) (* y y)) (+ x y))) (/ (+ (* x x) (* y y)) (+ x y))) (* (* (- x y) (- x y)) (- x y))) |
| 259.0ms | (/ (/ (* (cbrt (+ (* x x) (* y y))) (cbrt (+ (* x x) (* y y)))) (* (cbrt (+ x y)) (cbrt (+ x y)))) (* (cbrt (- x y)) (cbrt (- x y)))) |
| 202.0ms | (/ (/ (+ (* x x) (* y y)) (- (* x x) (* y y))) (sqrt (- x y))) |
4 alts after pruning (1 fresh and 3 done)
Merged error: 0.9b
73.6% (5.5b remaining)
Error of 6.0b against oracle of 0.5b and baseline of 21.3b