Average Error: 0.0 → 0.0
Time: 10.2s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1}{1 \cdot 1 - x \cdot x}} \cdot \left|1 - x\right|\right)\]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
2 \cdot \tan^{-1} \left(\sqrt{\frac{1}{1 \cdot 1 - x \cdot x}} \cdot \left|1 - x\right|\right)
double f(double x) {
        double r18375 = 2.0;
        double r18376 = 1.0;
        double r18377 = x;
        double r18378 = r18376 - r18377;
        double r18379 = r18376 + r18377;
        double r18380 = r18378 / r18379;
        double r18381 = sqrt(r18380);
        double r18382 = atan(r18381);
        double r18383 = r18375 * r18382;
        return r18383;
}

double f(double x) {
        double r18384 = 2.0;
        double r18385 = 1.0;
        double r18386 = 1.0;
        double r18387 = r18386 * r18386;
        double r18388 = x;
        double r18389 = r18388 * r18388;
        double r18390 = r18387 - r18389;
        double r18391 = r18385 / r18390;
        double r18392 = sqrt(r18391);
        double r18393 = r18386 - r18388;
        double r18394 = fabs(r18393);
        double r18395 = r18392 * r18394;
        double r18396 = atan(r18395);
        double r18397 = r18384 * r18396;
        return r18397;
}

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

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\color{blue}{\frac{1 \cdot 1 - x \cdot x}{\left(1 + x\right) \cdot \left(1 + x\right)}}}\right)\]
  5. Using strategy rm
  6. Applied flip-+0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\frac{1 \cdot 1 - x \cdot x}{\left(1 + x\right) \cdot \color{blue}{\frac{1 \cdot 1 - x \cdot x}{1 - x}}}}\right)\]
  7. Applied flip-+0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\frac{1 \cdot 1 - x \cdot x}{\color{blue}{\frac{1 \cdot 1 - x \cdot x}{1 - x}} \cdot \frac{1 \cdot 1 - x \cdot x}{1 - x}}}\right)\]
  8. Applied frac-times0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\frac{1 \cdot 1 - x \cdot x}{\color{blue}{\frac{\left(1 \cdot 1 - x \cdot x\right) \cdot \left(1 \cdot 1 - x \cdot x\right)}{\left(1 - x\right) \cdot \left(1 - x\right)}}}}\right)\]
  9. Applied associate-/r/0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\color{blue}{\frac{1 \cdot 1 - x \cdot x}{\left(1 \cdot 1 - x \cdot x\right) \cdot \left(1 \cdot 1 - x \cdot x\right)} \cdot \left(\left(1 - x\right) \cdot \left(1 - x\right)\right)}}\right)\]
  10. Applied sqrt-prod0.0

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

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

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

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

Reproduce

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