Average Error: 0.8 → 0.8
Time: 16.8s
Precision: 64
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
\[\frac{1}{\sqrt{\log 10}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \frac{1}{\sqrt{\log 10}}\right)\]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}
\frac{1}{\sqrt{\log 10}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \frac{1}{\sqrt{\log 10}}\right)
double f(double re, double im) {
        double r1333582 = im;
        double r1333583 = re;
        double r1333584 = atan2(r1333582, r1333583);
        double r1333585 = 10.0;
        double r1333586 = log(r1333585);
        double r1333587 = r1333584 / r1333586;
        return r1333587;
}

double f(double re, double im) {
        double r1333588 = 1.0;
        double r1333589 = 10.0;
        double r1333590 = log(r1333589);
        double r1333591 = sqrt(r1333590);
        double r1333592 = r1333588 / r1333591;
        double r1333593 = im;
        double r1333594 = re;
        double r1333595 = atan2(r1333593, r1333594);
        double r1333596 = r1333595 * r1333592;
        double r1333597 = r1333592 * r1333596;
        return r1333597;
}

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. Applied associate-*r*0.8

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

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

Reproduce

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