\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\sqrt{\sqrt{\frac{1}{\sqrt{\log 10}}}} \cdot \left(\sqrt{\sqrt{\frac{1}{\sqrt{\log 10}}}} \cdot \left(\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}\right)\right)double code(double re, double im) {
return (atan2(im, re) / log(10.0));
}
double code(double re, double im) {
return (sqrt(sqrt((1.0 / sqrt(log(10.0))))) * (sqrt(sqrt((1.0 / sqrt(log(10.0))))) * (sqrt((1.0 / sqrt(log(10.0)))) * (atan2(im, re) / sqrt(log(10.0))))));
}



Bits error versus re



Bits error versus im
Results
Initial program 0.9
rmApplied add-sqr-sqrt0.9
Applied *-un-lft-identity0.9
Applied times-frac0.8
rmApplied add-sqr-sqrt0.8
Applied associate-*l*0.9
rmApplied add-sqr-sqrt0.9
Applied sqrt-prod0.1
Applied associate-*l*0.1
Final simplification0.1
herbie shell --seed 2020091
(FPCore (re im)
:name "math.log10 on complex, imaginary part"
:precision binary64
(/ (atan2 im re) (log 10)))