



Bits error versus re




Bits error versus im
Results
| Original | 58.0 |
|---|---|
| Target | 0.2 |
| Herbie | 0.7 |
Initial program 58.0
Taylor expanded around 0 0.7
Final simplification0.7
herbie shell --seed 2018360
(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: 29.4s)Debug log
2 alts after pruning (2 fresh and 0 done)
Merged error: 58.2b
Found 2 expressions with local error:
| 4.9b | (- (exp (- 0 im)) (exp im)) |
| 0.0b | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
2 calls. Slowest were:
| 13.0ms | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
| 6.0ms | (- (exp (- 0 im)) (exp im)) |
2 calls. Slowest were:
| 128.0ms | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
| 69.0ms | (- (exp (- 0 im)) (exp im)) |
24 calls. Slowest were:
| 160.0ms | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
| 151.0ms | (- (* 0.5 (* (pow re 2) im)) (+ (* 0.16666666666666666 (pow im 3)) (* 1.0 im))) |
| 121.0ms | (* 0.5 (* (- (exp (- im)) (exp im)) (cos re))) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0.2b
Found 4 expressions with local error:
| 0.2b | (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 0.1b | (* 1/3 (pow im 3)) |
| 0.1b | (* 1/60 (pow im 5)) |
| 0.0b | (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))) |
4 calls. Slowest were:
| 19.0ms | (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 9.0ms | (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))) |
| 1.0ms | (* 1/3 (pow im 3)) |
4 calls. Slowest were:
| 154.0ms | (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 31.0ms | (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))) |
| 22.0ms | (* 1/3 (pow im 3)) |
| 20.0ms | (* 1/60 (pow im 5)) |
39 calls. Slowest were:
| 323.0ms | (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 322.0ms | (- (+ (* 1.0 (* im (cos re))) (+ (* 0.16666666666666666 (* (pow im 3) (cos re))) (* 0.008333333333333333 (* (pow im 5) (cos re)))))) |
| 318.0ms | (* (* 0.5 (cos re)) (- (+ (* 1/60 (pow im 5)) (* 2 im)))) |
10 alts after pruning (9 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.4b | (* (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 calls. Slowest were:
| 19.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))))) |
| 8.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 calls. Slowest were:
| 216.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))))) |
| 196.0ms | (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 191.0ms | (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 158.0ms | (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
59 calls. Slowest were:
| 536.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)))) |
| 516.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)))) |
| 314.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)))))))) |
13 alts after pruning (11 fresh and 2 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.4b | (* (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 calls. Slowest were:
| 23.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 calls. Slowest were:
| 166.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))))) |
| 150.0ms | (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 144.0ms | (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 135.0ms | (cbrt (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
59 calls. Slowest were:
| 551.0ms | (- (+ (* 1/18 (* (exp (* 1/3 (+ (log 2) (log im)))) (pow im 2))) (exp (* 1/3 (+ (log 2) (log im))))) (* 1/3240 (* (exp (* 1/3 (+ (log 2) (log im)))) (pow im 4)))) |
| 518.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)))) |
| 517.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)))) |
12 alts after pruning (10 fresh and 2 done)
Merged error: 0.0b
0% (0.7b remaining)
Error of 0.7b against oracle of 0.0b and baseline of 0.7b