



Bits error versus x




Bits error versus y
Results
| Original | 20.5 |
|---|---|
| Target | 0.0 |
| Herbie | 5.5 |
if y < -1.326101464362353e+154Initial program 63.6
rmApplied add-log-exp63.6
Taylor expanded around 0 0
if -1.326101464362353e+154 < y < -7.866138089097476e-160Initial program 0.0
rmApplied add-log-exp0.0
if -7.866138089097476e-160 < y < 2.903536397889742e-204Initial program 29.9
rmApplied add-log-exp29.9
Taylor expanded around inf 14.9
if 2.903536397889742e-204 < y Initial program 5.9
rmApplied add-sqr-sqrt5.9
Applied times-frac6.3
Final simplification5.5
herbie shell --seed 2019002
(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: 17.7s)Debug log
1 calls. Slowest were:
| 195.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)) |
2 calls. Slowest were:
| 8.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 2.0ms | (+ (* x x) (* y y)) |
2 calls. Slowest were:
| 39.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 19.0ms | (+ (* x x) (* y y)) |
31 calls. Slowest were:
| 433.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 377.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
| 337.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.5b
Found 4 expressions with local error:
| 18.6b | (sqrt (+ (* x x) (* y y))) |
| 18.6b | (sqrt (+ (* x x) (* y y))) |
| 0.0b | (* (/ (- x y) (sqrt (+ (* x x) (* y y)))) (/ (+ x y) (sqrt (+ (* x x) (* y y))))) |
| 0.0b | (/ (+ x y) (sqrt (+ (* x x) (* y y)))) |
4 calls. Slowest were:
| 23.0ms | (* (/ (- x y) (sqrt (+ (* x x) (* y y)))) (/ (+ x y) (sqrt (+ (* x x) (* y y))))) |
| 8.0ms | (/ (+ x y) (sqrt (+ (* x x) (* y y)))) |
| 4.0ms | (sqrt (+ (* x x) (* y y))) |
4 calls. Slowest were:
| 63.0ms | (/ (+ x y) (sqrt (+ (* x x) (* y y)))) |
| 38.0ms | (* (/ (- x y) (sqrt (+ (* x x) (* y y)))) (/ (+ x y) (sqrt (+ (* x x) (* y y))))) |
| 20.0ms | (sqrt (+ (* x x) (* y y))) |
| 19.0ms | (sqrt (+ (* x x) (* y y))) |
134 calls. Slowest were:
| 429.0ms | (+ (- (log (- x y)) (log (sqrt (+ (* x x) (* y y))))) (- (log (+ x y)) (log (sqrt (+ (* x x) (* y y)))))) |
| 328.0ms | (+ (- (log (- x y)) (log (sqrt (+ (* x x) (* y y))))) (log (/ (+ x y) (sqrt (+ (* x x) (* y y)))))) |
| 281.0ms | (* (* (* (/ (- x y) (sqrt (+ (* x x) (* y y)))) (/ (- x y) (sqrt (+ (* x x) (* y y))))) (/ (- x y) (sqrt (+ (* x x) (* y y))))) (/ (* (* (+ x y) (+ x y)) (+ x y)) (* (* (sqrt (+ (* x x) (* y y))) (sqrt (+ (* x x) (* y y)))) (sqrt (+ (* x x) (* y y)))))) |
5 alts after pruning (3 fresh and 2 done)
Merged error: 0.5b
Found 4 expressions with local error:
| 19.5b | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 0.0b | (log (exp (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))))) |
| 0.0b | (+ (* x x) (* y y)) |
| 0.0b | (exp (/ (* (- x y) (+ x y)) (+ (* x x) (* y y)))) |
4 calls. Slowest were:
| 11.0ms | (exp (/ (* (- x y) (+ x y)) (+ (* x x) (* y y)))) |
| 8.0ms | (log (exp (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))))) |
| 8.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
4 calls. Slowest were:
| 55.0ms | (exp (/ (* (- x y) (+ x y)) (+ (* x x) (* y y)))) |
| 39.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
| 32.0ms | (log (exp (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))))) |
| 15.0ms | (+ (* x x) (* y y)) |
60 calls. Slowest were:
| 546.0ms | (cbrt (/ (* (- x y) (+ x y)) (+ (* x x) (* y y)))) |
| 353.0ms | (* (- (* x x) (* y y)) (+ x y)) |
| 348.0ms | (* (- (pow x 3) (pow y 3)) (+ (pow x 3) (pow y 3))) |
5 alts after pruning (2 fresh and 3 done)
Merged error: 0.5b
Found 0 expressions with local error:
0 calls. Slowest were:
0 calls. Slowest were:
0 calls. Slowest were:
5 alts after pruning (1 fresh and 4 done)
Merged error: 0.5b
74.7% (5.1b remaining)
Error of 5.5b against oracle of 0.4b and baseline of 20.5b