Average Error: 0.9 → 0.8
Time: 14.5s
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 r577305 = im;
        double r577306 = re;
        double r577307 = atan2(r577305, r577306);
        double r577308 = 10.0;
        double r577309 = log(r577308);
        double r577310 = r577307 / r577309;
        return r577310;
}

double f(double re, double im) {
        double r577311 = 1.0;
        double r577312 = 10.0;
        double r577313 = log(r577312);
        double r577314 = sqrt(r577313);
        double r577315 = r577311 / r577314;
        double r577316 = im;
        double r577317 = re;
        double r577318 = atan2(r577316, r577317);
        double r577319 = r577318 * r577315;
        double r577320 = r577315 * r577319;
        return r577320;
}

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. 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. 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 2019153 
(FPCore (re im)
  :name "math.log10 on complex, imaginary part"
  (/ (atan2 im re) (log 10)))