Average Error: 0.9 → 0.7
Time: 18.0s
Precision: 64
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
\[\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1}{\sqrt{\log 10}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \frac{1}{\sqrt{\log 10}}\right)\right)\right)\]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}
\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1}{\sqrt{\log 10}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \frac{1}{\sqrt{\log 10}}\right)\right)\right)
double f(double re, double im) {
        double r1329159 = im;
        double r1329160 = re;
        double r1329161 = atan2(r1329159, r1329160);
        double r1329162 = 10.0;
        double r1329163 = log(r1329162);
        double r1329164 = r1329161 / r1329163;
        return r1329164;
}

double f(double re, double im) {
        double r1329165 = 1.0;
        double r1329166 = 10.0;
        double r1329167 = log(r1329166);
        double r1329168 = sqrt(r1329167);
        double r1329169 = r1329165 / r1329168;
        double r1329170 = im;
        double r1329171 = re;
        double r1329172 = atan2(r1329170, r1329171);
        double r1329173 = r1329172 * r1329169;
        double r1329174 = r1329169 * r1329173;
        double r1329175 = expm1(r1329174);
        double r1329176 = log1p(r1329175);
        return r1329176;
}

Error

Bits error versus re

Bits error versus im

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.9

    \[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
  2. Using strategy rm
  3. Applied log1p-expm1-u0.7

    \[\leadsto \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\right)\right)}\]
  4. Using strategy rm
  5. Applied add-sqr-sqrt0.7

    \[\leadsto \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\tan^{-1}_* \frac{im}{re}}{\color{blue}{\sqrt{\log 10} \cdot \sqrt{\log 10}}}\right)\right)\]
  6. Applied *-un-lft-identity0.7

    \[\leadsto \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{\color{blue}{1 \cdot \tan^{-1}_* \frac{im}{re}}}{\sqrt{\log 10} \cdot \sqrt{\log 10}}\right)\right)\]
  7. Applied times-frac0.7

    \[\leadsto \mathsf{log1p}\left(\mathsf{expm1}\left(\color{blue}{\frac{1}{\sqrt{\log 10}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}}\right)\right)\]
  8. Using strategy rm
  9. Applied div-inv0.7

    \[\leadsto \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1}{\sqrt{\log 10}} \cdot \color{blue}{\left(\tan^{-1}_* \frac{im}{re} \cdot \frac{1}{\sqrt{\log 10}}\right)}\right)\right)\]
  10. Applied associate-*r*0.7

    \[\leadsto \mathsf{log1p}\left(\mathsf{expm1}\left(\color{blue}{\left(\frac{1}{\sqrt{\log 10}} \cdot \tan^{-1}_* \frac{im}{re}\right) \cdot \frac{1}{\sqrt{\log 10}}}\right)\right)\]
  11. Final simplification0.7

    \[\leadsto \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1}{\sqrt{\log 10}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \frac{1}{\sqrt{\log 10}}\right)\right)\right)\]

Reproduce

herbie shell --seed 2019158 +o rules:numerics
(FPCore (re im)
  :name "math.log10 on complex, imaginary part"
  (/ (atan2 im re) (log 10)))