\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\begin{array}{l}
\mathbf{if}\;\frac{\tan^{-1}_* \frac{im}{re}}{\log 10} \le -0.682188176858241069:\\
\;\;\;\;\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 f(double re, double im) {
double r27468 = im;
double r27469 = re;
double r27470 = atan2(r27468, r27469);
double r27471 = 10.0;
double r27472 = log(r27471);
double r27473 = r27470 / r27472;
return r27473;
}
double f(double re, double im) {
double r27474 = im;
double r27475 = re;
double r27476 = atan2(r27474, r27475);
double r27477 = 10.0;
double r27478 = log(r27477);
double r27479 = r27476 / r27478;
double r27480 = -0.6821881768582411;
bool r27481 = r27479 <= r27480;
double r27482 = 3.0;
double r27483 = pow(r27479, r27482);
double r27484 = cbrt(r27483);
double r27485 = log1p(r27479);
double r27486 = expm1(r27485);
double r27487 = r27481 ? r27484 : r27486;
return r27487;
}



Bits error versus re



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