



Bits error versus re




Bits error versus im
Results
| Original | 58.0 |
|---|---|
| Target | 0.3 |
| Herbie | 1.0 |
Initial program 58.0
Taylor expanded around 0 0.8
rmApplied add-log-exp1.0
Final simplification1.0
herbie shell --seed 2019018
(FPCore (re im)
:name "math.sin on complex, imaginary part"
:herbie-target
(if (< (fabs im) 1) (- (* (cos re) (+ (+ im (* (* (* 1/6 im) im) im)) (* (* (* (* (* 1/120 im) im) im) im) im)))) (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))))
(* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))))
Time bar (total: 35.9s)Debug log
| 223.0ms | 159× | body | 1280 | valid |
| 81.0ms | 100× | body | 640 | valid |
| 28.0ms | 55× | body | 320 | valid |
| 21.0ms | 136× | body | 80 | valid |
| 9.0ms | 25× | body | 160 | valid |
| 152.0ms | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 57.6b
Found 2 expressions with local error:
| 7.4b | (- (exp (- 0 im)) (exp im)) |
| 0.0b | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
| 7× | *-un-lft-identity |
| 7× | add-sqr-sqrt |
| 5× | associate-*r* |
| 4× | add-log-exp |
| 4× | add-exp-log |
| 4× | add-cbrt-cube |
| 4× | pow1 |
| 3× | add-cube-cbrt |
| 3× | sub-neg |
| 2× | difference-of-squares |
| 2× | distribute-lft-out-- |
| 2× | flip-- |
| 2× | associate-*r/ |
| 2× | flip3-- |
| 2× | distribute-lft-in |
| 2× | distribute-rgt-in |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | pow-prod-down |
| 1× | associate-*l* |
| 1× | diff-log |
| 28.0ms | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
| 13.0ms | (- (exp (- 0 im)) (exp im)) |
| 92.0ms | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
| 52.0ms | (- (exp (- 0 im)) (exp im)) |
| 244.0ms | (* 0.5 (* (- (exp (* -1 im)) (exp im)) (cos re))) |
| 192.0ms | (- (* 0.5 (* (pow re 2) im)) (+ (* 0.16666666666666666 (pow im 3)) (* 1.0 im))) |
| 179.0ms | (* 0.5 (* (- (exp (- im)) (exp im)) (cos re))) |
| 159.0ms | (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 130.0ms | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
5 alts after pruning (5 fresh and 0 done)
Merged error: 0.1b
Found 4 expressions with local error:
| 0.1b | (* 1/3 (pow im 3)) |
| 0.1b | (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 0.1b | (* 1/60 (pow im 5)) |
| 0.0b | (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))) |
| 18× | associate-*r* |
| 9× | add-log-exp |
| 9× | add-cube-cbrt |
| 9× | *-un-lft-identity |
| 9× | add-sqr-sqrt |
| 6× | add-exp-log |
| 6× | add-cbrt-cube |
| 6× | pow1 |
| 3× | *-commutative |
| 3× | distribute-rgt-neg-in |
| 3× | sum-log |
| 3× | distribute-lft-neg-in |
| 2× | distribute-neg-frac |
| 2× | flip-+ |
| 2× | associate-*r/ |
| 2× | flip3-+ |
| 2× | distribute-neg-in |
| 1× | cbrt-unprod |
| 1× | distribute-rgt-neg-out |
| 1× | prod-exp |
| 1× | pow-prod-down |
| 1× | associate-*l* |
| 1× | unpow3 |
| 1× | distribute-lft-in |
| 1× | neg-mul-1 |
| 1× | associate-+r+ |
| 1× | +-commutative |
| 1× | cube-mult |
| 1× | distribute-rgt-in |
| 20.0ms | (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 6.0ms | (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))) |
| 1.0ms | (* 1/3 (pow im 3)) |
| 1.0ms | (* 1/60 (pow im 5)) |
| 114.0ms | (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 27.0ms | (* 1/60 (pow im 5)) |
| 24.0ms | (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))) |
| 16.0ms | (* 1/3 (pow im 3)) |
| 467.0ms | (- (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 320.0ms | (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 316.0ms | (* (* 0.5 (cos re)) (- (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 310.0ms | (* (* (* (* 0.5 (cos re)) (* 0.5 (cos re))) (* 0.5 (cos re))) (* (* (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 225.0ms | (- (* 0.5 (* (pow re 2) im)) (+ (* 0.16666666666666666 (pow im 3)) (* 1.0 im))) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 2.0b | (log (exp (* 1/3 (pow im 3)))) |
| 0.1b | (* 1/3 (pow im 3)) |
| 0.1b | (* (* 0.5 (cos re)) (- (+ (log (exp (* 1/3 (pow im 3)))) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 0.1b | (* 1/60 (pow im 5)) |
| 22× | associate-*r* |
| 16× | *-un-lft-identity |
| 10× | add-cube-cbrt |
| 10× | add-sqr-sqrt |
| 9× | pow1 |
| 6× | add-exp-log |
| 6× | add-cbrt-cube |
| 5× | distribute-rgt-neg-in |
| 5× | distribute-lft-neg-in |
| 4× | add-log-exp |
| 4× | distribute-lft-out |
| 4× | log-pow |
| 3× | *-commutative |
| 3× | log-prod |
| 2× | distribute-neg-frac |
| 2× | associate-*r/ |
| 2× | distribute-neg-in |
| 1× | flip-+ |
| 1× | cbrt-unprod |
| 1× | distribute-rgt-neg-out |
| 1× | prod-exp |
| 1× | pow-prod-down |
| 1× | associate-*l* |
| 1× | rem-log-exp |
| 1× | unpow3 |
| 1× | flip3-+ |
| 1× | distribute-lft-in |
| 1× | neg-mul-1 |
| 1× | exp-prod |
| 1× | cube-mult |
| 1× | distribute-rgt-in |
| 45.0ms | (* (* 0.5 (cos re)) (- (+ (log (exp (* 1/3 (pow im 3)))) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 3.0ms | (log (exp (* 1/3 (pow im 3)))) |
| 2.0ms | (* 1/60 (pow im 5)) |
| 2.0ms | (* 1/3 (pow im 3)) |
| 122.0ms | (* (* 0.5 (cos re)) (- (+ (log (exp (* 1/3 (pow im 3)))) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 26.0ms | (log (exp (* 1/3 (pow im 3)))) |
| 25.0ms | (* 1/3 (pow im 3)) |
| 19.0ms | (* 1/60 (pow im 5)) |
| 325.0ms | (* (* 0.5 (cos re)) (- (+ (log (exp (* 1/3 (pow im 3)))) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 298.0ms | (* (* (* (* 0.5 (cos re)) (* 0.5 (cos re))) (* 0.5 (cos re))) (* (* (- (+ (log (exp (* 1/3 (pow im 3)))) (+ (* 1/60 (pow im 5)) (* 2 im)))) (- (+ (log (exp (* 1/3 (pow im 3)))) (+ (* 1/60 (pow im 5)) (* 2 im))))) (- (+ (log (exp (* 1/3 (pow im 3)))) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 288.0ms | (* (* 0.5 (cos re)) (- (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 270.0ms | (- (* 0.5 (* (pow re 2) im)) (+ (* 0.16666666666666666 (pow im 3)) (* 1.0 im))) |
| 204.0ms | (* (- (+ (* 1/60 (pow im 5)) (* 2 im))) (* 0.5 (cos re))) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.6b | (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 0.6b | (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 0.6b | (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 0.5b | (* (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 18× | cbrt-div |
| 15× | cbrt-prod |
| 11× | add-cube-cbrt |
| 11× | *-un-lft-identity |
| 11× | add-sqr-sqrt |
| 9× | flip-+ |
| 9× | flip3-+ |
| 9× | pow1 |
| 7× | pow1/3 |
| 6× | add-exp-log |
| 6× | associate-*l* |
| 6× | associate-*r* |
| 4× | add-log-exp |
| 4× | add-cbrt-cube |
| 4× | frac-times |
| 2× | pow-prod-up |
| 2× | associate-*r/ |
| 2× | associate-*l/ |
| 2× | pow-prod-down |
| 1× | cbrt-unprod |
| 1× | *-commutative |
| 1× | prod-exp |
| 1× | pow-plus |
| 1× | pow2 |
| 28.0ms | (* (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 4.0ms | (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 4.0ms | (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 4.0ms | (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 208.0ms | (* (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 173.0ms | (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 136.0ms | (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 127.0ms | (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 534.0ms | (* (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))) (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 487.0ms | (* (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))) (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 336.0ms | (cbrt (- (* (* 1/3 (pow im 3)) (* 1/3 (pow im 3))) (* (+ (* 1/60 (pow im 5)) (* 2 im)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 301.0ms | (+ (* 40/3 (/ (exp (* 1/3 (- (log 1/3600) (* 10 (log (/ 1 im)))))) (pow im 2))) (+ (* 320/9 (/ (exp (* 1/3 (- (log 1/3600) (* 10 (log (/ 1 im)))))) (pow im 4))) (exp (* 1/3 (- (log 1/3600) (* 10 (log (/ 1 im)))))))) |
| 291.0ms | (* (cbrt (- (* (* 1/3 (pow im 3)) (* 1/3 (pow im 3))) (* (+ (* 1/60 (pow im 5)) (* 2 im)) (+ (* 1/60 (pow im 5)) (* 2 im))))) (cbrt (- (* (* 1/3 (pow im 3)) (* 1/3 (pow im 3))) (* (+ (* 1/60 (pow im 5)) (* 2 im)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
13 alts after pruning (11 fresh and 2 done)
Merged error: 0.0b
0% (0.9b remaining)
Error of 1.0b against oracle of 0.1b and baseline of 1.0b
| 7.4s | 5694× | body | 1280 | valid |
| 3.0s | 3565× | body | 640 | valid |
| 790.0ms | 1465× | body | 320 | valid |
| 619.0ms | 4362× | body | 80 | valid |
| 243.0ms | 693× | body | 160 | valid |