



Bits error versus x




Bits error versus y
Results
| Original | 19.7 |
|---|---|
| Target | 0.1 |
| Herbie | 5.3 |
if y < -2.2820246712762874e-41Initial program 27.1
rmApplied *-un-lft-identity27.1
Applied times-frac26.6
Simplified26.6
Taylor expanded around 0 0.5
if -2.2820246712762874e-41 < y < -7.402706151578305e-166 or 3.611390805282423e-195 < y Initial program 3.4
rmApplied *-un-lft-identity3.4
Applied times-frac4.3
Simplified4.3
if -7.402706151578305e-166 < y < 3.611390805282423e-195Initial program 30.3
rmApplied clear-num30.3
Taylor expanded around -inf 13.3
Final simplification5.3
herbie shell --seed 2019005
(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: 18.1s)Debug log
1 calls. Slowest were:
| 213.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 16.1b
Found 2 expressions with local error:
| 16.1b | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 0.0b | (+ (* x x) (* y y)) |
2 calls. Slowest were:
| 9.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 3.0ms | (+ (* x x) (* y y)) |
2 calls. Slowest were:
| 54.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 16.0ms | (+ (* x x) (* y y)) |
31 calls. Slowest were:
| 395.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 392.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
| 277.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 (4 fresh and 0 done)
Merged error: 0.9b
Found 3 expressions with local error:
| 16.0b | (/ (+ (* x x) (* y y)) (* (- x y) (+ x y))) |
| 0.0b | (/ 1 (/ (+ (* x x) (* y y)) (* (- x y) (+ x y)))) |
| 0.0b | (+ (* x x) (* y y)) |
3 calls. Slowest were:
| 11.0ms | (/ (+ (* x x) (* y y)) (* (- x y) (+ x y))) |
| 4.0ms | (/ 1 (/ (+ (* x x) (* y y)) (* (- x y) (+ x y)))) |
| 2.0ms | (+ (* x x) (* y y)) |
3 calls. Slowest were:
| 55.0ms | (/ 1 (/ (+ (* x x) (* y y)) (* (- x y) (+ x y)))) |
| 54.0ms | (/ (+ (* x x) (* y y)) (* (- x y) (+ x y))) |
| 24.0ms | (+ (* x x) (* y y)) |
50 calls. Slowest were:
| 266.0ms | (/ (* (* (+ (* x x) (* y y)) (+ (* x x) (* y y))) (+ (* x x) (* y y))) (* (* (* (- x y) (+ x y)) (* (- x y) (+ x y))) (* (- x y) (+ x y)))) |
| 247.0ms | (/ (* (* (+ (* x x) (* y y)) (+ (* x x) (* y y))) (+ (* x x) (* y y))) (* (* (* (- x y) (- x y)) (- x y)) (* (* (+ x y) (+ x y)) (+ x y)))) |
| 186.0ms | (/ (+ (* x x) (* y y)) (* (- x y) (+ x y))) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0.9b
Found 3 expressions with local error:
| 15.4b | (/ (+ x y) (+ (* x x) (* y y))) |
| 0.2b | (* (- x y) (/ (+ x y) (+ (* x x) (* y y)))) |
| 0.0b | (+ (* x x) (* y y)) |
3 calls. Slowest were:
| 8.0ms | (/ (+ x y) (+ (* x x) (* y y))) |
| 8.0ms | (* (- x y) (/ (+ x y) (+ (* x x) (* y y)))) |
| 2.0ms | (+ (* x x) (* y y)) |
3 calls. Slowest were:
| 56.0ms | (* (- x y) (/ (+ x y) (+ (* x x) (* y y)))) |
| 30.0ms | (/ (+ x y) (+ (* x x) (* y y))) |
| 25.0ms | (+ (* x x) (* y y)) |
68 calls. Slowest were:
| 481.0ms | (* (* (* (- x y) (- x y)) (- x y)) (* (* (/ (+ x y) (+ (* x x) (* y y))) (/ (+ x y) (+ (* x x) (* y y)))) (/ (+ x y) (+ (* x x) (* y y))))) |
| 438.0ms | (* (- (pow x 3) (pow y 3)) (/ (+ x y) (+ (* x x) (* y y)))) |
| 400.0ms | (* (- (* x x) (* y y)) (+ x y)) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0.9b
Found 4 expressions with local error:
| 16.7b | (* (+ (* x x) (* y y)) (/ 1 (* (- x y) (+ x y)))) |
| 0.5b | (/ 1 (* (- x y) (+ x y))) |
| 0.0b | (/ 1 (* (+ (* x x) (* y y)) (/ 1 (* (- x y) (+ x y))))) |
| 0.0b | (+ (* x x) (* y y)) |
4 calls. Slowest were:
| 11.0ms | (* (+ (* x x) (* y y)) (/ 1 (* (- x y) (+ x y)))) |
| 8.0ms | (/ 1 (* (+ (* x x) (* y y)) (/ 1 (* (- x y) (+ x y))))) |
| 4.0ms | (/ 1 (* (- x y) (+ x y))) |
4 calls. Slowest were:
| 50.0ms | (/ 1 (* (+ (* x x) (* y y)) (/ 1 (* (- x y) (+ x y))))) |
| 40.0ms | (/ 1 (* (- x y) (+ x y))) |
| 38.0ms | (* (+ (* x x) (* y y)) (/ 1 (* (- x y) (+ x y)))) |
| 23.0ms | (+ (* x x) (* y y)) |
60 calls. Slowest were:
| 267.0ms | (+ (log (+ (* x x) (* y y))) (log (/ 1 (* (- x y) (+ x y))))) |
| 260.0ms | (* (+ (* x x) (* y y)) (/ 1 (* (- x y) (+ x y)))) |
| 213.0ms | (* (- (* (* x x) (* x x)) (* (* y y) (* y y))) (/ 1 (* (- x y) (+ x y)))) |
4 alts after pruning (2 fresh and 2 done)
Merged error: 0.9b
75.4% (4.8b remaining)
Error of 5.3b against oracle of 0.5b and baseline of 20.0b