Average Error: 0.8 → 1.0
Time: 11.0s
Precision: 64
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
\[\frac{1}{\frac{\log 10}{\tan^{-1}_* \frac{im}{re}}}\]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}
\frac{1}{\frac{\log 10}{\tan^{-1}_* \frac{im}{re}}}
double f(double re, double im) {
        double r36504 = im;
        double r36505 = re;
        double r36506 = atan2(r36504, r36505);
        double r36507 = 10.0;
        double r36508 = log(r36507);
        double r36509 = r36506 / r36508;
        return r36509;
}

double f(double re, double im) {
        double r36510 = 1.0;
        double r36511 = 10.0;
        double r36512 = log(r36511);
        double r36513 = im;
        double r36514 = re;
        double r36515 = atan2(r36513, r36514);
        double r36516 = r36512 / r36515;
        double r36517 = r36510 / r36516;
        return r36517;
}

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 simplification1.0

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

Reproduce

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