Average Error: 0.8 → 0.8
Time: 5.8s
Precision: 64
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
\[\frac{\tan^{-1}_* \frac{im}{re}}{\frac{\log 10}{1}}\]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}
\frac{\tan^{-1}_* \frac{im}{re}}{\frac{\log 10}{1}}
double f(double re, double im) {
        double r39784 = im;
        double r39785 = re;
        double r39786 = atan2(r39784, r39785);
        double r39787 = 10.0;
        double r39788 = log(r39787);
        double r39789 = r39786 / r39788;
        return r39789;
}

double f(double re, double im) {
        double r39790 = im;
        double r39791 = re;
        double r39792 = atan2(r39790, r39791);
        double r39793 = 10.0;
        double r39794 = log(r39793);
        double r39795 = 1.0;
        double r39796 = r39794 / r39795;
        double r39797 = r39792 / r39796;
        return r39797;
}

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. Using strategy rm
  7. Applied div-inv0.8

    \[\leadsto \frac{1}{\sqrt{\log 10}} \cdot \color{blue}{\left(\tan^{-1}_* \frac{im}{re} \cdot \frac{1}{\sqrt{\log 10}}\right)}\]
  8. Using strategy rm
  9. Applied add-sqr-sqrt0.8

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

    \[\leadsto \color{blue}{\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)}\]
  11. Simplified0.9

    \[\leadsto \sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \color{blue}{\left(\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}} \cdot \sqrt{\frac{1}{\sqrt{\log 10}}}\right)}\]
  12. Using strategy rm
  13. Applied add-sqr-sqrt0.9

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

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

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

    \[\leadsto \frac{\tan^{-1}_* \frac{im}{re}}{\frac{\log 10}{1}}\]

Reproduce

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