



Bits error versus re




Bits error versus im
Results
| Original | 43.5 |
|---|---|
| Target | 0.3 |
| Herbie | 0.7 |
Initial program 43.5
Taylor expanded around 0 0.7
Final simplification0.7
herbie shell --seed 2019007
(FPCore (re im)
:name "math.cos on complex, imaginary part"
:herbie-target
(if (< (fabs im) 1) (- (* (sin re) (+ (+ im (* (* (* 1/6 im) im) im)) (* (* (* (* (* 1/120 im) im) im) im) im)))) (* (* 0.5 (sin re)) (- (exp (- im)) (exp im))))
(* (* 0.5 (sin re)) (- (exp (- im)) (exp im))))
Time bar (total: 47.5s)Debug log
1 calls. Slowest were:
| 180.0ms | (* (* 0.5 (sin re)) (- (exp (- im)) (exp im))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 46.7b
Found 2 expressions with local error:
| 7.7b | (- (exp (- im)) (exp im)) |
| 0.0b | (* (* 0.5 (sin re)) (- (exp (- im)) (exp im))) |
2 calls. Slowest were:
| 16.0ms | (* (* 0.5 (sin re)) (- (exp (- im)) (exp im))) |
| 15.0ms | (- (exp (- im)) (exp im)) |
2 calls. Slowest were:
| 108.0ms | (* (* 0.5 (sin re)) (- (exp (- im)) (exp im))) |
| 52.0ms | (- (exp (- im)) (exp im)) |
24 calls. Slowest were:
| 145.0ms | (* 0.5 (* (sin re) (- (exp (* -1 im)) (exp im)))) |
| 127.0ms | (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 126.0ms | (* 0.5 (* (sin re) (- (exp (- im)) (exp im)))) |
2 alts after pruning (2 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 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 0.0b | (* 1/60 (pow im 5)) |
| 0.0b | (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))) |
4 calls. Slowest were:
| 41.0ms | (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 13.0ms | (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))) |
| 7.0ms | (* 1/3 (pow im 3)) |
4 calls. Slowest were:
| 130.0ms | (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 42.0ms | (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))) |
| 29.0ms | (* 1/60 (pow im 5)) |
| 21.0ms | (* 1/3 (pow im 3)) |
39 calls. Slowest were:
| 419.0ms | (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 305.0ms | (* (* 0.5 (sin re)) (- (+ (* 1/60 (pow im 5)) (* 2 im)))) |
| 260.0ms | (* (* (* (* 0.5 (sin re)) (* 0.5 (sin re))) (* 0.5 (sin 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.7b | (cbrt (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 0.7b | (cbrt (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 0.7b | (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)))))) |
4 calls. Slowest were:
| 40.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)))))) |
| 11.0ms | (cbrt (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 9.0ms | (cbrt (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
4 calls. Slowest were:
| 217.0ms | (cbrt (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 207.0ms | (cbrt (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
| 206.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)))))) |
| 162.0ms | (cbrt (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))) |
94 calls. Slowest were:
| 509.0ms | (* (cbrt (- (* 1/3 (pow im 3)) (+ (* 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))) (* (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))))) |
| 458.0ms | (cbrt (- (+ (pow (* 1/3 (pow im 3)) 3) (pow (+ (* 1/60 (pow im 5)) (* 2 im)) 3)))) |
| 428.0ms | (cbrt (- (+ (pow (* 1/3 (pow im 3)) 3) (pow (+ (* 1/60 (pow im 5)) (* 2 im)) 3)))) |
9 alts after pruning (7 fresh and 2 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 11.9b | (cbrt (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 11.9b | (cbrt (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 11.9b | (cbrt (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 0.4b | (* (cbrt (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) (cbrt (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))))) |
4 calls. Slowest were:
| 24.0ms | (* (cbrt (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) (cbrt (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))))) |
| 22.0ms | (cbrt (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 18.0ms | (cbrt (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
4 calls. Slowest were:
| 440.0ms | (* (cbrt (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) (cbrt (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))))) |
| 331.0ms | (cbrt (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 322.0ms | (cbrt (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
| 318.0ms | (cbrt (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
49 calls. Slowest were:
| 412.0ms | (- (+ (* (cbrt -0.5) (exp (* 1/3 (+ (log 2) (+ (log im) (log re)))))) (* 1/18 (* (pow im 2) (* (cbrt -0.5) (exp (* 1/3 (+ (log 2) (+ (log im) (log re))))))))) (* 1/18 (* (pow re 2) (* (cbrt -0.5) (exp (* 1/3 (+ (log 2) (+ (log im) (log re))))))))) |
| 395.0ms | (* (cbrt (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) (cbrt (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im))))))) |
| 389.0ms | (cbrt (* (* 0.5 (sin re)) (- (+ (* 1/3 (pow im 3)) (+ (* 1/60 (pow im 5)) (* 2 im)))))) |
11 alts after pruning (8 fresh and 3 done)
Merged error: 0.0b
0% (0.6b remaining)
Error of 0.7b against oracle of 0.1b and baseline of 0.7b