



Bits error versus re




Bits error versus im
| Original | 58.1 |
|---|---|
| Target | 0.2 |
| Herbie | 0.7 |
Initial program 58.1
Taylor expanded around 0 0.7
Simplified0.7
Final simplification0.7
herbie shell --seed 2019005 +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:
| 208.0ms | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 58.4b
Found 2 expressions with local error:
| 7.6b | (- (exp (- 0 im)) (exp im)) |
| 0.0b | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
2 calls. Slowest were:
| 37.0ms | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
| 16.0ms | (- (exp (- 0 im)) (exp im)) |
2 calls. Slowest were:
| 123.0ms | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
| 64.0ms | (- (exp (- 0 im)) (exp im)) |
88 calls. Slowest were:
| 352.0ms | (* (* 0.5 (cos re)) (fma (- (exp im)) 1 (* (exp im) 1))) |
| 322.0ms | (* (* 0.5 (cos re)) (fma (- (cbrt (exp im))) (* (cbrt (exp im)) (cbrt (exp im))) (* (cbrt (exp im)) (* (cbrt (exp im)) (cbrt (exp im)))))) |
| 307.0ms | (* (* 0.5 (cos re)) (fma (- (exp im)) 1 (* (exp im) 1))) |
3 alts after pruning (3 fresh and 0 done)
Merged error: 0.1b
Found 4 expressions with local error:
| 0.1b | (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
| 0.1b | (* (pow im 5) -1/60) |
| 0.0b | (fma -1/3 (* im im) -2) |
| 0.0b | (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)) |
4 calls. Slowest were:
| 10.0ms | (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
| 4.0ms | (* (pow im 5) -1/60) |
| 0.0ms | (fma -1/3 (* im im) -2) |
4 calls. Slowest were:
| 144.0ms | (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
| 39.0ms | (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)) |
| 36.0ms | (fma -1/3 (* im im) -2) |
| 22.0ms | (* (pow im 5) -1/60) |
22 calls. Slowest were:
| 413.0ms | (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
| 307.0ms | (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 288.0ms | (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
7 alts after pruning (6 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.5b | (* (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:
| 164.0ms | (cbrt (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
| 159.0ms | (cbrt (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))) |
| 145.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))) (cbrt (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
41 calls. Slowest were:
| 514.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))) |
| 487.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))) |
| 428.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)))))))) |
10 alts after pruning (8 fresh and 2 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.6b | (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
| 0.6b | (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
| 0.6b | (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:
| 543.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))))) |
| 350.0ms | (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
| 332.0ms | (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
| 327.0ms | (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))) |
31 calls. Slowest were:
| 521.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)))) |
| 506.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)))) |
| 499.0ms | (+ (log (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60))))) (log (cbrt (* (* 0.5 (cos re)) (fma im (fma -1/3 (* im im) -2) (* (pow im 5) -1/60)))))) |
11 alts after pruning (8 fresh and 3 done)
Merged error: 0.0b
0% (0.7b remaining)
Error of 0.7b against oracle of 0.1b and baseline of 0.7b