Average Error: 0.0 → 0.0
Time: 29.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 r514475 = 2.0;
        double r514476 = 1.0;
        double r514477 = x;
        double r514478 = r514476 - r514477;
        double r514479 = r514476 + r514477;
        double r514480 = r514478 / r514479;
        double r514481 = sqrt(r514480);
        double r514482 = atan(r514481);
        double r514483 = r514475 * r514482;
        return r514483;
}

double f(double x) {
        double r514484 = 1.0;
        double r514485 = x;
        double r514486 = r514484 - r514485;
        double r514487 = r514484 + r514485;
        double r514488 = r514486 / r514487;
        double r514489 = exp(r514488);
        double r514490 = log(r514489);
        double r514491 = sqrt(r514490);
        double r514492 = atan(r514491);
        double r514493 = 2.0;
        double r514494 = r514492 * r514493;
        return r514494;
}

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