Average Error: 0.0 → 0.0
Time: 3.0s
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 r8542 = 2.0;
        double r8543 = 1.0;
        double r8544 = x;
        double r8545 = r8543 - r8544;
        double r8546 = r8543 + r8544;
        double r8547 = r8545 / r8546;
        double r8548 = sqrt(r8547);
        double r8549 = atan(r8548);
        double r8550 = r8542 * r8549;
        return r8550;
}

double f(double x) {
        double r8551 = 2.0;
        double r8552 = 1.0;
        double r8553 = x;
        double r8554 = r8552 - r8553;
        double r8555 = 3.0;
        double r8556 = pow(r8552, r8555);
        double r8557 = pow(r8553, r8555);
        double r8558 = r8556 + r8557;
        double r8559 = r8554 / r8558;
        double r8560 = r8552 * r8552;
        double r8561 = r8553 * r8553;
        double r8562 = r8552 * r8553;
        double r8563 = r8561 - r8562;
        double r8564 = r8560 + r8563;
        double r8565 = r8559 * r8564;
        double r8566 = sqrt(r8565);
        double r8567 = atan(r8566);
        double r8568 = r8551 * r8567;
        return r8568;
}

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