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



Bits error versus re



Bits error versus im
Results
Initial program 0.8
rmApplied add-sqr-sqrt0.8
Applied *-un-lft-identity0.8
Applied times-frac0.8
rmApplied div-inv0.8
rmApplied add-sqr-sqrt0.8
Applied associate-*l*0.8
Simplified0.1
rmApplied associate-*r*0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020198
(FPCore (re im)
:name "math.log10 on complex, imaginary part"
:precision binary64
(/ (atan2 im re) (log 10.0)))