\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log 10}\log \left(\sqrt[3]{{\left(\mathsf{hypot}\left(re, im\right)\right)}^{\left(\frac{1}{\sqrt{\log 10}}\right)}}\right) \cdot \frac{2}{\sqrt{\log 10}} + \frac{1}{\sqrt{\log 10}} \cdot \log \left(\sqrt[3]{{\left(\mathsf{hypot}\left(re, im\right)\right)}^{\left(\frac{1}{\sqrt{\log 10}}\right)}}\right)double f(double re, double im) {
double r83667 = re;
double r83668 = r83667 * r83667;
double r83669 = im;
double r83670 = r83669 * r83669;
double r83671 = r83668 + r83670;
double r83672 = sqrt(r83671);
double r83673 = log(r83672);
double r83674 = 10.0;
double r83675 = log(r83674);
double r83676 = r83673 / r83675;
return r83676;
}
double f(double re, double im) {
double r83677 = re;
double r83678 = im;
double r83679 = hypot(r83677, r83678);
double r83680 = 1.0;
double r83681 = 10.0;
double r83682 = log(r83681);
double r83683 = sqrt(r83682);
double r83684 = r83680 / r83683;
double r83685 = pow(r83679, r83684);
double r83686 = cbrt(r83685);
double r83687 = log(r83686);
double r83688 = 2.0;
double r83689 = r83688 / r83683;
double r83690 = r83687 * r83689;
double r83691 = r83684 * r83687;
double r83692 = r83690 + r83691;
return r83692;
}



Bits error versus re



Bits error versus im
Results
Initial program 32.1
rmApplied hypot-def0.6
rmApplied add-sqr-sqrt0.6
Applied pow10.6
Applied log-pow0.6
Applied times-frac0.6
rmApplied add-log-exp0.6
Simplified0.3
rmApplied add-cube-cbrt0.3
Applied log-prod0.4
Applied distribute-lft-in0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2019353 +o rules:numerics
(FPCore (re im)
:name "math.log10 on complex, real part"
:precision binary64
(/ (log (sqrt (+ (* re re) (* im im)))) (log 10)))