Average Error: 0.0 → 0.0
Time: 19.5s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[\tan^{-1} \left(\sqrt{\frac{1 \cdot 1 - x \cdot x}{\left(1 + x\right) \cdot 1 + x \cdot \left(1 + x\right)}}\right) \cdot 2\]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
\tan^{-1} \left(\sqrt{\frac{1 \cdot 1 - x \cdot x}{\left(1 + x\right) \cdot 1 + x \cdot \left(1 + x\right)}}\right) \cdot 2
double f(double x) {
        double r753606 = 2.0;
        double r753607 = 1.0;
        double r753608 = x;
        double r753609 = r753607 - r753608;
        double r753610 = r753607 + r753608;
        double r753611 = r753609 / r753610;
        double r753612 = sqrt(r753611);
        double r753613 = atan(r753612);
        double r753614 = r753606 * r753613;
        return r753614;
}

double f(double x) {
        double r753615 = 1.0;
        double r753616 = r753615 * r753615;
        double r753617 = x;
        double r753618 = r753617 * r753617;
        double r753619 = r753616 - r753618;
        double r753620 = r753615 + r753617;
        double r753621 = r753620 * r753615;
        double r753622 = r753617 * r753620;
        double r753623 = r753621 + r753622;
        double r753624 = r753619 / r753623;
        double r753625 = sqrt(r753624);
        double r753626 = atan(r753625);
        double r753627 = 2.0;
        double r753628 = r753626 * r753627;
        return r753628;
}

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{\color{blue}{\frac{1 \cdot 1 - x \cdot x}{1 + x}}}{1 + x}}\right)\]
  4. Applied associate-/l/0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\color{blue}{\frac{1 \cdot 1 - x \cdot x}{\left(1 + x\right) \cdot \left(1 + x\right)}}}\right)\]
  5. Using strategy rm
  6. Applied distribute-lft-in0.0

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

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

Reproduce

herbie shell --seed 2019168 
(FPCore (x)
  :name "arccos"
  (* 2.0 (atan (sqrt (/ (- 1.0 x) (+ 1.0 x))))))