\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot {\left(\frac{1}{\sqrt{\log 10}}\right)}^{1.5}\right)(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 (/ 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) sqrt((1.0 / ((double) sqrt(((double) log(10.0))))))) * ((double) (((double) atan2(im, re)) * ((double) pow((1.0 / ((double) sqrt(((double) log(10.0))))), 1.5))))));
}



Bits error versus re



Bits error versus im
Results
Initial program Error: 0.8 bits
rmApplied add-sqr-sqrtError: 0.8 bits
Applied *-un-lft-identityError: 0.8 bits
Applied times-fracError: 0.8 bits
rmApplied div-invError: 0.8 bits
rmApplied add-sqr-sqrtError: 0.8 bits
Applied associate-*l*Error: 0.8 bits
SimplifiedError: 0.1 bits
Final simplificationError: 0.1 bits
herbie shell --seed 2020204
(FPCore (re im)
:name "math.log10 on complex, imaginary part"
:precision binary64
(/ (atan2 im re) (log 10.0)))