Average Error: 0.0 → 0.0
Time: 2.9s
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 r8320 = 2.0;
        double r8321 = 1.0;
        double r8322 = x;
        double r8323 = r8321 - r8322;
        double r8324 = r8321 + r8322;
        double r8325 = r8323 / r8324;
        double r8326 = sqrt(r8325);
        double r8327 = atan(r8326);
        double r8328 = r8320 * r8327;
        return r8328;
}

double f(double x) {
        double r8329 = 2.0;
        double r8330 = 1.0;
        double r8331 = x;
        double r8332 = r8330 - r8331;
        double r8333 = 3.0;
        double r8334 = pow(r8330, r8333);
        double r8335 = pow(r8331, r8333);
        double r8336 = r8334 + r8335;
        double r8337 = r8332 / r8336;
        double r8338 = r8330 * r8330;
        double r8339 = r8331 * r8331;
        double r8340 = r8330 * r8331;
        double r8341 = r8339 - r8340;
        double r8342 = r8338 + r8341;
        double r8343 = r8337 * r8342;
        double r8344 = sqrt(r8343);
        double r8345 = atan(r8344);
        double r8346 = r8329 * r8345;
        return r8346;
}

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 2019353 
(FPCore (x)
  :name "arccos"
  :precision binary64
  (* 2 (atan (sqrt (/ (- 1 x) (+ 1 x))))))