\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}:\\
\;\;\;\;\left(\left(\log \left(\frac{-1}{re}\right) \cdot -2\right) \cdot \frac{\frac{1}{2}}{\sqrt{\log 10}}\right) \cdot \frac{1}{\sqrt{\log 10}}\\
\mathbf{elif}\;re \le 7.747777771049567852122186762181106639836 \cdot 10^{94}:\\
\;\;\;\;\left(\sqrt{\frac{1}{2}} \cdot \left(\frac{\sqrt{\frac{1}{2}}}{\sqrt{\log 10}} \cdot \log \left(im \cdot im + re \cdot re\right)\right)\right) \cdot \frac{1}{\sqrt{\log 10}}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{\frac{1}{\log 10}} \cdot \log re\right) \cdot \frac{1}{\sqrt{\log 10}}\\
\end{array}double f(double re, double im) {
double r1408943 = re;
double r1408944 = r1408943 * r1408943;
double r1408945 = im;
double r1408946 = r1408945 * r1408945;
double r1408947 = r1408944 + r1408946;
double r1408948 = sqrt(r1408947);
double r1408949 = log(r1408948);
double r1408950 = 10.0;
double r1408951 = log(r1408950);
double r1408952 = r1408949 / r1408951;
return r1408952;
}
double f(double re, double im) {
double r1408953 = re;
double r1408954 = -2.3669509176686378e+69;
bool r1408955 = r1408953 <= r1408954;
double r1408956 = -1.0;
double r1408957 = r1408956 / r1408953;
double r1408958 = log(r1408957);
double r1408959 = -2.0;
double r1408960 = r1408958 * r1408959;
double r1408961 = 0.5;
double r1408962 = 10.0;
double r1408963 = log(r1408962);
double r1408964 = sqrt(r1408963);
double r1408965 = r1408961 / r1408964;
double r1408966 = r1408960 * r1408965;
double r1408967 = 1.0;
double r1408968 = r1408967 / r1408964;
double r1408969 = r1408966 * r1408968;
double r1408970 = 7.747777771049568e+94;
bool r1408971 = r1408953 <= r1408970;
double r1408972 = sqrt(r1408961);
double r1408973 = r1408972 / r1408964;
double r1408974 = im;
double r1408975 = r1408974 * r1408974;
double r1408976 = r1408953 * r1408953;
double r1408977 = r1408975 + r1408976;
double r1408978 = log(r1408977);
double r1408979 = r1408973 * r1408978;
double r1408980 = r1408972 * r1408979;
double r1408981 = r1408980 * r1408968;
double r1408982 = r1408967 / r1408963;
double r1408983 = sqrt(r1408982);
double r1408984 = log(r1408953);
double r1408985 = r1408983 * r1408984;
double r1408986 = r1408985 * r1408968;
double r1408987 = r1408971 ? r1408981 : r1408986;
double r1408988 = r1408955 ? r1408969 : r1408987;
return r1408988;
}



Bits error versus re



Bits error versus im
Results
if re < -2.3669509176686378e+69Initial program 46.4
rmApplied add-sqr-sqrt46.4
Applied pow1/246.4
Applied log-pow46.4
Applied times-frac46.4
rmApplied div-inv46.4
Applied associate-*r*46.4
Taylor expanded around -inf 10.6
Simplified10.6
if -2.3669509176686378e+69 < re < 7.747777771049568e+94Initial program 22.5
rmApplied add-sqr-sqrt22.5
Applied pow1/222.5
Applied log-pow22.5
Applied times-frac22.4
rmApplied div-inv22.3
Applied associate-*r*22.3
rmApplied *-un-lft-identity22.3
Applied add-sqr-sqrt22.6
Applied times-frac22.3
Applied associate-*l*22.4
if 7.747777771049568e+94 < re Initial program 49.1
rmApplied add-sqr-sqrt49.1
Applied pow1/249.1
Applied log-pow49.1
Applied times-frac49.1
rmApplied div-inv49.1
Applied associate-*r*49.1
Taylor expanded around inf 9.9
Simplified9.9
Final simplification17.8
herbie shell --seed 2019179
(FPCore (re im)
:name "math.log10 on complex, real part"
(/ (log (sqrt (+ (* re re) (* im im)))) (log 10.0)))