\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log 10}\begin{array}{l}
\mathbf{if}\;re \le -5.224721482189337913047315552869611433081 \cdot 10^{153}:\\
\;\;\;\;\log \left({\left(\frac{-1}{re}\right)}^{\left(-\sqrt{\frac{1}{\log 10}}\right)}\right) \cdot \frac{1}{\sqrt{\log 10}}\\
\mathbf{elif}\;re \le 264502897229656192:\\
\;\;\;\;\log \left({\left({\left(re \cdot re + im \cdot im\right)}^{\left(\sqrt{\frac{1}{2}}\right)}\right)}^{\left(\frac{\sqrt{\frac{1}{2}}}{\sqrt{\log 10}}\right)}\right) \cdot \frac{1}{\sqrt{\log 10}}\\
\mathbf{else}:\\
\;\;\;\;\left(\log re \cdot \sqrt{\frac{1}{\log 10}}\right) \cdot \frac{1}{\sqrt{\log 10}}\\
\end{array}double f(double re, double im) {
double r98073 = re;
double r98074 = r98073 * r98073;
double r98075 = im;
double r98076 = r98075 * r98075;
double r98077 = r98074 + r98076;
double r98078 = sqrt(r98077);
double r98079 = log(r98078);
double r98080 = 10.0;
double r98081 = log(r98080);
double r98082 = r98079 / r98081;
return r98082;
}
double f(double re, double im) {
double r98083 = re;
double r98084 = -5.224721482189338e+153;
bool r98085 = r98083 <= r98084;
double r98086 = -1.0;
double r98087 = r98086 / r98083;
double r98088 = 1.0;
double r98089 = 10.0;
double r98090 = log(r98089);
double r98091 = r98088 / r98090;
double r98092 = sqrt(r98091);
double r98093 = -r98092;
double r98094 = pow(r98087, r98093);
double r98095 = log(r98094);
double r98096 = sqrt(r98090);
double r98097 = r98088 / r98096;
double r98098 = r98095 * r98097;
double r98099 = 2.645028972296562e+17;
bool r98100 = r98083 <= r98099;
double r98101 = r98083 * r98083;
double r98102 = im;
double r98103 = r98102 * r98102;
double r98104 = r98101 + r98103;
double r98105 = 0.5;
double r98106 = sqrt(r98105);
double r98107 = pow(r98104, r98106);
double r98108 = r98106 / r98096;
double r98109 = pow(r98107, r98108);
double r98110 = log(r98109);
double r98111 = r98110 * r98097;
double r98112 = log(r98083);
double r98113 = r98112 * r98092;
double r98114 = r98113 * r98097;
double r98115 = r98100 ? r98111 : r98114;
double r98116 = r98085 ? r98098 : r98115;
return r98116;
}



Bits error versus re



Bits error versus im
Results
if re < -5.224721482189338e+153Initial program 64.0
rmApplied add-sqr-sqrt64.0
Applied pow1/264.0
Applied log-pow64.0
Applied times-frac64.0
rmApplied div-inv64.0
Applied associate-*r*64.0
rmApplied add-log-exp64.0
Simplified64.0
Taylor expanded around -inf 6.5
Simplified6.5
if -5.224721482189338e+153 < re < 2.645028972296562e+17Initial program 21.7
rmApplied add-sqr-sqrt21.7
Applied pow1/221.7
Applied log-pow21.7
Applied times-frac21.7
rmApplied div-inv21.5
Applied associate-*r*21.5
rmApplied add-log-exp21.6
Simplified21.5
rmApplied pow121.5
Applied log-pow21.5
Applied sqrt-prod21.5
Applied add-sqr-sqrt21.9
Applied times-frac21.5
Applied pow-unpow21.5
Simplified21.5
if 2.645028972296562e+17 < re Initial program 41.4
rmApplied add-sqr-sqrt41.4
Applied pow1/241.4
Applied log-pow41.4
Applied times-frac41.4
rmApplied div-inv41.3
Applied associate-*r*41.3
Taylor expanded around inf 12.1
Simplified12.1
Final simplification17.4
herbie shell --seed 2019350
(FPCore (re im)
:name "math.log10 on complex, real part"
:precision binary64
(/ (log (sqrt (+ (* re re) (* im im)))) (log 10)))