Average Error: 0.8 → 0.8
Time: 3.3s
Precision: 64
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
\[\left(\left(\frac{1}{\sqrt{\log 10}} \cdot \sqrt[3]{\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}}\right) \cdot \sqrt[3]{\mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)\right)}\]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}
\left(\left(\frac{1}{\sqrt{\log 10}} \cdot \sqrt[3]{\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}}\right) \cdot \sqrt[3]{\mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)\right)}
double f(double re, double im) {
        double r29492 = im;
        double r29493 = re;
        double r29494 = atan2(r29492, r29493);
        double r29495 = 10.0;
        double r29496 = log(r29495);
        double r29497 = r29494 / r29496;
        return r29497;
}

double f(double re, double im) {
        double r29498 = 1.0;
        double r29499 = 10.0;
        double r29500 = log(r29499);
        double r29501 = sqrt(r29500);
        double r29502 = r29498 / r29501;
        double r29503 = im;
        double r29504 = re;
        double r29505 = atan2(r29503, r29504);
        double r29506 = r29498 / r29500;
        double r29507 = sqrt(r29506);
        double r29508 = r29505 * r29507;
        double r29509 = cbrt(r29508);
        double r29510 = r29502 * r29509;
        double r29511 = r29510 * r29509;
        double r29512 = expm1(r29508);
        double r29513 = log1p(r29512);
        double r29514 = cbrt(r29513);
        double r29515 = r29511 * r29514;
        return r29515;
}

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.8

    \[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.8

    \[\leadsto \frac{\tan^{-1}_* \frac{im}{re}}{\color{blue}{\sqrt{\log 10} \cdot \sqrt{\log 10}}}\]
  4. Applied *-un-lft-identity0.8

    \[\leadsto \frac{\color{blue}{1 \cdot \tan^{-1}_* \frac{im}{re}}}{\sqrt{\log 10} \cdot \sqrt{\log 10}}\]
  5. Applied times-frac0.8

    \[\leadsto \color{blue}{\frac{1}{\sqrt{\log 10}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}}\]
  6. Taylor expanded around 0 0.8

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

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

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

    \[\leadsto \color{blue}{\left(\frac{1}{\sqrt{\log 10}} \cdot \left(\sqrt[3]{\mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)\right)} \cdot \sqrt[3]{\mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)\right)}\right)\right) \cdot \sqrt[3]{\mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)\right)}}\]
  12. Simplified0.8

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

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

Reproduce

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