\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\begin{array}{l}
\mathbf{if}\;\frac{\tan^{-1}_* \frac{im}{re}}{\log 10} \le -0.68218817620007255:\\
\;\;\;\;\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 r36464 = im;
double r36465 = re;
double r36466 = atan2(r36464, r36465);
double r36467 = 10.0;
double r36468 = log(r36467);
double r36469 = r36466 / r36468;
return r36469;
}
double f(double re, double im) {
double r36470 = im;
double r36471 = re;
double r36472 = atan2(r36470, r36471);
double r36473 = 10.0;
double r36474 = log(r36473);
double r36475 = r36472 / r36474;
double r36476 = -0.6821881762000725;
bool r36477 = r36475 <= r36476;
double r36478 = 3.0;
double r36479 = pow(r36475, r36478);
double r36480 = cbrt(r36479);
double r36481 = log1p(r36475);
double r36482 = expm1(r36481);
double r36483 = r36477 ? r36480 : r36482;
return r36483;
}



Bits error versus re



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