



Bits error versus re




Bits error versus im
Results
| Original | 43.3 |
|---|---|
| Target | 0.3 |
| Herbie | 0.8 |
Initial program 43.3
Taylor expanded around 0 0.8
rmApplied add-log-exp0.8
Final simplification0.8
Time bar (total: 46.0s)Debug logProfile
| Baseline | Herbie | Oracle | Span | % | |
|---|---|---|---|---|---|
| Regimes | 0.8 | 0.8 | 0.1 | 0.8 | 0% |
herbie shell --seed 2018352
(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))))