Average Error: 0.0 → 0.0
Time: 20.8s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[2 \cdot \tan^{-1} \left(\sqrt{\left(1 - x\right) \cdot \frac{1 - x}{1 - x \cdot x}}\right)\]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
2 \cdot \tan^{-1} \left(\sqrt{\left(1 - x\right) \cdot \frac{1 - x}{1 - x \cdot x}}\right)
double f(double x) {
        double r619448 = 2.0;
        double r619449 = 1.0;
        double r619450 = x;
        double r619451 = r619449 - r619450;
        double r619452 = r619449 + r619450;
        double r619453 = r619451 / r619452;
        double r619454 = sqrt(r619453);
        double r619455 = atan(r619454);
        double r619456 = r619448 * r619455;
        return r619456;
}

double f(double x) {
        double r619457 = 2.0;
        double r619458 = 1.0;
        double r619459 = x;
        double r619460 = r619458 - r619459;
        double r619461 = r619459 * r619459;
        double r619462 = r619458 - r619461;
        double r619463 = r619460 / r619462;
        double r619464 = r619460 * r619463;
        double r619465 = sqrt(r619464);
        double r619466 = atan(r619465);
        double r619467 = r619457 * r619466;
        return r619467;
}

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

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

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

Reproduce

herbie shell --seed 2019119 
(FPCore (x)
  :name "arccos"
  (* 2 (atan (sqrt (/ (- 1 x) (+ 1 x))))))