



Bits error versus re




Bits error versus im
| Original | 58.0 |
|---|---|
| Target | 0.3 |
| Herbie | 0.8 |
Initial program 58.0
Taylor expanded around 0 0.8
Simplified0.8
Final simplification0.8
herbie shell --seed 2019004 +o rules:numerics
(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: 46.2s)Debug log
1 calls. Slowest were:
| 187.0ms | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 57.9b
Found 2 expressions with local error:
| 6.9b | (- (exp (- 0 im)) (exp im)) |
| 0.0b | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
2 calls. Slowest were:
| 15.0ms | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
| 8.0ms | (- (exp (- 0 im)) (exp im)) |
2 calls. Slowest were:
| 73.0ms | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
| 58.0ms | (- (exp (- 0 im)) (exp im)) |
88 calls. Slowest were:
| 343.0ms | (* (* 0.5 (cos re)) (fma (- (cbrt (exp im))) (* (cbrt (exp im)) (cbrt (exp im))) (* (cbrt (exp im)) (* (cbrt (exp im)) (cbrt (exp im)))))) |
| 326.0ms | (* (* 0.5 (cos re)) (fma (- (exp im)) 1 (* (exp im) 1))) |
| 298.0ms | (* (* 0.5 (cos re)) (fma (- (exp im)) 1 (* (exp im) 1))) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0.1b
Found 3 expressions with local error:
| 0.1b | (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
| 0.0b | (* (pow im 5) -1/60) |
| 0.0b | (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)) |
3 calls. Slowest were:
| 5.0ms | (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
| 2.0ms | (* (pow im 5) -1/60) |
| 0.0ms | (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)) |
3 calls. Slowest were:
| 151.0ms | (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
| 24.0ms | (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)) |
| 19.0ms | (* (pow im 5) -1/60) |
19 calls. Slowest were:
| 497.0ms | (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
| 291.0ms | (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 275.0ms | (- (+ (* 1/3 (pow im 3)) (+ (* 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 (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
| 0.6b | (cbrt (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
| 0.6b | (cbrt (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
| 0.6b | (* (cbrt (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) (cbrt (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
4 calls. Slowest were:
| 10.0ms | (* (cbrt (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) (cbrt (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
| 1.0ms | (cbrt (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
| 1.0ms | (cbrt (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
4 calls. Slowest were:
| 159.0ms | (cbrt (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
| 152.0ms | (* (cbrt (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) (cbrt (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
| 146.0ms | (cbrt (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
| 143.0ms | (cbrt (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
41 calls. Slowest were:
| 431.0ms | (* (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
| 420.0ms | (- (+ (exp (* 1/3 (+ (log im) (log -2)))) (* 1/18 (* (exp (* 1/3 (+ (log im) (log -2)))) (pow im 2)))) (* 1/3240 (* (exp (* 1/3 (+ (log im) (log -2)))) (pow im 4)))) |
| 413.0ms | (* (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
12 alts after pruning (10 fresh and 2 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.7b | (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
| 0.7b | (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
| 0.7b | (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
| 0.5b | (* (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))))) |
4 calls. Slowest were:
| 24.0ms | (* (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))))) |
| 6.0ms | (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
| 6.0ms | (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
4 calls. Slowest were:
| 539.0ms | (* (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))))) |
| 282.0ms | (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
| 281.0ms | (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
| 221.0ms | (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
31 calls. Slowest were:
| 560.0ms | (* (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
| 525.0ms | (* (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
| 519.0ms | (* (cbrt (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))))) (cbrt (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))))) |
14 alts after pruning (12 fresh and 2 done)
Merged error: 0.0b
0% (0.7b remaining)
Error of 0.8b against oracle of 0.1b and baseline of 0.8b