



Bits error versus x




Bits error versus y
Results
| Original | 20.0 |
|---|---|
| Target | 0.1 |
| Herbie | 0.0 |
Initial program 20.0
Simplified20.0
rmApplied add-sqr-sqrt20.0
Applied times-frac20.0
Simplified20.0
Simplified0.0
rmApplied clear-num0.0
rmApplied add-log-exp0.0
Final simplification0.0
herbie shell --seed 2019004 +o rules:numerics
(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.9s)Debug log
1 calls. Slowest were:
| 344.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 23.5b
Found 1 expressions with local error:
| 23.5b | (/ (* (- x y) (+ y x)) (fma x x (* y y))) |
1 calls. Slowest were:
| 14.0ms | (/ (* (- x y) (+ y x)) (fma x x (* y y))) |
1 calls. Slowest were:
| 60.0ms | (/ (* (- x y) (+ y x)) (fma x x (* y y))) |
25 calls. Slowest were:
| 317.0ms | (* (- (* x x) (* y y)) (+ y x)) |
| 308.0ms | (* (- (* x x) (* y y)) (- (* y y) (* x x))) |
| 296.0ms | (* (- (pow x 3) (pow y 3)) (+ y x)) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.0b | (* (/ (- x y) (hypot x y)) (/ (+ x y) (hypot x y))) |
| 0.0b | (/ (+ x y) (hypot x y)) |
| 0.0b | (/ (- x y) (hypot x y)) |
| 0.0b | (hypot x y) |
4 calls. Slowest were:
| 7.0ms | (* (/ (- x y) (hypot x y)) (/ (+ x y) (hypot x y))) |
| 3.0ms | (/ (+ x y) (hypot x y)) |
| 3.0ms | (/ (- x y) (hypot x y)) |
4 calls. Slowest were:
| 56.0ms | (* (/ (- x y) (hypot x y)) (/ (+ x y) (hypot x y))) |
| 54.0ms | (/ (+ x y) (hypot x y)) |
| 54.0ms | (/ (- x y) (hypot x y)) |
| 39.0ms | (hypot x y) |
105 calls. Slowest were:
| 307.0ms | (/ (* (* (+ x y) (+ x y)) (+ x y)) (* (* (hypot x y) (hypot x y)) (hypot x y))) |
| 303.0ms | (* (/ (- x y) (hypot x y)) (/ (+ x y) (hypot x y))) |
| 297.0ms | (+ (- (log (- x y)) (log (hypot x y))) (- (log (+ x y)) (log (hypot x y)))) |
5 alts after pruning (5 fresh and 0 done)
Merged error: 0b
Found 4 expressions with local error:
| 0.0b | (* (/ 1 (/ (hypot x y) (- x y))) (/ (+ x y) (hypot x y))) |
| 0.0b | (/ 1 (/ (hypot x y) (- x y))) |
| 0.0b | (/ (+ x y) (hypot x y)) |
| 0.0b | (/ (hypot x y) (- x y)) |
4 calls. Slowest were:
| 13.0ms | (* (/ 1 (/ (hypot x y) (- x y))) (/ (+ x y) (hypot x y))) |
| 7.0ms | (/ (hypot x y) (- x y)) |
| 7.0ms | (/ (+ x y) (hypot x y)) |
4 calls. Slowest were:
| 72.0ms | (/ (hypot x y) (- x y)) |
| 67.0ms | (/ 1 (/ (hypot x y) (- x y))) |
| 52.0ms | (* (/ 1 (/ (hypot x y) (- x y))) (/ (+ x y) (hypot x y))) |
| 41.0ms | (/ (+ x y) (hypot x y)) |
112 calls. Slowest were:
| 294.0ms | (+ (log (/ 1 (/ (hypot x y) (- x y)))) (- (log (+ x y)) (log (hypot x y)))) |
| 290.0ms | (/ (+ x y) (sqrt (hypot x y))) |
| 230.0ms | (+ (log (/ 1 (/ (hypot x y) (- x y)))) (log (/ (+ x y) (hypot x y)))) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0b
Found 4 expressions with local error:
| 0.0b | (* (/ 1 (/ (hypot x y) (- x y))) (log (exp (/ (+ x y) (hypot x y))))) |
| 0.0b | (/ 1 (/ (hypot x y) (- x y))) |
| 0.0b | (log (exp (/ (+ x y) (hypot x y)))) |
| 0.0b | (exp (/ (+ x y) (hypot x y))) |
4 calls. Slowest were:
| 11.0ms | (* (/ 1 (/ (hypot x y) (- x y))) (log (exp (/ (+ x y) (hypot x y))))) |
| 4.0ms | (log (exp (/ (+ x y) (hypot x y)))) |
| 3.0ms | (exp (/ (+ x y) (hypot x y))) |
4 calls. Slowest were:
| 84.0ms | (exp (/ (+ x y) (hypot x y))) |
| 71.0ms | (* (/ 1 (/ (hypot x y) (- x y))) (log (exp (/ (+ x y) (hypot x y))))) |
| 53.0ms | (log (exp (/ (+ x y) (hypot x y)))) |
| 53.0ms | (/ 1 (/ (hypot x y) (- x y))) |
92 calls. Slowest were:
| 402.0ms | (* (log (sqrt (exp (/ (+ x y) (hypot x y))))) (/ 1 (/ (hypot x y) (- x y)))) |
| 371.0ms | (* (log (cbrt (exp (/ (+ x y) (hypot x y))))) (/ 1 (/ (hypot x y) (- x y)))) |
| 302.0ms | (+ (log (/ 1 (/ (hypot x y) (- x y)))) (log (log (exp (/ (+ x y) (hypot x y)))))) |
4 alts after pruning (3 fresh and 1 done)
Merged error: 0b
0% (0.0b remaining)
Error of 0.0b against oracle of 0.0b and baseline of 0.0b