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



Bits error versus re



Bits error versus im
Results
Initial program 0.8
Applied add-sqr-sqrt_binary640.8
Applied *-un-lft-identity_binary640.8
Applied times-frac_binary640.8
Taylor expanded in im around 0 0.8
Applied add-sqr-sqrt_binary640.8
Applied associate-*l*_binary640.8
Simplified0.1
Applied associate-*r*_binary640.1
Final simplification0.1
herbie shell --seed 2021357
(FPCore (re im)
:name "math.log10 on complex, imaginary part"
:precision binary64
(/ (atan2 im re) (log 10.0)))