Average Error: 0.9 → 0.8
Time: 12.7s
Precision: 64
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
\[\frac{\sqrt{\frac{1}{\log 10}}}{\sqrt{\log 10}} \cdot \tan^{-1}_* \frac{im}{re}\]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}
\frac{\sqrt{\frac{1}{\log 10}}}{\sqrt{\log 10}} \cdot \tan^{-1}_* \frac{im}{re}
double f(double re, double im) {
        double r27525 = im;
        double r27526 = re;
        double r27527 = atan2(r27525, r27526);
        double r27528 = 10.0;
        double r27529 = log(r27528);
        double r27530 = r27527 / r27529;
        return r27530;
}

double f(double re, double im) {
        double r27531 = 1.0;
        double r27532 = 10.0;
        double r27533 = log(r27532);
        double r27534 = r27531 / r27533;
        double r27535 = sqrt(r27534);
        double r27536 = sqrt(r27533);
        double r27537 = r27535 / r27536;
        double r27538 = im;
        double r27539 = re;
        double r27540 = atan2(r27538, r27539);
        double r27541 = r27537 * r27540;
        return r27541;
}

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.9

    \[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.9

    \[\leadsto \frac{\tan^{-1}_* \frac{im}{re}}{\color{blue}{\sqrt{\log 10} \cdot \sqrt{\log 10}}}\]
  4. Applied *-un-lft-identity0.9

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

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

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

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

Reproduce

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