\tan^{-1}_* \frac{im}{re}\tan^{-1}_* \frac{im}{re}(FPCore (re im) :precision binary64 (atan2 im re))
(FPCore (re im) :precision binary64 (atan2 im re))
double code(double re, double im) {
return atan2(im, re);
}
double code(double re, double im) {
return atan2(im, re);
}






Bits error versus re






Bits error versus im
Results
| Alternative 1 | |
|---|---|
| Error | 52.5 |
| Cost | 706 |
| Alternative 2 | |
|---|---|
| Error | 55.0 |
| Cost | 385 |
| Alternative 3 | |
|---|---|
| Error | 58.4 |
| Cost | 64 |

Initial program 0
Simplified0
Final simplification0
herbie shell --seed 2021044
(FPCore (re im)
:name "math.log/1 on complex, imaginary part"
:precision binary64
(atan2 im re))