Average Error: 0.0 → 0.0
Time: 8.6s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1}{1 + x} \cdot \left(1 - x\right)}\right)\]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
2 \cdot \tan^{-1} \left(\sqrt{\frac{1}{1 + x} \cdot \left(1 - x\right)}\right)
double f(double x) {
        double r13564 = 2.0;
        double r13565 = 1.0;
        double r13566 = x;
        double r13567 = r13565 - r13566;
        double r13568 = r13565 + r13566;
        double r13569 = r13567 / r13568;
        double r13570 = sqrt(r13569);
        double r13571 = atan(r13570);
        double r13572 = r13564 * r13571;
        return r13572;
}

double f(double x) {
        double r13573 = 2.0;
        double r13574 = 1.0;
        double r13575 = 1.0;
        double r13576 = x;
        double r13577 = r13575 + r13576;
        double r13578 = r13574 / r13577;
        double r13579 = r13575 - r13576;
        double r13580 = r13578 * r13579;
        double r13581 = sqrt(r13580);
        double r13582 = atan(r13581);
        double r13583 = r13573 * r13582;
        return r13583;
}

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 flip-+0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{\color{blue}{\frac{1 \cdot 1 - x \cdot x}{1 - x}}}}\right)\]
  4. Applied associate-/r/0.0

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

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

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

Reproduce

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