Average Error: 0.8 → 0.8
Time: 8.6s
Precision: 64
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
\[\tan^{-1}_* \frac{im}{re} \cdot \frac{\sqrt{\frac{1}{\log 10}}}{\sqrt{\log 10}}\]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}
\tan^{-1}_* \frac{im}{re} \cdot \frac{\sqrt{\frac{1}{\log 10}}}{\sqrt{\log 10}}
double f(double re, double im) {
        double r35876 = im;
        double r35877 = re;
        double r35878 = atan2(r35876, r35877);
        double r35879 = 10.0;
        double r35880 = log(r35879);
        double r35881 = r35878 / r35880;
        return r35881;
}

double f(double re, double im) {
        double r35882 = im;
        double r35883 = re;
        double r35884 = atan2(r35882, r35883);
        double r35885 = 1.0;
        double r35886 = 10.0;
        double r35887 = log(r35886);
        double r35888 = r35885 / r35887;
        double r35889 = sqrt(r35888);
        double r35890 = sqrt(r35887);
        double r35891 = r35889 / r35890;
        double r35892 = r35884 * r35891;
        return r35892;
}

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 associate-*l/0.8

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

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

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

    \[\leadsto \color{blue}{\frac{\tan^{-1}_* \frac{im}{re}}{1} \cdot \frac{\sqrt{\frac{1}{\log 10}}}{\sqrt{\log 10}}}\]
  13. Simplified0.8

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

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

Reproduce

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