


Bits error versus x



Bits error versus y
Initial program 43.3
Taylor expanded around 0 0.9
Simplified0.9
rmApplied fma-udef0.9
Final simplification0.9
herbie shell --seed 2019007 +o rules:numerics
(FPCore (x y)
:name "Euler formula imaginary part (p55)"
(im (complex (* (/ (+ (exp x) (exp (- x))) 2) (cos y)) (* (/ (- (exp x) (exp (- x))) 2) (sin y)))))
Time bar (total: 28.9s)Debug log
1 calls. Slowest were:
| 130.0ms | (im (complex (* (/ (+ (exp x) (exp (- x))) 2) (cos y)) (* (/ (- (exp x) (exp (- x))) 2) (sin y)))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 47.0b
Found 4 expressions with local error:
| 58.2b | (- (exp x) (exp (- x))) |
| 0.1b | (* (/ (- (exp x) (exp (- x))) 2) (sin y)) |
| 0.0b | (+ (exp x) (exp (- x))) |
| 0.0b | (* (/ (+ (exp x) (exp (- x))) 2) (cos y)) |
4 calls. Slowest were:
| 10.0ms | (* (/ (- (exp x) (exp (- x))) 2) (sin y)) |
| 10.0ms | (* (/ (+ (exp x) (exp (- x))) 2) (cos y)) |
| 5.0ms | (- (exp x) (exp (- x))) |
4 calls. Slowest were:
| 73.0ms | (* (/ (- (exp x) (exp (- x))) 2) (sin y)) |
| 60.0ms | (* (/ (+ (exp x) (exp (- x))) 2) (cos y)) |
| 43.0ms | (- (exp x) (exp (- x))) |
| 38.0ms | (+ (exp x) (exp (- x))) |
60 calls. Slowest were:
| 404.0ms | (* 1/2 (* (- (exp x) (exp (- x))) (sin y))) |
| 336.0ms | (* 1/2 (* (- (exp x) (exp (* -1 x))) (sin y))) |
| 303.0ms | (* (* (* (/ (+ (exp x) (exp (- x))) 2) (/ (+ (exp x) (exp (- x))) 2)) (/ (+ (exp x) (exp (- x))) 2)) (* (* (cos y) (cos y)) (cos y))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 0.1b
Found 4 expressions with local error:
| 0.1b | (* (/ (fma (fma 1/3 (* x x) 2) x (* (pow x 5) 1/60)) 2) (sin y)) |
| 0.1b | (* (pow x 5) 1/60) |
| 0.0b | (fma (fma 1/3 (* x x) 2) x (* (pow x 5) 1/60)) |
| 0.0b | (+ (exp x) (exp (- x))) |
4 calls. Slowest were:
| 9.0ms | (* (/ (fma (fma 1/3 (* x x) 2) x (* (pow x 5) 1/60)) 2) (sin y)) |
| 4.0ms | (+ (exp x) (exp (- x))) |
| 2.0ms | (* (pow x 5) 1/60) |
4 calls. Slowest were:
| 74.0ms | (* (/ (fma (fma 1/3 (* x x) 2) x (* (pow x 5) 1/60)) 2) (sin y)) |
| 35.0ms | (+ (exp x) (exp (- x))) |
| 27.0ms | (fma (fma 1/3 (* x x) 2) x (* (pow x 5) 1/60)) |
| 23.0ms | (* (pow x 5) 1/60) |
28 calls. Slowest were:
| 275.0ms | (* (* (* (/ (fma (fma 1/3 (* x x) 2) x (* (pow x 5) 1/60)) 2) (/ (fma (fma 1/3 (* x x) 2) x (* (pow x 5) 1/60)) 2)) (/ (fma (fma 1/3 (* x x) 2) x (* (pow x 5) 1/60)) 2)) (* (* (sin y) (sin y)) (sin y))) |
| 184.0ms | (* (fma (fma 1/3 (* x x) 2) x (* (pow x 5) 1/60)) (sin y)) |
| 164.0ms | (* (/ (fma (fma 1/3 (* x x) 2) x (* (pow x 5) 1/60)) 2) (sin y)) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.1b | (* (/ (+ (* (fma 1/3 (* x x) 2) x) (* (pow x 5) 1/60)) 2) (sin y)) |
| 0.1b | (* (pow x 5) 1/60) |
| 0.0b | (+ (exp x) (exp (- x))) |
| 0.0b | (* (fma 1/3 (* x x) 2) x) |
4 calls. Slowest were:
| 8.0ms | (* (/ (+ (* (fma 1/3 (* x x) 2) x) (* (pow x 5) 1/60)) 2) (sin y)) |
| 4.0ms | (+ (exp x) (exp (- x))) |
| 2.0ms | (* (fma 1/3 (* x x) 2) x) |
4 calls. Slowest were:
| 75.0ms | (* (/ (+ (* (fma 1/3 (* x x) 2) x) (* (pow x 5) 1/60)) 2) (sin y)) |
| 52.0ms | (* (fma 1/3 (* x x) 2) x) |
| 26.0ms | (+ (exp x) (exp (- x))) |
| 23.0ms | (* (pow x 5) 1/60) |
30 calls. Slowest were:
| 390.0ms | (* (* (* (/ (+ (* (fma 1/3 (* x x) 2) x) (* (pow x 5) 1/60)) 2) (/ (+ (* (fma 1/3 (* x x) 2) x) (* (pow x 5) 1/60)) 2)) (/ (+ (* (fma 1/3 (* x x) 2) x) (* (pow x 5) 1/60)) 2)) (* (* (sin y) (sin y)) (sin y))) |
| 205.0ms | (* (+ (* (fma 1/3 (* x x) 2) x) (* (pow x 5) 1/60)) (sin y)) |
| 135.0ms | (* (/ (+ (* (fma 1/3 (* x x) 2) x) (* (pow x 5) 1/60)) 2) (sin y)) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.2b | (/ (fma (fma (* x x) 1/3 2) x (* (pow x 5) 1/60)) (/ 2 (sin y))) |
| 0.1b | (/ 2 (sin y)) |
| 0.1b | (* (pow x 5) 1/60) |
| 0.0b | (fma (fma (* x x) 1/3 2) x (* (pow x 5) 1/60)) |
4 calls. Slowest were:
| 7.0ms | (/ (fma (fma (* x x) 1/3 2) x (* (pow x 5) 1/60)) (/ 2 (sin y))) |
| 4.0ms | (* (pow x 5) 1/60) |
| 1.0ms | (/ 2 (sin y)) |
4 calls. Slowest were:
| 69.0ms | (/ (fma (fma (* x x) 1/3 2) x (* (pow x 5) 1/60)) (/ 2 (sin y))) |
| 36.0ms | (fma (fma (* x x) 1/3 2) x (* (pow x 5) 1/60)) |
| 30.0ms | (* (pow x 5) 1/60) |
| 14.0ms | (/ 2 (sin y)) |
50 calls. Slowest were:
| 410.0ms | (/ (* (* (fma (fma (* x x) 1/3 2) x (* (pow x 5) 1/60)) (fma (fma (* x x) 1/3 2) x (* (pow x 5) 1/60))) (fma (fma (* x x) 1/3 2) x (* (pow x 5) 1/60))) (* (* (/ 2 (sin y)) (/ 2 (sin y))) (/ 2 (sin y)))) |
| 338.0ms | (/ (fma (fma (* x x) 1/3 2) x (* (pow x 5) 1/60)) (/ 1 (sin y))) |
| 105.0ms | (/ (fma (fma (* x x) 1/3 2) x (* (pow x 5) 1/60)) (/ 2 (sin y))) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 0.0b
0% (0.8b remaining)
Error of 0.9b against oracle of 0.1b and baseline of 0.9b