\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\begin{array}{l}
\mathbf{if}\;\frac{\tan^{-1}_* \frac{im}{re}}{\log 10} \le -0.6821881769209206:\\
\;\;\;\;\sqrt[3]{{\left(\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\right)\right)\\
\end{array}double code(double re, double im) {
return ((double) (((double) atan2(im, re)) / ((double) log(10.0))));
}
double code(double re, double im) {
double VAR;
if ((((double) (((double) atan2(im, re)) / ((double) log(10.0)))) <= -0.6821881769209206)) {
VAR = ((double) cbrt(((double) pow(((double) (((double) atan2(im, re)) / ((double) log(10.0)))), 3.0))));
} else {
VAR = ((double) expm1(((double) log1p(((double) (((double) atan2(im, re)) / ((double) log(10.0))))))));
}
return VAR;
}



Bits error versus re



Bits error versus im
Results
if (/ (atan2 im re) (log 10.0)) < -0.6821881769209206Initial program 1.0
rmApplied add-cbrt-cube1.6
Applied add-cbrt-cube1.0
Applied cbrt-undiv0.7
Simplified0.0
if -0.6821881769209206 < (/ (atan2 im re) (log 10.0)) Initial program 0.8
rmApplied expm1-log1p-u0.8
Final simplification0.5
herbie shell --seed 2020120 +o rules:numerics
(FPCore (re im)
:name "math.log10 on complex, imaginary part"
:precision binary64
(/ (atan2 im re) (log 10)))