Average Error: 0.0 → 0.0
Time: 5.8s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{{1}^{3} - {x}^{3}}{\mathsf{fma}\left(1, 1, \mathsf{fma}\left(x, x, 1 \cdot x\right)\right) \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}^{3} - {x}^{3}}{\mathsf{fma}\left(1, 1, \mathsf{fma}\left(x, x, 1 \cdot x\right)\right) \cdot \left(1 + x\right)}}\right)
double f(double x) {
        double r21274 = 2.0;
        double r21275 = 1.0;
        double r21276 = x;
        double r21277 = r21275 - r21276;
        double r21278 = r21275 + r21276;
        double r21279 = r21277 / r21278;
        double r21280 = sqrt(r21279);
        double r21281 = atan(r21280);
        double r21282 = r21274 * r21281;
        return r21282;
}

double f(double x) {
        double r21283 = 2.0;
        double r21284 = 1.0;
        double r21285 = 3.0;
        double r21286 = pow(r21284, r21285);
        double r21287 = x;
        double r21288 = pow(r21287, r21285);
        double r21289 = r21286 - r21288;
        double r21290 = r21284 * r21287;
        double r21291 = fma(r21287, r21287, r21290);
        double r21292 = fma(r21284, r21284, r21291);
        double r21293 = r21284 + r21287;
        double r21294 = r21292 * r21293;
        double r21295 = r21289 / r21294;
        double r21296 = sqrt(r21295);
        double r21297 = atan(r21296);
        double r21298 = r21283 * r21297;
        return r21298;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
  2. Using strategy rm
  3. Applied flip3--0.0

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

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

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\frac{{1}^{3} - {x}^{3}}{\color{blue}{\mathsf{fma}\left(1, 1, \mathsf{fma}\left(x, x, 1 \cdot x\right)\right) \cdot \left(1 + x\right)}}}\right)\]
  6. Final simplification0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\frac{{1}^{3} - {x}^{3}}{\mathsf{fma}\left(1, 1, \mathsf{fma}\left(x, x, 1 \cdot x\right)\right) \cdot \left(1 + x\right)}}\right)\]

Reproduce

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