\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 r36097 = re;
double r36098 = r36097 * r36097;
double r36099 = im;
double r36100 = r36099 * r36099;
double r36101 = r36098 + r36100;
double r36102 = sqrt(r36101);
double r36103 = log(r36102);
double r36104 = 10.0;
double r36105 = log(r36104);
double r36106 = r36103 / r36105;
return r36106;
}
double f(double re, double im) {
double r36107 = re;
double r36108 = im;
double r36109 = hypot(r36107, r36108);
double r36110 = 1.0;
double r36111 = 10.0;
double r36112 = log(r36111);
double r36113 = sqrt(r36112);
double r36114 = r36110 / r36113;
double r36115 = pow(r36109, r36114);
double r36116 = cbrt(r36115);
double r36117 = log(r36116);
double r36118 = 2.0;
double r36119 = r36118 / r36113;
double r36120 = r36117 * r36119;
double r36121 = r36114 * r36117;
double r36122 = r36120 + r36121;
return r36122;
}



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)))