\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log 10}\begin{array}{l}
\mathbf{if}\;im \le -7.993069603181868 \cdot 10^{+120}:\\
\;\;\;\;\left(\left(-2 \cdot \log \left(\frac{-1}{im}\right)\right) \cdot \frac{\sqrt{\frac{1}{2}}}{\sqrt{\log 10}}\right) \cdot \frac{\sqrt{\frac{1}{2}}}{\sqrt{\log 10}}\\
\mathbf{elif}\;im \le 3.263648024588438 \cdot 10^{+109}:\\
\;\;\;\;\left(\log \left(re \cdot re + im \cdot im\right) \cdot \frac{\sqrt[3]{\frac{1}{2}}}{\sqrt[3]{\log 10}}\right) \cdot \left(\frac{\sqrt[3]{\frac{1}{2}}}{\sqrt[3]{\log 10}} \cdot \frac{\sqrt[3]{\frac{1}{2}}}{\sqrt[3]{\log 10}}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \log im\right) \cdot \frac{\sqrt[3]{\frac{1}{2}}}{\sqrt[3]{\log 10}}\right) \cdot \left(\frac{\sqrt[3]{\frac{1}{2}}}{\sqrt[3]{\log 10}} \cdot \frac{\sqrt[3]{\frac{1}{2}}}{\sqrt[3]{\log 10}}\right)\\
\end{array}double f(double re, double im) {
double r2727474 = re;
double r2727475 = r2727474 * r2727474;
double r2727476 = im;
double r2727477 = r2727476 * r2727476;
double r2727478 = r2727475 + r2727477;
double r2727479 = sqrt(r2727478);
double r2727480 = log(r2727479);
double r2727481 = 10.0;
double r2727482 = log(r2727481);
double r2727483 = r2727480 / r2727482;
return r2727483;
}
double f(double re, double im) {
double r2727484 = im;
double r2727485 = -7.993069603181868e+120;
bool r2727486 = r2727484 <= r2727485;
double r2727487 = -2.0;
double r2727488 = -1.0;
double r2727489 = r2727488 / r2727484;
double r2727490 = log(r2727489);
double r2727491 = r2727487 * r2727490;
double r2727492 = 0.5;
double r2727493 = sqrt(r2727492);
double r2727494 = 10.0;
double r2727495 = log(r2727494);
double r2727496 = sqrt(r2727495);
double r2727497 = r2727493 / r2727496;
double r2727498 = r2727491 * r2727497;
double r2727499 = r2727498 * r2727497;
double r2727500 = 3.263648024588438e+109;
bool r2727501 = r2727484 <= r2727500;
double r2727502 = re;
double r2727503 = r2727502 * r2727502;
double r2727504 = r2727484 * r2727484;
double r2727505 = r2727503 + r2727504;
double r2727506 = log(r2727505);
double r2727507 = cbrt(r2727492);
double r2727508 = cbrt(r2727495);
double r2727509 = r2727507 / r2727508;
double r2727510 = r2727506 * r2727509;
double r2727511 = r2727509 * r2727509;
double r2727512 = r2727510 * r2727511;
double r2727513 = 2.0;
double r2727514 = log(r2727484);
double r2727515 = r2727513 * r2727514;
double r2727516 = r2727515 * r2727509;
double r2727517 = r2727516 * r2727511;
double r2727518 = r2727501 ? r2727512 : r2727517;
double r2727519 = r2727486 ? r2727499 : r2727518;
return r2727519;
}



Bits error versus re



Bits error versus im
Results
if im < -7.993069603181868e+120Initial program 54.1
rmApplied pow1/254.1
Applied log-pow54.1
Applied associate-/l*54.1
rmApplied *-un-lft-identity54.1
Applied add-sqr-sqrt54.1
Applied times-frac54.1
Applied add-sqr-sqrt54.0
Applied times-frac54.0
Simplified54.0
Simplified54.0
Taylor expanded around -inf 7.1
Simplified7.1
if -7.993069603181868e+120 < im < 3.263648024588438e+109Initial program 21.2
rmApplied pow1/221.2
Applied log-pow21.2
Applied associate-/l*21.2
rmApplied pow121.2
Applied log-pow21.2
Applied add-cube-cbrt21.7
Applied times-frac21.7
Applied add-cube-cbrt21.1
Applied times-frac21.1
Simplified21.1
Simplified21.0
if 3.263648024588438e+109 < im Initial program 51.7
rmApplied pow1/251.7
Applied log-pow51.7
Applied associate-/l*51.7
rmApplied pow151.7
Applied log-pow51.7
Applied add-cube-cbrt51.8
Applied times-frac51.8
Applied add-cube-cbrt51.7
Applied times-frac51.7
Simplified51.7
Simplified51.6
Taylor expanded around inf 8.8
Simplified8.8
Final simplification17.1
herbie shell --seed 2019125
(FPCore (re im)
:name "math.log10 on complex, real part"
(/ (log (sqrt (+ (* re re) (* im im)))) (log 10)))