



Bits error versus re




Bits error versus im
Results
| Original | 57.9 |
|---|---|
| Target | 0.3 |
| Herbie | 0.8 |
Initial program 57.9
Taylor expanded around 0 0.8
Final simplification0.8
herbie shell --seed 2018362
(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: 33.1s)Debug log
2 alts after pruning (2 fresh and 0 done)
Merged error: 57.9b
Found 2 expressions with local error:
| 5.4b | (- (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))) |
| 7.0ms | (- (exp (- 0 im)) (exp im)) |
2 calls. Slowest were:
| 111.0ms | (* (* 0.5 (cos re)) (- (exp (- 0 im)) (exp im))) |
| 51.0ms | (- (exp (- 0 im)) (exp im)) |
24 calls. Slowest were:
| 241.0ms | (- (* 0.5 (* (pow re 2) im)) (+ (* 0.16666666666666666 (pow im 3)) (* 1.0 im))) |
| 187.0ms | (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 175.0ms | (* 0.5 (* (- (exp (* -1 im)) (exp im)) (cos re))) |
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)) (- (+ (* 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:
| 28.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)) |
4 calls. Slowest were:
| 142.0ms | (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 28.0ms | (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))) |
| 26.0ms | (* 1/3 (pow im 3)) |
| 23.0ms | (* 1/60 (pow im 5)) |
39 calls. Slowest were:
| 364.0ms | (* (* 0.5 (cos re)) (- (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 335.0ms | (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 288.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)))))) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.6b | (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 0.6b | (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 0.6b | (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 0.5b | (* (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))))) |
4 calls. Slowest were:
| 24.0ms | (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 19.0ms | (* (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))))) |
| 12.0ms | (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
4 calls. Slowest were:
| 602.0ms | (* (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))))) |
| 307.0ms | (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 304.0ms | (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 289.0ms | (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
49 calls. Slowest were:
| 629.0ms | (sqrt (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))))) |
| 467.0ms | (+ (* 20/3 (/ (* (cbrt 0.5) (exp (* 1/3 (- (log (* 1/60 (cos re))) (* 5 (log (/ -1 im))))))) (pow im 2))) (* (cbrt 0.5) (exp (* 1/3 (- (log (* 1/60 (cos re))) (* 5 (log (/ -1 im)))))))) |
| 397.0ms | (sqrt (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))))) |
11 alts after pruning (9 fresh and 2 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.6b | (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 0.6b | (cbrt (* (* 0.5 (cos re)) (- (+ (* 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 (* 0.5 (cos re))) (* (cbrt (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))))) |
4 calls. Slowest were:
| 65.0ms | (* (cbrt (* 0.5 (cos re))) (* (cbrt (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))))) |
| 10.0ms | (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 10.0ms | (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
4 calls. Slowest were:
| 708.0ms | (* (cbrt (* 0.5 (cos re))) (* (cbrt (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))))) |
| 332.0ms | (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 308.0ms | (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 190.0ms | (cbrt (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
49 calls. Slowest were:
| 439.0ms | (cbrt (- (+ (pow (* 1/3 (pow im 3)) 3) (pow (+ (* 1/60 (pow im 5)) (* 2 im)) 3)))) |
| 334.0ms | (cbrt (* (* 0.5 (cos re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 332.0ms | (+ (* (exp (* 1/3 (- (log (* 1/60 (cos re))) (* 5 (log (/ 1 im)))))) (cbrt -0.5)) (* 20/3 (/ (* (exp (* 1/3 (- (log (* 1/60 (cos re))) (* 5 (log (/ 1 im)))))) (cbrt -0.5)) (pow im 2)))) |
10 alts after pruning (8 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