Average Error: 0 → 0
Time: 357.0ms
Precision: 64
\[\tan^{-1}_* \frac{im}{re}\]
\[\tan^{-1}_* \frac{im}{re}\]
\tan^{-1}_* \frac{im}{re}
\tan^{-1}_* \frac{im}{re}
double f(double re, double im) {
        double r38901 = im;
        double r38902 = re;
        double r38903 = atan2(r38901, r38902);
        return r38903;
}

double f(double re, double im) {
        double r38904 = im;
        double r38905 = re;
        double r38906 = atan2(r38904, r38905);
        return r38906;
}

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

    \[\tan^{-1}_* \frac{im}{re}\]
  2. Final simplification0

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

Reproduce

herbie shell --seed 2020056 +o rules:numerics
(FPCore (re im)
  :name "math.arg on complex"
  :precision binary64
  (atan2 im re))