



Bits error versus re




Bits error versus im
| Original | 43.4 |
|---|---|
| Target | 0.3 |
| Herbie | 0.7 |
Initial program 43.4
Taylor expanded around 0 0.7
Applied simplify0.7
Time bar (total: 32.1s)Debug logProfile
herbie shell --seed '#(1064173506 2580572819 2847706409 4129882574 1125180799 1845288547)' +o rules:numerics
(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))))