Average Error: 0 → 0
Time: 800.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 r34658 = im;
        double r34659 = re;
        double r34660 = atan2(r34658, r34659);
        return r34660;
}

double f(double re, double im) {
        double r34661 = im;
        double r34662 = re;
        double r34663 = atan2(r34661, r34662);
        return r34663;
}

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 2019198 +o rules:numerics
(FPCore (re im)
  :name "math.arg on complex"
  (atan2 im re))