Average Error: 0.0 → 0.0
Time: 16.7s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[2 \cdot \tan^{-1} \left(\log \left(e^{\sqrt{\frac{1 - x}{1 + x}}}\right)\right)\]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
2 \cdot \tan^{-1} \left(\log \left(e^{\sqrt{\frac{1 - x}{1 + x}}}\right)\right)
double f(double x) {
        double r27398 = 2.0;
        double r27399 = 1.0;
        double r27400 = x;
        double r27401 = r27399 - r27400;
        double r27402 = r27399 + r27400;
        double r27403 = r27401 / r27402;
        double r27404 = sqrt(r27403);
        double r27405 = atan(r27404);
        double r27406 = r27398 * r27405;
        return r27406;
}

double f(double x) {
        double r27407 = 2.0;
        double r27408 = 1.0;
        double r27409 = x;
        double r27410 = r27408 - r27409;
        double r27411 = r27408 + r27409;
        double r27412 = r27410 / r27411;
        double r27413 = sqrt(r27412);
        double r27414 = exp(r27413);
        double r27415 = log(r27414);
        double r27416 = atan(r27415);
        double r27417 = r27407 * r27416;
        return r27417;
}

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 add-log-exp0.0

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

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

Reproduce

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