Average Error: 0.0 → 0.0
Time: 10.1s
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 r256615 = 2.0;
        double r256616 = 1.0;
        double r256617 = x;
        double r256618 = r256616 - r256617;
        double r256619 = r256616 + r256617;
        double r256620 = r256618 / r256619;
        double r256621 = sqrt(r256620);
        double r256622 = atan(r256621);
        double r256623 = r256615 * r256622;
        return r256623;
}

double f(double x) {
        double r256624 = 1.0;
        double r256625 = x;
        double r256626 = r256624 - r256625;
        double r256627 = r256624 + r256625;
        double r256628 = r256626 / r256627;
        double r256629 = exp(r256628);
        double r256630 = log(r256629);
        double r256631 = sqrt(r256630);
        double r256632 = atan(r256631);
        double r256633 = 2.0;
        double r256634 = r256632 * r256633;
        return r256634;
}

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