\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log 10}\begin{array}{l}
\mathbf{if}\;re \le -1.5790703821962546 \cdot 10^{+117}:\\
\;\;\;\;\frac{1}{\sqrt{\log 10}} \cdot \left(\log \left(-re\right) \cdot \frac{1}{\sqrt{\log 10}}\right)\\
\mathbf{elif}\;re \le -3.263660527236801 \cdot 10^{-218}:\\
\;\;\;\;\frac{1}{\sqrt{\log 10}} \cdot \left(\left(\log \left(\sqrt[3]{\sqrt{im \cdot im + re \cdot re}}\right) + \log \left(\sqrt[3]{\sqrt{im \cdot im + re \cdot re}}\right)\right) \cdot \left(\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \sqrt{\frac{1}{\sqrt{\log 10}}}\right) + \sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \log \left(\sqrt[3]{\sqrt{im \cdot im + re \cdot re}}\right)\right)\right)\\
\mathbf{elif}\;re \le 9.76737562426656 \cdot 10^{-213}:\\
\;\;\;\;\left(\frac{1}{\sqrt{\log 10}} \cdot \log im\right) \cdot \frac{1}{\sqrt{\log 10}}\\
\mathbf{elif}\;re \le 2.584078545341751 \cdot 10^{+99}:\\
\;\;\;\;\frac{1}{\sqrt{\log 10}} \cdot \left(\left(\left(\sqrt{\sqrt{\frac{1}{\sqrt{\log 10}}}} \cdot \log \left(\sqrt{im \cdot im + re \cdot re}\right)\right) \cdot \sqrt{\sqrt{\frac{1}{\sqrt{\log 10}}}}\right) \cdot \sqrt{\frac{1}{\sqrt{\log 10}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{\sqrt{\log 10}} \cdot \log re\right) \cdot \frac{1}{\sqrt{\log 10}}\\
\end{array}double f(double re, double im) {
double r590994 = re;
double r590995 = r590994 * r590994;
double r590996 = im;
double r590997 = r590996 * r590996;
double r590998 = r590995 + r590997;
double r590999 = sqrt(r590998);
double r591000 = log(r590999);
double r591001 = 10.0;
double r591002 = log(r591001);
double r591003 = r591000 / r591002;
return r591003;
}
double f(double re, double im) {
double r591004 = re;
double r591005 = -1.5790703821962546e+117;
bool r591006 = r591004 <= r591005;
double r591007 = 1.0;
double r591008 = 10.0;
double r591009 = log(r591008);
double r591010 = sqrt(r591009);
double r591011 = r591007 / r591010;
double r591012 = -r591004;
double r591013 = log(r591012);
double r591014 = r591013 * r591011;
double r591015 = r591011 * r591014;
double r591016 = -3.263660527236801e-218;
bool r591017 = r591004 <= r591016;
double r591018 = im;
double r591019 = r591018 * r591018;
double r591020 = r591004 * r591004;
double r591021 = r591019 + r591020;
double r591022 = sqrt(r591021);
double r591023 = cbrt(r591022);
double r591024 = log(r591023);
double r591025 = r591024 + r591024;
double r591026 = sqrt(r591011);
double r591027 = r591026 * r591026;
double r591028 = r591025 * r591027;
double r591029 = r591026 * r591024;
double r591030 = r591026 * r591029;
double r591031 = r591028 + r591030;
double r591032 = r591011 * r591031;
double r591033 = 9.76737562426656e-213;
bool r591034 = r591004 <= r591033;
double r591035 = log(r591018);
double r591036 = r591011 * r591035;
double r591037 = r591036 * r591011;
double r591038 = 2.584078545341751e+99;
bool r591039 = r591004 <= r591038;
double r591040 = sqrt(r591026);
double r591041 = log(r591022);
double r591042 = r591040 * r591041;
double r591043 = r591042 * r591040;
double r591044 = r591043 * r591026;
double r591045 = r591011 * r591044;
double r591046 = log(r591004);
double r591047 = r591011 * r591046;
double r591048 = r591047 * r591011;
double r591049 = r591039 ? r591045 : r591048;
double r591050 = r591034 ? r591037 : r591049;
double r591051 = r591017 ? r591032 : r591050;
double r591052 = r591006 ? r591015 : r591051;
return r591052;
}



Bits error versus re



Bits error versus im
Results
if re < -1.5790703821962546e+117Initial program 53.0
rmApplied add-sqr-sqrt53.0
Applied pow153.0
Applied log-pow53.0
Applied times-frac53.0
rmApplied div-inv53.0
Applied associate-*r*53.0
Taylor expanded around -inf 8.2
Simplified8.2
if -1.5790703821962546e+117 < re < -3.263660527236801e-218Initial program 18.5
rmApplied add-sqr-sqrt18.5
Applied pow118.5
Applied log-pow18.5
Applied times-frac18.5
rmApplied div-inv18.4
Applied associate-*r*18.4
rmApplied add-sqr-sqrt18.4
Applied associate-*l*18.5
rmApplied add-cube-cbrt18.5
Applied log-prod18.5
Applied distribute-rgt-in18.5
Applied distribute-lft-in18.5
Simplified18.4
if -3.263660527236801e-218 < re < 9.76737562426656e-213Initial program 30.3
rmApplied add-sqr-sqrt30.3
Applied pow130.3
Applied log-pow30.3
Applied times-frac30.3
rmApplied div-inv30.2
Applied associate-*r*30.2
Taylor expanded around 0 33.5
if 9.76737562426656e-213 < re < 2.584078545341751e+99Initial program 18.9
rmApplied add-sqr-sqrt18.9
Applied pow118.9
Applied log-pow18.9
Applied times-frac18.9
rmApplied div-inv18.8
Applied associate-*r*18.8
rmApplied add-sqr-sqrt18.8
Applied associate-*l*18.8
rmApplied add-sqr-sqrt18.8
Applied sqrt-prod18.9
Applied associate-*l*18.9
if 2.584078545341751e+99 < re Initial program 50.5
rmApplied add-sqr-sqrt50.5
Applied pow150.5
Applied log-pow50.5
Applied times-frac50.5
rmApplied div-inv50.5
Applied associate-*r*50.5
Taylor expanded around inf 9.1
Final simplification17.7
herbie shell --seed 2019156
(FPCore (re im)
:name "math.log10 on complex, real part"
(/ (log (sqrt (+ (* re re) (* im im)))) (log 10)))