\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log 10}\begin{array}{l}
\mathbf{if}\;re \le -1.354527584030358 \cdot 10^{+95}:\\
\;\;\;\;\left(\frac{\sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt{\log 10}}} \cdot \frac{-2 \cdot \log \left(\frac{-1}{re}\right)}{\sqrt{\log 10}}\right) \cdot \frac{\sqrt[3]{\frac{1}{2}} \cdot \sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt{\log 10}}}\\
\mathbf{elif}\;re \le 1.2298023334030224 \cdot 10^{+93}:\\
\;\;\;\;\frac{\sqrt[3]{\frac{1}{2}} \cdot \sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt{\log 10}}} \cdot \left(\frac{\log \left(im \cdot im + re \cdot re\right)}{\sqrt{\log 10}} \cdot \frac{\sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt{\log 10}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt{\log 10}}} \cdot \frac{\log re + \log re}{\sqrt{\log 10}}\right) \cdot \frac{\sqrt[3]{\frac{1}{2}} \cdot \sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt{\log 10}}}\\
\end{array}double f(double re, double im) {
double r1212584 = re;
double r1212585 = r1212584 * r1212584;
double r1212586 = im;
double r1212587 = r1212586 * r1212586;
double r1212588 = r1212585 + r1212587;
double r1212589 = sqrt(r1212588);
double r1212590 = log(r1212589);
double r1212591 = 10.0;
double r1212592 = log(r1212591);
double r1212593 = r1212590 / r1212592;
return r1212593;
}
double f(double re, double im) {
double r1212594 = re;
double r1212595 = -1.354527584030358e+95;
bool r1212596 = r1212594 <= r1212595;
double r1212597 = 0.5;
double r1212598 = cbrt(r1212597);
double r1212599 = 10.0;
double r1212600 = log(r1212599);
double r1212601 = sqrt(r1212600);
double r1212602 = sqrt(r1212601);
double r1212603 = r1212598 / r1212602;
double r1212604 = -2.0;
double r1212605 = -1.0;
double r1212606 = r1212605 / r1212594;
double r1212607 = log(r1212606);
double r1212608 = r1212604 * r1212607;
double r1212609 = r1212608 / r1212601;
double r1212610 = r1212603 * r1212609;
double r1212611 = r1212598 * r1212598;
double r1212612 = r1212611 / r1212602;
double r1212613 = r1212610 * r1212612;
double r1212614 = 1.2298023334030224e+93;
bool r1212615 = r1212594 <= r1212614;
double r1212616 = im;
double r1212617 = r1212616 * r1212616;
double r1212618 = r1212594 * r1212594;
double r1212619 = r1212617 + r1212618;
double r1212620 = log(r1212619);
double r1212621 = r1212620 / r1212601;
double r1212622 = r1212621 * r1212603;
double r1212623 = r1212612 * r1212622;
double r1212624 = log(r1212594);
double r1212625 = r1212624 + r1212624;
double r1212626 = r1212625 / r1212601;
double r1212627 = r1212603 * r1212626;
double r1212628 = r1212627 * r1212612;
double r1212629 = r1212615 ? r1212623 : r1212628;
double r1212630 = r1212596 ? r1212613 : r1212629;
return r1212630;
}



Bits error versus re



Bits error versus im
Results
if re < -1.354527584030358e+95Initial program 49.7
rmApplied add-sqr-sqrt49.7
Applied pow1/249.7
Applied log-pow49.7
Applied times-frac49.7
rmApplied add-sqr-sqrt49.7
Applied sqrt-prod49.9
Applied add-cube-cbrt49.7
Applied times-frac49.7
Applied associate-*l*49.7
Taylor expanded around -inf 9.1
Simplified9.1
if -1.354527584030358e+95 < re < 1.2298023334030224e+93Initial program 21.2
rmApplied add-sqr-sqrt21.2
Applied pow1/221.2
Applied log-pow21.2
Applied times-frac21.1
rmApplied add-sqr-sqrt21.1
Applied sqrt-prod21.7
Applied add-cube-cbrt21.1
Applied times-frac21.1
Applied associate-*l*21.1
if 1.2298023334030224e+93 < re Initial program 48.6
rmApplied add-sqr-sqrt48.6
Applied pow1/248.6
Applied log-pow48.6
Applied times-frac48.5
rmApplied add-sqr-sqrt48.5
Applied sqrt-prod48.7
Applied add-cube-cbrt48.5
Applied times-frac48.5
Applied associate-*l*48.5
Taylor expanded around inf 8.3
Simplified8.3
Final simplification16.8
herbie shell --seed 2019164
(FPCore (re im)
:name "math.log10 on complex, real part"
(/ (log (sqrt (+ (* re re) (* im im)))) (log 10)))