Average Error: 0.0 → 0.0
Time: 14.6s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[\tan^{-1} \left(\sqrt{\log \left(e^{\frac{1 - x}{1 + x}}\right)}\right) \cdot 2\]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
\tan^{-1} \left(\sqrt{\log \left(e^{\frac{1 - x}{1 + x}}\right)}\right) \cdot 2
double f(double x) {
        double r618720 = 2.0;
        double r618721 = 1.0;
        double r618722 = x;
        double r618723 = r618721 - r618722;
        double r618724 = r618721 + r618722;
        double r618725 = r618723 / r618724;
        double r618726 = sqrt(r618725);
        double r618727 = atan(r618726);
        double r618728 = r618720 * r618727;
        return r618728;
}

double f(double x) {
        double r618729 = 1.0;
        double r618730 = x;
        double r618731 = r618729 - r618730;
        double r618732 = r618729 + r618730;
        double r618733 = r618731 / r618732;
        double r618734 = exp(r618733);
        double r618735 = log(r618734);
        double r618736 = sqrt(r618735);
        double r618737 = atan(r618736);
        double r618738 = 2.0;
        double r618739 = r618737 * r618738;
        return r618739;
}

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} \left(\sqrt{\color{blue}{\log \left(e^{\frac{1 - x}{1 + x}}\right)}}\right)\]
  4. Final simplification0.0

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

Reproduce

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