Average Error: 0.0 → 0.0
Time: 9.7s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[\tan^{-1} \left(\sqrt{\frac{1 - x}{\left(x \cdot x\right) \cdot x + \left(1 \cdot 1\right) \cdot 1} \cdot \left(1 \cdot 1 + \left(x \cdot x - x \cdot 1\right)\right)}\right) \cdot 2\]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
\tan^{-1} \left(\sqrt{\frac{1 - x}{\left(x \cdot x\right) \cdot x + \left(1 \cdot 1\right) \cdot 1} \cdot \left(1 \cdot 1 + \left(x \cdot x - x \cdot 1\right)\right)}\right) \cdot 2
double f(double x) {
        double r573790 = 2.0;
        double r573791 = 1.0;
        double r573792 = x;
        double r573793 = r573791 - r573792;
        double r573794 = r573791 + r573792;
        double r573795 = r573793 / r573794;
        double r573796 = sqrt(r573795);
        double r573797 = atan(r573796);
        double r573798 = r573790 * r573797;
        return r573798;
}

double f(double x) {
        double r573799 = 1.0;
        double r573800 = x;
        double r573801 = r573799 - r573800;
        double r573802 = r573800 * r573800;
        double r573803 = r573802 * r573800;
        double r573804 = r573799 * r573799;
        double r573805 = r573804 * r573799;
        double r573806 = r573803 + r573805;
        double r573807 = r573801 / r573806;
        double r573808 = r573800 * r573799;
        double r573809 = r573802 - r573808;
        double r573810 = r573804 + r573809;
        double r573811 = r573807 * r573810;
        double r573812 = sqrt(r573811);
        double r573813 = atan(r573812);
        double r573814 = 2.0;
        double r573815 = r573813 * r573814;
        return r573815;
}

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. Simplified0.0

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

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

Reproduce

herbie shell --seed 2019170 
(FPCore (x)
  :name "arccos"
  (* 2.0 (atan (sqrt (/ (- 1.0 x) (+ 1.0 x))))))