


Bits error versus re



Bits error versus im
Initial program 0.0
Taylor expanded around -inf 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019016 +o rules:numerics
(FPCore (re im)
:name "math.sin on complex, real part"
(* (* 0.5 (sin re)) (+ (exp (- 0 im)) (exp im))))
Time bar (total: 23.4s)Debug log
| 520× | (pre true 80) |
| 274× | (body real 80) |
| 108× | (body real 1280) |
| 69× | (body real 640) |
| 51× | (body real 320) |
| 18× | (body real 160) |
| 444.0ms | (* (* 0.5 (sin re)) (+ (exp (- 0 im)) (exp im))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 0.0b
Found 1 expressions with local error:
| 0.0b | (* (* 0.5 (sin re)) (+ (exp (- 0 im)) (exp im))) |
| 4× | associate-*r* |
| 4× | *-un-lft-identity |
| 3× | add-exp-log |
| 3× | add-cbrt-cube |
| 3× | pow1 |
| 2× | add-cube-cbrt |
| 2× | associate-*r/ |
| 2× | add-sqr-sqrt |
| 1× | add-log-exp |
| 1× | distribute-lft-out |
| 1× | log1p-expm1-u |
| 1× | flip-+ |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | pow-prod-down |
| 1× | associate-*l* |
| 1× | flip3-+ |
| 1× | distribute-lft-in |
| 1× | expm1-log1p-u |
| 1× | distribute-rgt-in |
| 25.0ms | (* (* 0.5 (sin re)) (+ (exp (- 0 im)) (exp im))) |
| 82.0ms | (* (* 0.5 (sin re)) (+ (exp (- 0 im)) (exp im))) |
| 501.0ms | (* 0.5 (* (sin re) (+ (exp im) (exp (* -1 im))))) |
| 473.0ms | (* 0.5 (* (sin re) (+ (exp (- im)) (exp im)))) |
| 423.0ms | (* (* 0.5 (sin re)) (+ (exp (- 0 im)) (exp im))) |
| 362.0ms | (+ (* (exp (- 0 im)) (exp (- 0 im))) (- (* (exp im) (exp im)) (* (exp (- 0 im)) (exp im)))) |
| 333.0ms | (- (+ (* 1.0 re) (* 0.5 (* re (pow im 2)))) (* 0.16666666666666666 (pow re 3))) |
3 alts after pruning (3 fresh and 0 done)
Merged error: 0b
Found 2 expressions with local error:
| 0.0b | (* (fma 0.5 (exp im) (/ 0.5 (exp im))) (sin re)) |
| 0.0b | (/ 0.5 (exp im)) |
| 5× | add-cube-cbrt |
| 5× | *-un-lft-identity |
| 5× | add-sqr-sqrt |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | pow1 |
| 3× | associate-*l* |
| 3× | associate-*r* |
| 3× | associate-/r* |
| 2× | add-log-exp |
| 2× | log1p-expm1-u |
| 2× | expm1-log1p-u |
| 1× | div-inv |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | pow-prod-down |
| 1× | frac-2neg |
| 1× | clear-num |
| 4.0ms | (* (fma 0.5 (exp im) (/ 0.5 (exp im))) (sin re)) |
| 1.0ms | (/ 0.5 (exp im)) |
| 74.0ms | (* (fma 0.5 (exp im) (/ 0.5 (exp im))) (sin re)) |
| 10.0ms | (/ 0.5 (exp im)) |
| 274.0ms | (- (+ (* 1.0 re) (* 0.5 (* re (pow im 2)))) (* 0.16666666666666666 (pow re 3))) |
| 241.0ms | (* (* (* (fma 0.5 (exp im) (/ 0.5 (exp im))) (fma 0.5 (exp im) (/ 0.5 (exp im)))) (fma 0.5 (exp im) (/ 0.5 (exp im)))) (* (* (sin re) (sin re)) (sin re))) |
| 192.0ms | (* (sin re) (+ (* 0.5 (exp im)) (* 0.5 (/ 1 (exp im))))) |
| 133.0ms | (* (sin re) (+ (* 0.5 (exp im)) (* 0.5 (/ 1 (exp im))))) |
| 130.0ms | (- (+ (* 0.25 (pow im 2)) 0.5) (* 0.5 im)) |
3 alts after pruning (2 fresh and 1 done)
Merged error: 0b
Found 2 expressions with local error:
| 0.0b | (* (* 0.5 (sin re)) (exp im)) |
| 0.0b | (* (* 0.5 (sin re)) (exp (- 0 im))) |
| 8× | associate-*r* |
| 6× | add-cbrt-cube |
| 6× | pow1 |
| 4× | add-cube-cbrt |
| 4× | add-exp-log |
| 4× | *-un-lft-identity |
| 4× | add-sqr-sqrt |
| 2× | sub0-neg |
| 2× | add-log-exp |
| 2× | log1p-expm1-u |
| 2× | cbrt-unprod |
| 2× | *-commutative |
| 2× | associate-*r/ |
| 2× | prod-exp |
| 2× | pow-prod-down |
| 2× | exp-sum |
| 2× | associate-*l* |
| 2× | expm1-log1p-u |
| 2× | exp-neg |
| 1× | un-div-inv |
| 1× | exp-diff |
| 1× | sub-neg |
| 14.0ms | (* (* 0.5 (sin re)) (exp (- 0 im))) |
| 10.0ms | (* (* 0.5 (sin re)) (exp im)) |
| 64.0ms | (* (* 0.5 (sin re)) (exp (- 0 im))) |
| 50.0ms | (* (* 0.5 (sin re)) (exp im)) |
| 602.0ms | (- (+ (* 0.5 re) (* 0.5 (* re im))) (* 0.08333333333333333 (pow re 3))) |
| 324.0ms | (* (* (* (* 0.5 (sin re)) (* 0.5 (sin re))) (* 0.5 (sin re))) (* (* (exp (- 0 im)) (exp (- 0 im))) (exp (- 0 im)))) |
| 234.0ms | (- (* 0.5 re) (+ (* 0.5 (* re im)) (* 0.08333333333333333 (pow re 3)))) |
| 209.0ms | (* (* (* (* 0.5 (sin re)) (* 0.5 (sin re))) (* 0.5 (sin re))) (* (* (exp im) (exp im)) (exp im))) |
| 141.0ms | (+ (log (* 0.5 (sin re))) (- 0 im)) |
3 alts after pruning (1 fresh and 2 done)
Merged error: 0b
Found 4 expressions with local error:
| 0.0b | (* (* (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im)))) (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im))))) (* (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im)))) (sin re))) |
| 0.0b | (* (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im)))) (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im))))) |
| 0.0b | (/ 0.5 (exp im)) |
| 0.0b | (/ 0.5 (exp im)) |
| 21× | pow1 |
| 18× | add-exp-log |
| 10× | add-cube-cbrt |
| 10× | pow-prod-down |
| 10× | add-cbrt-cube |
| 10× | *-un-lft-identity |
| 10× | add-sqr-sqrt |
| 9× | cbrt-unprod |
| 9× | prod-exp |
| 7× | associate-*l* |
| 7× | associate-*r* |
| 6× | associate-/r* |
| 6× | cbrt-prod |
| 4× | add-log-exp |
| 4× | log1p-expm1-u |
| 4× | pow1/3 |
| 4× | expm1-log1p-u |
| 2× | div-inv |
| 2× | pow-prod-up |
| 2× | *-commutative |
| 2× | frac-2neg |
| 2× | clear-num |
| 1× | pow-plus |
| 1× | pow2 |
| 18.0ms | (* (* (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im)))) (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im))))) (* (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im)))) (sin re))) |
| 5.0ms | (* (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im)))) (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im))))) |
| 1.0ms | (/ 0.5 (exp im)) |
| 1.0ms | (/ 0.5 (exp im)) |
| 254.0ms | (* (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im)))) (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im))))) |
| 116.0ms | (* (* (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im)))) (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im))))) (* (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im)))) (sin re))) |
| 17.0ms | (/ 0.5 (exp im)) |
| 17.0ms | (/ 0.5 (exp im)) |
| 885.0ms | (pow (pow (+ (* 0.5 (exp im)) (* 0.5 (/ 1 (exp im)))) 2) 1/3) |
| 710.0ms | (* (* (* (* (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im)))) (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im))))) (* (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im)))) (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im)))))) (* (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im)))) (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im)))))) (* (fma 0.5 (exp im) (/ 0.5 (exp im))) (* (* (sin re) (sin re)) (sin re)))) |
| 460.0ms | (pow (pow (+ (* 0.5 (exp im)) (* 0.5 (/ 1 (exp im)))) 2) 1/3) |
| 452.0ms | (* (* (fma 0.5 (exp im) (/ 0.5 (exp im))) (fma 0.5 (exp im) (/ 0.5 (exp im)))) (* (fma 0.5 (exp im) (/ 0.5 (exp im))) (* (* (sin re) (sin re)) (sin re)))) |
| 327.0ms | (* (* (fma 0.5 (exp im) (/ 0.5 (exp im))) (fma 0.5 (exp im) (/ 0.5 (exp im)))) (* (* (* (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im)))) (sin re)) (* (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im)))) (sin re))) (* (cbrt (fma 0.5 (exp im) (/ 0.5 (exp im)))) (sin re)))) |
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
| 15926× | (pre true 80) |
| 8577× | (body real 80) |
| 3045× | (body real 1280) |
| 2474× | (body real 640) |
| 1214× | (body real 320) |
| 616× | (body real 160) |