Average Error: 0.0 → 0.0
Time: 4.2s
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 r17553 = 2.0;
        double r17554 = 1.0;
        double r17555 = x;
        double r17556 = r17554 - r17555;
        double r17557 = r17554 + r17555;
        double r17558 = r17556 / r17557;
        double r17559 = sqrt(r17558);
        double r17560 = atan(r17559);
        double r17561 = r17553 * r17560;
        return r17561;
}

double f(double x) {
        double r17562 = 2.0;
        double r17563 = 1.0;
        double r17564 = x;
        double r17565 = r17563 - r17564;
        double r17566 = 3.0;
        double r17567 = pow(r17563, r17566);
        double r17568 = pow(r17564, r17566);
        double r17569 = r17567 + r17568;
        double r17570 = r17565 / r17569;
        double r17571 = r17563 * r17563;
        double r17572 = r17564 * r17564;
        double r17573 = r17563 * r17564;
        double r17574 = r17572 - r17573;
        double r17575 = r17571 + r17574;
        double r17576 = r17570 * r17575;
        double r17577 = sqrt(r17576);
        double r17578 = atan(r17577);
        double r17579 = r17562 * r17578;
        return r17579;
}

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