Average Error: 0.8 → 0.1
Time: 10.7s
Precision: 64
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
\[\frac{1}{\sqrt{\log 10}} \cdot \left(\left(\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\sqrt{\log 10}}}\right) \cdot \sqrt{\sqrt{\frac{1}{\sqrt{\log 10}}}}\right) \cdot \sqrt{\sqrt{\frac{1}{\sqrt{\log 10}}}}\right)\]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}
\frac{1}{\sqrt{\log 10}} \cdot \left(\left(\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\sqrt{\log 10}}}\right) \cdot \sqrt{\sqrt{\frac{1}{\sqrt{\log 10}}}}\right) \cdot \sqrt{\sqrt{\frac{1}{\sqrt{\log 10}}}}\right)
double f(double re, double im) {
        double r37610 = im;
        double r37611 = re;
        double r37612 = atan2(r37610, r37611);
        double r37613 = 10.0;
        double r37614 = log(r37613);
        double r37615 = r37612 / r37614;
        return r37615;
}

double f(double re, double im) {
        double r37616 = 1.0;
        double r37617 = 10.0;
        double r37618 = log(r37617);
        double r37619 = sqrt(r37618);
        double r37620 = r37616 / r37619;
        double r37621 = im;
        double r37622 = re;
        double r37623 = atan2(r37621, r37622);
        double r37624 = sqrt(r37620);
        double r37625 = r37623 * r37624;
        double r37626 = sqrt(r37624);
        double r37627 = r37625 * r37626;
        double r37628 = r37627 * r37626;
        double r37629 = r37620 * r37628;
        return r37629;
}

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 \frac{1}{\sqrt{\log 10}} \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \color{blue}{\left(\sqrt{\frac{1}{\sqrt{\log 10}}} \cdot \sqrt{\frac{1}{\sqrt{\log 10}}}\right)}\right)\]
  10. Applied associate-*r*0.8

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

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

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

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

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

Reproduce

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