\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log 10}\begin{array}{l}
\mathbf{if}\;re \le -2.366950917668637798933900247544484583658 \cdot 10^{69}:\\
\;\;\;\;\frac{1}{\sqrt{\log 10}} \cdot \log \left({\left(-re\right)}^{\left(\frac{1}{\sqrt{\log 10}}\right)}\right)\\
\mathbf{elif}\;re \le 7.747777771049567852122186762181106639836 \cdot 10^{94}:\\
\;\;\;\;\frac{\frac{1}{\sqrt{\log 10}}}{\sqrt{\log 10}} \cdot \log \left(\sqrt[3]{\sqrt{im \cdot im + re \cdot re}} \cdot \left(\sqrt[3]{\sqrt{im \cdot im + re \cdot re}} \cdot \sqrt[3]{\sqrt{im \cdot im + re \cdot re}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left({re}^{\left(\frac{1}{\sqrt{\log 10}}\right)}\right) \cdot \frac{1}{\sqrt{\log 10}}\\
\end{array}double f(double re, double im) {
double r41102 = re;
double r41103 = r41102 * r41102;
double r41104 = im;
double r41105 = r41104 * r41104;
double r41106 = r41103 + r41105;
double r41107 = sqrt(r41106);
double r41108 = log(r41107);
double r41109 = 10.0;
double r41110 = log(r41109);
double r41111 = r41108 / r41110;
return r41111;
}
double f(double re, double im) {
double r41112 = re;
double r41113 = -2.3669509176686378e+69;
bool r41114 = r41112 <= r41113;
double r41115 = 1.0;
double r41116 = 10.0;
double r41117 = log(r41116);
double r41118 = sqrt(r41117);
double r41119 = r41115 / r41118;
double r41120 = -r41112;
double r41121 = pow(r41120, r41119);
double r41122 = log(r41121);
double r41123 = r41119 * r41122;
double r41124 = 7.747777771049568e+94;
bool r41125 = r41112 <= r41124;
double r41126 = r41119 / r41118;
double r41127 = im;
double r41128 = r41127 * r41127;
double r41129 = r41112 * r41112;
double r41130 = r41128 + r41129;
double r41131 = sqrt(r41130);
double r41132 = cbrt(r41131);
double r41133 = r41132 * r41132;
double r41134 = r41132 * r41133;
double r41135 = log(r41134);
double r41136 = r41126 * r41135;
double r41137 = pow(r41112, r41119);
double r41138 = log(r41137);
double r41139 = r41138 * r41119;
double r41140 = r41125 ? r41136 : r41139;
double r41141 = r41114 ? r41123 : r41140;
return r41141;
}



Bits error versus re



Bits error versus im
Results
if re < -2.3669509176686378e+69Initial program 46.4
rmApplied add-sqr-sqrt46.4
Applied pow146.4
Applied log-pow46.4
Applied times-frac46.4
rmApplied add-log-exp46.4
Simplified46.4
Taylor expanded around -inf 10.5
Simplified10.5
if -2.3669509176686378e+69 < re < 7.747777771049568e+94Initial program 22.5
rmApplied add-sqr-sqrt22.5
Applied pow122.5
Applied log-pow22.5
Applied times-frac22.4
rmApplied add-log-exp22.4
Simplified22.3
rmApplied log-pow22.3
Applied associate-*r*22.3
Simplified22.3
rmApplied add-cube-cbrt22.3
if 7.747777771049568e+94 < re Initial program 49.1
rmApplied add-sqr-sqrt49.1
Applied pow149.1
Applied log-pow49.1
Applied times-frac49.1
rmApplied add-log-exp49.1
Simplified49.0
Taylor expanded around inf 9.8
Final simplification17.7
herbie shell --seed 2019179
(FPCore (re im)
:name "math.log10 on complex, real part"
(/ (log (sqrt (+ (* re re) (* im im)))) (log 10.0)))