Average Error: 0.8 → 0.1
Time: 2.9s
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 r84824 = im;
        double r84825 = re;
        double r84826 = atan2(r84824, r84825);
        double r84827 = 10.0;
        double r84828 = log(r84827);
        double r84829 = r84826 / r84828;
        return r84829;
}

double f(double re, double im) {
        double r84830 = 1.0;
        double r84831 = 10.0;
        double r84832 = log(r84831);
        double r84833 = sqrt(r84832);
        double r84834 = r84830 / r84833;
        double r84835 = im;
        double r84836 = re;
        double r84837 = atan2(r84835, r84836);
        double r84838 = sqrt(r84834);
        double r84839 = r84837 * r84838;
        double r84840 = sqrt(r84838);
        double r84841 = r84839 * r84840;
        double r84842 = r84841 * r84840;
        double r84843 = r84834 * r84842;
        return r84843;
}

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 2020059 +o rules:numerics
(FPCore (re im)
  :name "math.log10 on complex, imaginary part"
  :precision binary64
  (/ (atan2 im re) (log 10)))