\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log 10}\begin{array}{l}
\mathbf{if}\;re \le -4.60789516418958 \cdot 10^{+152}:\\
\;\;\;\;\left(\frac{\sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt{\log 10}}} \cdot \frac{\log \left(\frac{-1}{re}\right) \cdot -2}{\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 2.0183464746972817 \cdot 10^{+102}:\\
\;\;\;\;\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}:\\
\;\;\;\;\frac{\frac{1}{2}}{\sqrt{\log 10}} \cdot \left(\left(\log re \cdot 2\right) \cdot \sqrt{\frac{1}{\log 10}}\right)\\
\end{array}double f(double re, double im) {
double r1057098 = re;
double r1057099 = r1057098 * r1057098;
double r1057100 = im;
double r1057101 = r1057100 * r1057100;
double r1057102 = r1057099 + r1057101;
double r1057103 = sqrt(r1057102);
double r1057104 = log(r1057103);
double r1057105 = 10.0;
double r1057106 = log(r1057105);
double r1057107 = r1057104 / r1057106;
return r1057107;
}
double f(double re, double im) {
double r1057108 = re;
double r1057109 = -4.60789516418958e+152;
bool r1057110 = r1057108 <= r1057109;
double r1057111 = 0.5;
double r1057112 = cbrt(r1057111);
double r1057113 = 10.0;
double r1057114 = log(r1057113);
double r1057115 = sqrt(r1057114);
double r1057116 = sqrt(r1057115);
double r1057117 = r1057112 / r1057116;
double r1057118 = -1.0;
double r1057119 = r1057118 / r1057108;
double r1057120 = log(r1057119);
double r1057121 = -2.0;
double r1057122 = r1057120 * r1057121;
double r1057123 = r1057122 / r1057115;
double r1057124 = r1057117 * r1057123;
double r1057125 = r1057112 * r1057112;
double r1057126 = r1057125 / r1057116;
double r1057127 = r1057124 * r1057126;
double r1057128 = 2.0183464746972817e+102;
bool r1057129 = r1057108 <= r1057128;
double r1057130 = im;
double r1057131 = r1057130 * r1057130;
double r1057132 = r1057108 * r1057108;
double r1057133 = r1057131 + r1057132;
double r1057134 = log(r1057133);
double r1057135 = r1057134 / r1057115;
double r1057136 = r1057135 * r1057117;
double r1057137 = r1057126 * r1057136;
double r1057138 = r1057111 / r1057115;
double r1057139 = log(r1057108);
double r1057140 = 2.0;
double r1057141 = r1057139 * r1057140;
double r1057142 = 1.0;
double r1057143 = r1057142 / r1057114;
double r1057144 = sqrt(r1057143);
double r1057145 = r1057141 * r1057144;
double r1057146 = r1057138 * r1057145;
double r1057147 = r1057129 ? r1057137 : r1057146;
double r1057148 = r1057110 ? r1057127 : r1057147;
return r1057148;
}



Bits error versus re



Bits error versus im
Results
if re < -4.60789516418958e+152Initial program 61.5
rmApplied add-sqr-sqrt61.5
Applied pow161.5
Applied sqrt-pow161.5
Applied log-pow61.5
Applied times-frac61.5
Simplified61.5
rmApplied add-sqr-sqrt61.5
Applied add-cube-cbrt61.5
Applied times-frac61.5
Applied associate-*l*61.5
Taylor expanded around -inf 7.1
Simplified7.1
if -4.60789516418958e+152 < re < 2.0183464746972817e+102Initial program 21.1
rmApplied add-sqr-sqrt21.1
Applied pow121.1
Applied sqrt-pow121.1
Applied log-pow21.1
Applied times-frac21.1
Simplified21.1
rmApplied add-sqr-sqrt21.6
Applied add-cube-cbrt21.1
Applied times-frac21.1
Applied associate-*l*21.0
if 2.0183464746972817e+102 < re Initial program 50.5
rmApplied add-sqr-sqrt50.5
Applied pow150.5
Applied sqrt-pow150.5
Applied log-pow50.5
Applied times-frac50.5
Simplified50.5
Taylor expanded around inf 9.3
Simplified9.3
Final simplification17.3
herbie shell --seed 2019129
(FPCore (re im)
:name "math.log10 on complex, real part"
(/ (log (sqrt (+ (* re re) (* im im)))) (log 10)))