\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\right)\right)double f(double re, double im) {
double r1577785 = im;
double r1577786 = re;
double r1577787 = atan2(r1577785, r1577786);
double r1577788 = 10.0;
double r1577789 = log(r1577788);
double r1577790 = r1577787 / r1577789;
return r1577790;
}
double f(double re, double im) {
double r1577791 = im;
double r1577792 = re;
double r1577793 = atan2(r1577791, r1577792);
double r1577794 = 10.0;
double r1577795 = log(r1577794);
double r1577796 = r1577793 / r1577795;
double r1577797 = expm1(r1577796);
double r1577798 = log1p(r1577797);
return r1577798;
}



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
rmApplied div-inv0.8
Applied associate-*r*0.8
rmApplied log1p-expm1-u0.7
Simplified0.7
Final simplification0.7
herbie shell --seed 2019163 +o rules:numerics
(FPCore (re im)
:name "math.log10 on complex, imaginary part"
(/ (atan2 im re) (log 10)))