Average Error: 0.0 → 0.0
Time: 13.3s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[2 \cdot \tan^{-1} \left(\sqrt{\left(1 + \left(x \cdot x - x\right)\right) \cdot \frac{1 - x}{1 + \left(x \cdot x\right) \cdot x}}\right)\]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
2 \cdot \tan^{-1} \left(\sqrt{\left(1 + \left(x \cdot x - x\right)\right) \cdot \frac{1 - x}{1 + \left(x \cdot x\right) \cdot x}}\right)
double f(double x) {
        double r296010 = 2.0;
        double r296011 = 1.0;
        double r296012 = x;
        double r296013 = r296011 - r296012;
        double r296014 = r296011 + r296012;
        double r296015 = r296013 / r296014;
        double r296016 = sqrt(r296015);
        double r296017 = atan(r296016);
        double r296018 = r296010 * r296017;
        return r296018;
}

double f(double x) {
        double r296019 = 2.0;
        double r296020 = 1.0;
        double r296021 = x;
        double r296022 = r296021 * r296021;
        double r296023 = r296022 - r296021;
        double r296024 = r296020 + r296023;
        double r296025 = r296020 - r296021;
        double r296026 = r296022 * r296021;
        double r296027 = r296020 + r296026;
        double r296028 = r296025 / r296027;
        double r296029 = r296024 * r296028;
        double r296030 = sqrt(r296029);
        double r296031 = atan(r296030);
        double r296032 = r296019 * r296031;
        return r296032;
}

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}{1 + x \cdot \left(x \cdot x\right)}} \cdot \left(1 \cdot 1 + \left(x \cdot x - 1 \cdot x\right)\right)}\right)\]
  6. Final simplification0.0

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

Reproduce

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