Average Error: 0.0 → 0.0
Time: 3.3s
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}{x + 1}}}\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}{x + 1}}}\right)\right)
double f(double x) {
        double r12518 = 2.0;
        double r12519 = 1.0;
        double r12520 = x;
        double r12521 = r12519 - r12520;
        double r12522 = r12519 + r12520;
        double r12523 = r12521 / r12522;
        double r12524 = sqrt(r12523);
        double r12525 = atan(r12524);
        double r12526 = r12518 * r12525;
        return r12526;
}

double f(double x) {
        double r12527 = 2.0;
        double r12528 = 1.0;
        double r12529 = x;
        double r12530 = r12528 - r12529;
        double r12531 = r12529 + r12528;
        double r12532 = r12530 / r12531;
        double r12533 = sqrt(r12532);
        double r12534 = exp(r12533);
        double r12535 = log(r12534);
        double r12536 = atan(r12535);
        double r12537 = r12527 * r12536;
        return r12537;
}

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

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

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

Reproduce

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