\frac{\log \left(\sqrt{re \cdot re + im \cdot im}\right)}{\log 10}\begin{array}{l}
\mathbf{if}\;im \le -2.957483221806522487658889360988388662853 \cdot 10^{136}:\\
\;\;\;\;\left(\sqrt{\frac{1}{\log 10}} \cdot \log re\right) \cdot \frac{1}{\sqrt{\log 10}}\\
\mathbf{elif}\;im \le -6.570997735276894967118260067026371622396 \cdot 10^{56}:\\
\;\;\;\;\sqrt{\frac{1}{2}} \cdot \frac{\sqrt{\frac{1}{2}}}{\frac{\log 10}{\log \left(re \cdot re + im \cdot im\right)}}\\
\mathbf{elif}\;im \le -3054555687171828544312670244831232:\\
\;\;\;\;\frac{-1}{\sqrt{\log 10}} \cdot \left(\log \left(\frac{-1}{re}\right) \cdot \sqrt{\frac{1}{\log 10}}\right)\\
\mathbf{elif}\;im \le -4.502640815266489300055229512512104070594 \cdot 10^{-262}:\\
\;\;\;\;\frac{\sqrt[3]{\frac{1}{2}} \cdot \sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt{\log 10}}} \cdot \left(\frac{\sqrt[3]{\frac{1}{2}}}{\sqrt{\sqrt{\log 10}}} \cdot \frac{\log \left(re \cdot re + im \cdot im\right)}{\sqrt{\log 10}}\right)\\
\mathbf{elif}\;im \le 9.677784630305516420633165389576243090092 \cdot 10^{-234}:\\
\;\;\;\;\left(\sqrt{\frac{1}{\log 10}} \cdot \log re\right) \cdot \frac{1}{\sqrt{\log 10}}\\
\mathbf{elif}\;im \le 3.867993196915089402122192166122080152846 \cdot 10^{-217}:\\
\;\;\;\;\frac{\frac{1}{2}}{\sqrt{\log 10}} \cdot \frac{-2 \cdot \log \left(\frac{-1}{re}\right)}{\sqrt{\log 10}}\\
\mathbf{elif}\;im \le 7.528125355310409892408520759625382180397 \cdot 10^{-199}:\\
\;\;\;\;\frac{\log re}{\log 10}\\
\mathbf{elif}\;im \le 9.430941523167469074988219755431966183767 \cdot 10^{-169}:\\
\;\;\;\;\log \left({\left(\frac{-1}{re}\right)}^{\left(-\sqrt{\frac{1}{\log 10}}\right)}\right) \cdot \frac{1}{\sqrt{\log 10}}\\
\mathbf{elif}\;im \le 1.427553098473186275408804109016984211917 \cdot 10^{86}:\\
\;\;\;\;\log \left({\left(re \cdot re + im \cdot im\right)}^{\left(\frac{\frac{1}{2}}{\sqrt{\log 10}}\right)}\right) \cdot \frac{1}{\sqrt{\log 10}}\\
\mathbf{else}:\\
\;\;\;\;\log \left({im}^{\left(\sqrt{\frac{1}{\log 10}}\right)}\right) \cdot \frac{1}{\sqrt{\log 10}}\\
\end{array}double f(double re, double im) {
double r41926 = re;
double r41927 = r41926 * r41926;
double r41928 = im;
double r41929 = r41928 * r41928;
double r41930 = r41927 + r41929;
double r41931 = sqrt(r41930);
double r41932 = log(r41931);
double r41933 = 10.0;
double r41934 = log(r41933);
double r41935 = r41932 / r41934;
return r41935;
}
double f(double re, double im) {
double r41936 = im;
double r41937 = -2.9574832218065225e+136;
bool r41938 = r41936 <= r41937;
double r41939 = 1.0;
double r41940 = 10.0;
double r41941 = log(r41940);
double r41942 = r41939 / r41941;
double r41943 = sqrt(r41942);
double r41944 = re;
double r41945 = log(r41944);
double r41946 = r41943 * r41945;
double r41947 = sqrt(r41941);
double r41948 = r41939 / r41947;
double r41949 = r41946 * r41948;
double r41950 = -6.570997735276895e+56;
bool r41951 = r41936 <= r41950;
double r41952 = 0.5;
double r41953 = sqrt(r41952);
double r41954 = r41944 * r41944;
double r41955 = r41936 * r41936;
double r41956 = r41954 + r41955;
double r41957 = log(r41956);
double r41958 = r41941 / r41957;
double r41959 = r41953 / r41958;
double r41960 = r41953 * r41959;
double r41961 = -3.0545556871718285e+33;
bool r41962 = r41936 <= r41961;
double r41963 = -1.0;
double r41964 = r41963 / r41947;
double r41965 = r41963 / r41944;
double r41966 = log(r41965);
double r41967 = r41966 * r41943;
double r41968 = r41964 * r41967;
double r41969 = -4.5026408152664893e-262;
bool r41970 = r41936 <= r41969;
double r41971 = cbrt(r41952);
double r41972 = r41971 * r41971;
double r41973 = sqrt(r41947);
double r41974 = r41972 / r41973;
double r41975 = r41971 / r41973;
double r41976 = r41957 / r41947;
double r41977 = r41975 * r41976;
double r41978 = r41974 * r41977;
double r41979 = 9.677784630305516e-234;
bool r41980 = r41936 <= r41979;
double r41981 = 3.867993196915089e-217;
bool r41982 = r41936 <= r41981;
double r41983 = r41952 / r41947;
double r41984 = -2.0;
double r41985 = r41984 * r41966;
double r41986 = r41985 / r41947;
double r41987 = r41983 * r41986;
double r41988 = 7.52812535531041e-199;
bool r41989 = r41936 <= r41988;
double r41990 = r41945 / r41941;
double r41991 = 9.430941523167469e-169;
bool r41992 = r41936 <= r41991;
double r41993 = -r41943;
double r41994 = pow(r41965, r41993);
double r41995 = log(r41994);
double r41996 = r41995 * r41948;
double r41997 = 1.4275530984731863e+86;
bool r41998 = r41936 <= r41997;
double r41999 = pow(r41956, r41983);
double r42000 = log(r41999);
double r42001 = r42000 * r41948;
double r42002 = pow(r41936, r41943);
double r42003 = log(r42002);
double r42004 = r42003 * r41948;
double r42005 = r41998 ? r42001 : r42004;
double r42006 = r41992 ? r41996 : r42005;
double r42007 = r41989 ? r41990 : r42006;
double r42008 = r41982 ? r41987 : r42007;
double r42009 = r41980 ? r41949 : r42008;
double r42010 = r41970 ? r41978 : r42009;
double r42011 = r41962 ? r41968 : r42010;
double r42012 = r41951 ? r41960 : r42011;
double r42013 = r41938 ? r41949 : r42012;
return r42013;
}



Bits error versus re



Bits error versus im
Results
if im < -2.9574832218065225e+136 or -4.5026408152664893e-262 < im < 9.677784630305516e-234Initial program 48.3
rmApplied add-sqr-sqrt48.3
Applied pow1/248.3
Applied log-pow48.3
Applied times-frac48.3
rmApplied div-inv48.3
Applied associate-*r*48.3
rmApplied add-log-exp48.3
Simplified48.2
Taylor expanded around inf 46.8
Simplified46.8
if -2.9574832218065225e+136 < im < -6.570997735276895e+56Initial program 13.3
rmApplied add-sqr-sqrt13.3
Applied pow1/213.3
Applied log-pow13.3
Applied times-frac13.2
rmApplied *-un-lft-identity13.2
Applied add-sqr-sqrt13.3
Applied times-frac13.2
Applied associate-*l*13.1
Simplified13.1
if -6.570997735276895e+56 < im < -3.0545556871718285e+33Initial program 24.8
rmApplied add-sqr-sqrt24.8
Applied pow1/224.8
Applied log-pow24.8
Applied times-frac24.8
rmApplied div-inv24.7
Applied associate-*r*24.7
rmApplied add-log-exp24.7
Simplified24.6
Taylor expanded around -inf 44.1
Simplified44.1
if -3.0545556871718285e+33 < im < -4.5026408152664893e-262Initial program 21.3
rmApplied add-sqr-sqrt21.3
Applied pow1/221.3
Applied log-pow21.3
Applied times-frac21.3
rmApplied add-sqr-sqrt21.3
Applied sqrt-prod21.8
Applied add-cube-cbrt21.3
Applied times-frac21.3
Applied associate-*l*21.2
if 9.677784630305516e-234 < im < 3.867993196915089e-217Initial program 30.2
rmApplied add-sqr-sqrt30.2
Applied pow1/230.2
Applied log-pow30.2
Applied times-frac30.1
Taylor expanded around -inf 33.4
Simplified33.4
if 3.867993196915089e-217 < im < 7.52812535531041e-199Initial program 34.6
Taylor expanded around inf 33.0
if 7.52812535531041e-199 < im < 9.430941523167469e-169Initial program 34.2
rmApplied add-sqr-sqrt34.2
Applied pow1/234.2
Applied log-pow34.2
Applied times-frac34.2
rmApplied div-inv34.1
Applied associate-*r*34.1
rmApplied add-log-exp34.1
Simplified34.1
Taylor expanded around -inf 38.3
Simplified38.3
if 9.430941523167469e-169 < im < 1.4275530984731863e+86Initial program 16.6
rmApplied add-sqr-sqrt16.6
Applied pow1/216.6
Applied log-pow16.6
Applied times-frac16.5
rmApplied div-inv16.4
Applied associate-*r*16.4
rmApplied add-log-exp16.4
Simplified16.4
if 1.4275530984731863e+86 < im Initial program 48.3
rmApplied add-sqr-sqrt48.3
Applied pow1/248.3
Applied log-pow48.3
Applied times-frac48.3
rmApplied div-inv48.3
Applied associate-*r*48.3
rmApplied add-log-exp48.3
Simplified48.2
Taylor expanded around 0 9.8
Simplified9.7
Final simplification24.9
herbie shell --seed 2019326
(FPCore (re im)
:name "math.log10 on complex, real part"
:precision binary64
(/ (log (sqrt (+ (* re re) (* im im)))) (log 10)))