Average Error: 0.9 → 0.1
Time: 12.3s
Precision: 64
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
\[\mathsf{log1p}\left(\mathsf{expm1}\left(\left(\left(\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}\right) \cdot \sqrt{\frac{1}{\sqrt[3]{\sqrt{\log 10}}}}\right) \cdot \sqrt{\frac{1}{\sqrt[3]{\sqrt{\log 10}} \cdot \sqrt[3]{\sqrt{\log 10}}}}\right)\right)\]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}
\mathsf{log1p}\left(\mathsf{expm1}\left(\left(\left(\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}\right) \cdot \sqrt{\frac{1}{\sqrt[3]{\sqrt{\log 10}}}}\right) \cdot \sqrt{\frac{1}{\sqrt[3]{\sqrt{\log 10}} \cdot \sqrt[3]{\sqrt{\log 10}}}}\right)\right)
double f(double re, double im) {
        double r22950 = im;
        double r22951 = re;
        double r22952 = atan2(r22950, r22951);
        double r22953 = 10.0;
        double r22954 = log(r22953);
        double r22955 = r22952 / r22954;
        return r22955;
}

double f(double re, double im) {
        double r22956 = 1.0;
        double r22957 = 10.0;
        double r22958 = log(r22957);
        double r22959 = sqrt(r22958);
        double r22960 = r22956 / r22959;
        double r22961 = sqrt(r22960);
        double r22962 = im;
        double r22963 = re;
        double r22964 = atan2(r22962, r22963);
        double r22965 = r22964 / r22959;
        double r22966 = r22961 * r22965;
        double r22967 = cbrt(r22959);
        double r22968 = r22956 / r22967;
        double r22969 = sqrt(r22968);
        double r22970 = r22966 * r22969;
        double r22971 = r22967 * r22967;
        double r22972 = r22956 / r22971;
        double r22973 = sqrt(r22972);
        double r22974 = r22970 * r22973;
        double r22975 = expm1(r22974);
        double r22976 = log1p(r22975);
        return r22976;
}

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 add-sqr-sqrt0.7

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

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

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

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

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

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

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

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

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

Reproduce

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