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



Bits error versus re



Bits error versus im
Results
Initial program 0.8
rmApplied clear-num_binary64_761.0
rmApplied div-inv_binary64_741.0
Final simplification1.0
herbie shell --seed 2020281
(FPCore (re im)
:name "math.log10 on complex, imaginary part"
:precision binary64
(/ (atan2 im re) (log 10.0)))