Average Error: 0.0 → 0.0
Time: 3.7s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{{1}^{3} + {x}^{3}} \cdot \left(1 \cdot 1 + \left(x \cdot x - 1 \cdot x\right)\right)}\right)\]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{{1}^{3} + {x}^{3}} \cdot \left(1 \cdot 1 + \left(x \cdot x - 1 \cdot x\right)\right)}\right)
double f(double x) {
        double r16735 = 2.0;
        double r16736 = 1.0;
        double r16737 = x;
        double r16738 = r16736 - r16737;
        double r16739 = r16736 + r16737;
        double r16740 = r16738 / r16739;
        double r16741 = sqrt(r16740);
        double r16742 = atan(r16741);
        double r16743 = r16735 * r16742;
        return r16743;
}

double f(double x) {
        double r16744 = 2.0;
        double r16745 = 1.0;
        double r16746 = x;
        double r16747 = r16745 - r16746;
        double r16748 = 3.0;
        double r16749 = pow(r16745, r16748);
        double r16750 = pow(r16746, r16748);
        double r16751 = r16749 + r16750;
        double r16752 = r16747 / r16751;
        double r16753 = r16745 * r16745;
        double r16754 = r16746 * r16746;
        double r16755 = r16745 * r16746;
        double r16756 = r16754 - r16755;
        double r16757 = r16753 + r16756;
        double r16758 = r16752 * r16757;
        double r16759 = sqrt(r16758);
        double r16760 = atan(r16759);
        double r16761 = r16744 * r16760;
        return r16761;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
  2. Using strategy rm
  3. Applied flip3-+0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{\color{blue}{\frac{{1}^{3} + {x}^{3}}{1 \cdot 1 + \left(x \cdot x - 1 \cdot x\right)}}}}\right)\]
  4. Applied associate-/r/0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\color{blue}{\frac{1 - x}{{1}^{3} + {x}^{3}} \cdot \left(1 \cdot 1 + \left(x \cdot x - 1 \cdot x\right)\right)}}\right)\]
  5. Final simplification0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{{1}^{3} + {x}^{3}} \cdot \left(1 \cdot 1 + \left(x \cdot x - 1 \cdot x\right)\right)}\right)\]

Reproduce

herbie shell --seed 2019322 
(FPCore (x)
  :name "arccos"
  :precision binary64
  (* 2 (atan (sqrt (/ (- 1 x) (+ 1 x))))))