Average Error: 0.8 → 0.8
Time: 2.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 r25170 = im;
        double r25171 = re;
        double r25172 = atan2(r25170, r25171);
        double r25173 = 10.0;
        double r25174 = log(r25173);
        double r25175 = r25172 / r25174;
        return r25175;
}

double f(double re, double im) {
        double r25176 = 1.0;
        double r25177 = 10.0;
        double r25178 = log(r25177);
        double r25179 = sqrt(r25178);
        double r25180 = r25176 / r25179;
        double r25181 = im;
        double r25182 = re;
        double r25183 = atan2(r25181, r25182);
        double r25184 = r25183 * r25180;
        double r25185 = r25180 * r25184;
        return r25185;
}

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