


Bits error versus x



Bits error versus y
Initial program 43.5
Taylor expanded around 0 0.7
Simplified0.8
Final simplification0.8
herbie shell --seed 2019022 +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: 27.5s)Debug log
| 119.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: 42.8b
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))) 2) (cos y)) |
| 0.0b | (+ (exp x) (exp (- x))) |
| 20× | *-un-lft-identity |
| 18× | add-sqr-sqrt |
| 16× | add-cube-cbrt |
| 9× | prod-diff |
| 8× | add-log-exp |
| 8× | add-exp-log |
| 8× | associate-*l* |
| 8× | add-cbrt-cube |
| 8× | pow1 |
| 6× | associate-*r* |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 3× | fma-neg |
| 3× | fma-def |
| 2× | div-inv |
| 2× | cbrt-unprod |
| 2× | *-commutative |
| 2× | prod-exp |
| 2× | associate-*l/ |
| 2× | pow-prod-down |
| 1× | difference-of-squares |
| 1× | distribute-lft-out-- |
| 1× | distribute-lft-out |
| 1× | flip-- |
| 1× | flip-+ |
| 1× | diff-log |
| 1× | flip3-- |
| 1× | flip3-+ |
| 1× | sub-neg |
| 1× | sum-log |
| 1× | +-commutative |
| 11.0ms | (* (/ (+ (exp x) (exp (- x))) 2) (cos y)) |
| 10.0ms | (* (/ (- (exp x) (exp (- x))) 2) (sin y)) |
| 5.0ms | (- (exp x) (exp (- x))) |
| 4.0ms | (+ (exp x) (exp (- x))) |
| 93.0ms | (* (/ (- (exp x) (exp (- x))) 2) (sin y)) |
| 62.0ms | (* (/ (+ (exp x) (exp (- x))) 2) (cos y)) |
| 56.0ms | (- (exp x) (exp (- x))) |
| 23.0ms | (+ (exp x) (exp (- x))) |
| 338.0ms | (* (* (* (/ (- (exp x) (exp (- x))) 2) (/ (- (exp x) (exp (- x))) 2)) (/ (- (exp x) (exp (- x))) 2)) (* (* (sin y) (sin y)) (sin y))) |
| 310.0ms | (* 1/2 (* (- (exp x) (exp (- x))) (sin y))) |
| 248.0ms | (* 1/2 (* (- (exp x) (exp (* -1 x))) (sin y))) |
| 235.0ms | (* (* (* (/ (+ (exp x) (exp (- x))) 2) (/ (+ (exp x) (exp (- x))) 2)) (/ (+ (exp x) (exp (- x))) 2)) (* (* (cos y) (cos y)) (cos y))) |
| 226.0ms | (* 1/2 (* (+ (exp (* -1 x)) (exp x)) (cos y))) |
3 alts after pruning (3 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))) 2) (cos y)) |
| 11× | associate-*l* |
| 9× | add-cube-cbrt |
| 9× | *-un-lft-identity |
| 9× | add-sqr-sqrt |
| 8× | add-exp-log |
| 8× | add-cbrt-cube |
| 8× | pow1 |
| 6× | associate-*r* |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | expm1-log1p-u |
| 3× | *-commutative |
| 2× | div-inv |
| 2× | cbrt-unprod |
| 2× | prod-exp |
| 2× | associate-*l/ |
| 2× | pow-prod-down |
| 1× | fma-udef |
| 14.0ms | (* (/ (+ (exp x) (exp (- x))) 2) (cos y)) |
| 6.0ms | (* (/ (fma (fma 1/3 (* x x) 2) x (* (pow x 5) 1/60)) 2) (sin y)) |
| 4.0ms | (* (pow x 5) 1/60) |
| 0.0ms | (fma (fma 1/3 (* x x) 2) x (* (pow x 5) 1/60)) |
| 66.0ms | (* (/ (fma (fma 1/3 (* x x) 2) x (* (pow x 5) 1/60)) 2) (sin y)) |
| 61.0ms | (* (/ (+ (exp x) (exp (- x))) 2) (cos y)) |
| 34.0ms | (fma (fma 1/3 (* x x) 2) x (* (pow x 5) 1/60)) |
| 23.0ms | (* (pow x 5) 1/60) |
| 301.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))) |
| 279.0ms | (* (* (* (/ (+ (exp x) (exp (- x))) 2) (/ (+ (exp x) (exp (- x))) 2)) (/ (+ (exp x) (exp (- x))) 2)) (* (* (cos y) (cos y)) (cos y))) |
| 240.0ms | (* 1/2 (* (+ (exp (* -1 x)) (exp x)) (cos y))) |
| 192.0ms | (* (fma (fma 1/3 (* x x) 2) x (* (pow x 5) 1/60)) (sin y)) |
| 175.0ms | (* (/ (fma (fma 1/3 (* x x) 2) x (* (pow x 5) 1/60)) 2) (sin y)) |
11 alts after pruning (10 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.6b | (cbrt (sin y)) |
| 0.6b | (cbrt (sin y)) |
| 0.6b | (cbrt (sin y)) |
| 0.5b | (* (cbrt (sin y)) (cbrt (sin y))) |
| 15× | cbrt-prod |
| 11× | add-cube-cbrt |
| 11× | *-un-lft-identity |
| 11× | add-sqr-sqrt |
| 9× | pow1 |
| 7× | pow1/3 |
| 6× | add-exp-log |
| 6× | associate-*l* |
| 6× | associate-*r* |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | add-cbrt-cube |
| 4× | expm1-log1p-u |
| 2× | pow-prod-up |
| 2× | pow-prod-down |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | pow-plus |
| 1× | pow2 |
| 6.0ms | (* (cbrt (sin y)) (cbrt (sin y))) |
| 1.0ms | (cbrt (sin y)) |
| 1.0ms | (cbrt (sin y)) |
| 1.0ms | (cbrt (sin y)) |
| 145.0ms | (* (cbrt (sin y)) (cbrt (sin y))) |
| 134.0ms | (cbrt (sin y)) |
| 132.0ms | (cbrt (sin y)) |
| 116.0ms | (cbrt (sin y)) |
| 61.0ms | (- (pow y 1/3) (+ (* 1/18 (pow (pow y 7) 1/3)) (* 1/3240 (pow (pow y 13) 1/3)))) |
| 61.0ms | (- (pow y 1/3) (+ (* 1/18 (pow (pow y 7) 1/3)) (* 1/3240 (pow (pow y 13) 1/3)))) |
| 59.0ms | (- (pow y 1/3) (+ (* 1/18 (pow (pow y 7) 1/3)) (* 1/3240 (pow (pow y 13) 1/3)))) |
| 58.0ms | (- (+ (pow y 2/3) (* 1/405 (pow (pow y 14) 1/3))) (* 1/9 (pow (pow y 8) 1/3))) |
| 4.0ms | (pow (pow (sin y) 2) 1/3) |
14 alts after pruning (13 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.6b | (cbrt (sin y)) |
| 0.6b | (cbrt (sin y)) |
| 0.6b | (cbrt (sin y)) |
| 0.5b | (* (cbrt (sin y)) (cbrt (sin y))) |
| 15× | cbrt-prod |
| 11× | add-cube-cbrt |
| 11× | *-un-lft-identity |
| 11× | add-sqr-sqrt |
| 9× | pow1 |
| 7× | pow1/3 |
| 6× | add-exp-log |
| 6× | associate-*l* |
| 6× | associate-*r* |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | add-cbrt-cube |
| 4× | expm1-log1p-u |
| 2× | pow-prod-up |
| 2× | pow-prod-down |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | pow-plus |
| 1× | pow2 |
| 7.0ms | (* (cbrt (sin y)) (cbrt (sin y))) |
| 1.0ms | (cbrt (sin y)) |
| 1.0ms | (cbrt (sin y)) |
| 1.0ms | (cbrt (sin y)) |
| 192.0ms | (* (cbrt (sin y)) (cbrt (sin y))) |
| 149.0ms | (cbrt (sin y)) |
| 129.0ms | (cbrt (sin y)) |
| 118.0ms | (cbrt (sin y)) |
| 98.0ms | (- (pow y 1/3) (+ (* 1/18 (pow (pow y 7) 1/3)) (* 1/3240 (pow (pow y 13) 1/3)))) |
| 94.0ms | (- (pow y 1/3) (+ (* 1/18 (pow (pow y 7) 1/3)) (* 1/3240 (pow (pow y 13) 1/3)))) |
| 62.0ms | (- (pow y 1/3) (+ (* 1/18 (pow (pow y 7) 1/3)) (* 1/3240 (pow (pow y 13) 1/3)))) |
| 49.0ms | (- (+ (pow y 2/3) (* 1/405 (pow (pow y 14) 1/3))) (* 1/9 (pow (pow y 8) 1/3))) |
| 4.0ms | (pow (pow (sin y) 2) 1/3) |
13 alts after pruning (12 fresh and 1 done)
Merged error: 0.0b
0% (0.7b remaining)
Error of 0.8b against oracle of 0.1b and baseline of 0.8b