e^{re} \cdot \cos ime^{re} \cdot \cos im(FPCore (re im) :precision binary64 (* (exp re) (cos im)))
(FPCore (re im) :precision binary64 (* (exp re) (cos im)))
double code(double re, double im) {
return exp(re) * cos(im);
}
double code(double re, double im) {
return exp(re) * cos(im);
}






Bits error versus re






Bits error versus im
Results
| Alternative 1 | |
|---|---|
| Error | 40.5 |
| Cost | 64 |
| Alternative 2 | |
|---|---|
| Error | 41.5 |
| Cost | 64 |
| Alternative 3 | |
|---|---|
| Error | 60.5 |
| Cost | 64 |

Initial program 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2021022
(FPCore (re im)
:name "math.exp on complex, real part"
:precision binary64
(* (exp re) (cos im)))