



Bits error versus x




Bits error versus y
Results
| Original | 20.4 |
|---|---|
| Target | 0.1 |
| Herbie | 0.0 |
Initial program 20.4
Simplified20.4
rmApplied add-sqr-sqrt20.4
Applied times-frac20.4
Simplified20.4
Simplified0.0
rmApplied clear-num0.0
rmApplied add-cbrt-cube0.0
Final simplification0.0
herbie shell --seed 2019008 +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: 21.2s)Debug log
1 calls. Slowest were:
| 305.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 18.2b
Found 2 expressions with local error:
| 18.2b | (/ (* (- x y) (+ y x)) (fma x x (* y y))) |
| 0.0b | (fma x x (* y y)) |
2 calls. Slowest were:
| 14.0ms | (/ (* (- x y) (+ y x)) (fma x x (* y y))) |
| 0.0ms | (fma x x (* y y)) |
2 calls. Slowest were:
| 41.0ms | (/ (* (- x y) (+ y x)) (fma x x (* y y))) |
| 21.0ms | (fma x x (* y y)) |
28 calls. Slowest were:
| 352.0ms | (* (- (* x x) (* y y)) (+ (pow y 3) (pow x 3))) |
| 333.0ms | (* (- (* x x) (* y y)) (+ y x)) |
| 307.0ms | (* (- (pow x 3) (pow y 3)) (+ y x)) |
3 alts after pruning (2 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.0b | (/ (+ x y) (hypot x y)) |
| 0.0b | (* (/ (- x y) (hypot x y)) (/ (+ x y) (hypot x y))) |
| 0.0b | (/ (- x y) (hypot x y)) |
| 0.0b | (hypot x y) |
4 calls. Slowest were:
| 11.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:
| 67.0ms | (* (/ (- x y) (hypot x y)) (/ (+ x y) (hypot x y))) |
| 65.0ms | (/ (- x y) (hypot x y)) |
| 61.0ms | (/ (+ x y) (hypot x y)) |
| 29.0ms | (hypot x y) |
105 calls. Slowest were:
| 323.0ms | (+ (- (log (- x y)) (log (hypot x y))) (- (log (+ x y)) (log (hypot x y)))) |
| 290.0ms | (/ (* (* (+ x y) (+ x y)) (+ x y)) (* (* (hypot x y) (hypot x y)) (hypot x y))) |
| 261.0ms | (+ (- (log (- x y)) (log (hypot x y))) (log (/ (+ x y) (hypot x y)))) |
3 alts after pruning (2 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.0b | (/ (+ x y) (hypot x y)) |
| 0.0b | (* (/ 1 (/ (hypot x y) (- x y))) (/ (+ x y) (hypot x y))) |
| 0.0b | (/ 1 (/ (hypot x y) (- x y))) |
| 0.0b | (/ (hypot x y) (- x y)) |
4 calls. Slowest were:
| 6.0ms | (* (/ 1 (/ (hypot x y) (- x y))) (/ (+ x y) (hypot x y))) |
| 3.0ms | (/ (hypot x y) (- x y)) |
| 3.0ms | (/ (+ x y) (hypot x y)) |
4 calls. Slowest were:
| 59.0ms | (/ (hypot x y) (- x y)) |
| 46.0ms | (* (/ 1 (/ (hypot x y) (- x y))) (/ (+ x y) (hypot x y))) |
| 43.0ms | (/ (+ x y) (hypot x y)) |
| 41.0ms | (/ 1 (/ (hypot x y) (- x y))) |
112 calls. Slowest were:
| 320.0ms | (/ (* (* (+ x y) (+ x y)) (+ x y)) (* (* (hypot x y) (hypot x y)) (hypot x y))) |
| 278.0ms | (+ (log (/ 1 (/ (hypot x y) (- x y)))) (- (log (+ x y)) (log (hypot x y)))) |
| 208.0ms | (+ (log (/ 1 (/ (hypot x y) (- x y)))) (log (/ (+ x y) (hypot x y)))) |
2 alts after pruning (1 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.0b | (cbrt (* (* (/ (hypot x y) (- x y)) (/ (hypot x y) (- x y))) (/ (hypot x y) (- x y)))) |
| 0.0b | (/ (+ x y) (hypot x y)) |
| 0.0b | (* (/ 1 (cbrt (* (* (/ (hypot x y) (- x y)) (/ (hypot x y) (- x y))) (/ (hypot x y) (- x y))))) (/ (+ x y) (hypot x y))) |
| 0.0b | (* (/ (hypot x y) (- x y)) (/ (hypot x y) (- x y))) |
4 calls. Slowest were:
| 22.0ms | (* (/ 1 (cbrt (* (* (/ (hypot x y) (- x y)) (/ (hypot x y) (- x y))) (/ (hypot x y) (- x y))))) (/ (+ x y) (hypot x y))) |
| 17.0ms | (cbrt (* (* (/ (hypot x y) (- x y)) (/ (hypot x y) (- x y))) (/ (hypot x y) (- x y)))) |
| 16.0ms | (* (/ (hypot x y) (- x y)) (/ (hypot x y) (- x y))) |
4 calls. Slowest were:
| 74.0ms | (* (/ (hypot x y) (- x y)) (/ (hypot x y) (- x y))) |
| 65.0ms | (* (/ 1 (cbrt (* (* (/ (hypot x y) (- x y)) (/ (hypot x y) (- x y))) (/ (hypot x y) (- x y))))) (/ (+ x y) (hypot x y))) |
| 62.0ms | (/ (+ x y) (hypot x y)) |
| 53.0ms | (cbrt (* (* (/ (hypot x y) (- x y)) (/ (hypot x y) (- x y))) (/ (hypot x y) (- x y)))) |
126 calls. Slowest were:
| 378.0ms | (+ (- (log (cbrt (* (* (/ (hypot x y) (- x y)) (/ (hypot x y) (- x y))) (/ (hypot x y) (- x y)))))) (log (/ (+ x y) (hypot x y)))) |
| 375.0ms | (+ (- (log (cbrt (* (* (/ (hypot x y) (- x y)) (/ (hypot x y) (- x y))) (/ (hypot x y) (- x y)))))) (- (log (+ x y)) (log (hypot x y)))) |
| 325.0ms | (sqrt (/ 1 (cbrt (* (* (/ (hypot x y) (- x y)) (/ (hypot x y) (- x y))) (/ (hypot x y) (- x y)))))) |
3 alts after pruning (1 fresh and 2 done)
Merged error: 0b
0% (0.0b remaining)
Error of 0.0b against oracle of 0.0b and baseline of 0.0b