



Bits error versus x




Bits error versus y
Results
| Original | 20.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 20.0
Simplified20.0
rmApplied add-sqr-sqrt20.0
Applied times-frac20.1
Simplified20.1
Simplified0.0
rmApplied add-log-exp0.0
Final simplification0.0
herbie shell --seed 2019007 +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: 23.4s)Debug log
1 calls. Slowest were:
| 314.0ms | (/ (* (- x y) (+ x y)) (+ (* x x) (* y y))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 21.3b
Found 2 expressions with local error:
| 21.3b | (/ (* (- x y) (+ y x)) (fma x x (* y y))) |
| 0.0b | (fma x x (* y y)) |
2 calls. Slowest were:
| 7.0ms | (/ (* (- x y) (+ y x)) (fma x x (* y y))) |
| 0.0ms | (fma x x (* y y)) |
2 calls. Slowest were:
| 53.0ms | (/ (* (- x y) (+ y x)) (fma x x (* y y))) |
| 32.0ms | (fma x x (* y y)) |
28 calls. Slowest were:
| 610.0ms | (/ (* (* (* (- x y) (- x y)) (- x y)) (* (* (+ y x) (+ y x)) (+ y x))) (* (* (fma x x (* y y)) (fma x x (* y y))) (fma x x (* y y)))) |
| 336.0ms | (* (- (* x x) (* y y)) (+ (pow y 3) (pow x 3))) |
| 293.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)) |
| 0.0b | (* (/ (- x y) (hypot x y)) (/ (+ x y) (hypot x y))) |
| 0.0b | (hypot x y) |
4 calls. Slowest were:
| 17.0ms | (* (/ (- x y) (hypot x y)) (/ (+ x y) (hypot x y))) |
| 6.0ms | (/ (+ x y) (hypot x y)) |
| 6.0ms | (/ (- x y) (hypot x y)) |
4 calls. Slowest were:
| 77.0ms | (* (/ (- x y) (hypot x y)) (/ (+ x y) (hypot x y))) |
| 54.0ms | (/ (+ x y) (hypot x y)) |
| 50.0ms | (/ (- x y) (hypot x y)) |
| 39.0ms | (hypot x y) |
105 calls. Slowest were:
| 286.0ms | (* (/ (* (* (- x y) (- x y)) (- x y)) (* (* (hypot x y) (hypot x y)) (hypot x y))) (/ (* (* (+ x y) (+ x y)) (+ x y)) (* (* (hypot x y) (hypot x y)) (hypot x y)))) |
| 279.0ms | (+ (- (log (- x y)) (log (hypot x y))) (log (/ (+ x y) (hypot x y)))) |
| 268.0ms | (+ (- (log (- x y)) (log (hypot x y))) (- (log (+ x y)) (log (hypot x y)))) |
3 alts after pruning (2 fresh and 1 done)
Merged error: 0b
Found 4 expressions with local error:
| 0.0b | (/ (- x y) (hypot x y)) |
| 0.0b | (/ (+ x y) (hypot x y)) |
| 0.0b | (* (/ (- x y) (hypot x y)) (/ (+ x y) (hypot x y))) |
| 0.0b | (log (exp (* (/ (- x y) (hypot x y)) (/ (+ x y) (hypot x y))))) |
4 calls. Slowest were:
| 14.0ms | (* (/ (- x y) (hypot x y)) (/ (+ x y) (hypot x y))) |
| 6.0ms | (/ (+ x y) (hypot x y)) |
| 5.0ms | (log (exp (* (/ (- x y) (hypot x y)) (/ (+ x y) (hypot x y))))) |
4 calls. Slowest were:
| 71.0ms | (* (/ (- x y) (hypot x y)) (/ (+ x y) (hypot x y))) |
| 67.0ms | (log (exp (* (/ (- x y) (hypot x y)) (/ (+ x y) (hypot x y))))) |
| 57.0ms | (/ (- x y) (hypot x y)) |
| 51.0ms | (/ (+ x y) (hypot x y)) |
111 calls. Slowest were:
| 349.0ms | (+ (- (log (- x y)) (log (hypot x y))) (log (/ (+ x y) (hypot x y)))) |
| 325.0ms | (+ (- (log (- x y)) (log (hypot x y))) (- (log (+ x y)) (log (hypot x y)))) |
| 288.0ms | (/ (* (* (+ x y) (+ x y)) (+ x y)) (* (* (hypot x y) (hypot x y)) (hypot x y))) |
3 alts after pruning (1 fresh and 2 done)
Merged error: 0b
Found 4 expressions with local error:
| 0.0b | (* (* (/ (- x y) (hypot x y)) (* (cbrt (/ (+ x y) (hypot x y))) (cbrt (/ (+ x y) (hypot x y))))) (cbrt (/ (+ x y) (hypot x y)))) |
| 0.0b | (cbrt (/ (+ x y) (hypot x y))) |
| 0.0b | (cbrt (/ (+ x y) (hypot x y))) |
| 0.0b | (cbrt (/ (+ x y) (hypot x y))) |
4 calls. Slowest were:
| 39.0ms | (* (* (/ (- x y) (hypot x y)) (* (cbrt (/ (+ x y) (hypot x y))) (cbrt (/ (+ x y) (hypot x y))))) (cbrt (/ (+ x y) (hypot x y)))) |
| 1.0ms | (cbrt (/ (+ x y) (hypot x y))) |
| 1.0ms | (cbrt (/ (+ x y) (hypot x y))) |
4 calls. Slowest were:
| 108.0ms | (cbrt (/ (+ x y) (hypot x y))) |
| 99.0ms | (cbrt (/ (+ x y) (hypot x y))) |
| 86.0ms | (cbrt (/ (+ x y) (hypot x y))) |
| 76.0ms | (* (* (/ (- x y) (hypot x y)) (* (cbrt (/ (+ x y) (hypot x y))) (cbrt (/ (+ x y) (hypot x y))))) (cbrt (/ (+ x y) (hypot x y)))) |
106 calls. Slowest were:
| 564.0ms | (+ (+ (- (log (- x y)) (log (hypot x y))) (+ (log (cbrt (/ (+ x y) (hypot x y)))) (log (cbrt (/ (+ x y) (hypot x y)))))) (log (cbrt (/ (+ x y) (hypot x y))))) |
| 504.0ms | (+ (+ (- (log (- x y)) (log (hypot x y))) (log (* (cbrt (/ (+ x y) (hypot x y))) (cbrt (/ (+ x y) (hypot x y)))))) (log (cbrt (/ (+ x y) (hypot x y))))) |
| 365.0ms | (* (* (/ (- x y) (hypot x y)) (* (cbrt (/ (+ x y) (hypot x y))) (cbrt (/ (+ x y) (hypot x y))))) (cbrt (/ (+ x y) (hypot x y)))) |
3 alts after pruning (0 fresh and 3 done)
Merged error: 0b
0% (0.0b remaining)
Error of 0.0b against oracle of 0.0b and baseline of 0.0b