\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}}{\sqrt{\log 10}}\right)\right)double f(double re, double im) {
double r38091 = im;
double r38092 = re;
double r38093 = atan2(r38091, r38092);
double r38094 = 10.0;
double r38095 = log(r38094);
double r38096 = r38093 / r38095;
return r38096;
}
double f(double re, double im) {
double r38097 = im;
double r38098 = re;
double r38099 = atan2(r38097, r38098);
double r38100 = 1.0;
double r38101 = 10.0;
double r38102 = log(r38101);
double r38103 = r38100 / r38102;
double r38104 = sqrt(r38103);
double r38105 = r38099 * r38104;
double r38106 = sqrt(r38102);
double r38107 = r38105 / r38106;
double r38108 = expm1(r38107);
double r38109 = log1p(r38108);
return r38109;
}



Bits error versus re



Bits error versus im
Results
Initial program 0.8
rmApplied add-sqr-sqrt0.8
Applied *-un-lft-identity0.8
Applied times-frac0.8
Taylor expanded around 0 0.8
rmApplied log1p-expm1-u0.8
rmApplied log1p-expm1-u0.7
Simplified0.7
Final simplification0.7
herbie shell --seed 2020043 +o rules:numerics
(FPCore (re im)
:name "math.log10 on complex, imaginary part"
:precision binary64
(/ (atan2 im re) (log 10)))