Average Error: 0.9 → 0.7
Time: 13.7s
Precision: 64
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
\[\mathsf{log1p}\left(\mathsf{expm1}\left(\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \frac{1}{\sqrt{\log 10}}\right)\right)\right)\right)\]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}
\mathsf{log1p}\left(\mathsf{expm1}\left(\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \frac{1}{\sqrt{\log 10}}\right)\right)\right)\right)
double f(double re, double im) {
        double r572419 = im;
        double r572420 = re;
        double r572421 = atan2(r572419, r572420);
        double r572422 = 10.0;
        double r572423 = log(r572422);
        double r572424 = r572421 / r572423;
        return r572424;
}

double f(double re, double im) {
        double r572425 = 1.0;
        double r572426 = 10.0;
        double r572427 = log(r572426);
        double r572428 = sqrt(r572427);
        double r572429 = r572425 / r572428;
        double r572430 = sqrt(r572429);
        double r572431 = im;
        double r572432 = re;
        double r572433 = atan2(r572431, r572432);
        double r572434 = r572433 * r572429;
        double r572435 = r572430 * r572434;
        double r572436 = r572430 * r572435;
        double r572437 = expm1(r572436);
        double r572438 = log1p(r572437);
        return r572438;
}

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. Using strategy rm
  12. Applied add-sqr-sqrt0.7

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

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

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

Reproduce

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