Average Error: 0.0 → 0.0
Time: 4.3s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{{1}^{3} + {x}^{3}} \cdot \left(1 \cdot 1 + \left(x \cdot x - 1 \cdot x\right)\right)}\right)\]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{{1}^{3} + {x}^{3}} \cdot \left(1 \cdot 1 + \left(x \cdot x - 1 \cdot x\right)\right)}\right)
double f(double x) {
        double r13181 = 2.0;
        double r13182 = 1.0;
        double r13183 = x;
        double r13184 = r13182 - r13183;
        double r13185 = r13182 + r13183;
        double r13186 = r13184 / r13185;
        double r13187 = sqrt(r13186);
        double r13188 = atan(r13187);
        double r13189 = r13181 * r13188;
        return r13189;
}

double f(double x) {
        double r13190 = 2.0;
        double r13191 = 1.0;
        double r13192 = x;
        double r13193 = r13191 - r13192;
        double r13194 = 3.0;
        double r13195 = pow(r13191, r13194);
        double r13196 = pow(r13192, r13194);
        double r13197 = r13195 + r13196;
        double r13198 = r13193 / r13197;
        double r13199 = r13191 * r13191;
        double r13200 = r13192 * r13192;
        double r13201 = r13191 * r13192;
        double r13202 = r13200 - r13201;
        double r13203 = r13199 + r13202;
        double r13204 = r13198 * r13203;
        double r13205 = sqrt(r13204);
        double r13206 = atan(r13205);
        double r13207 = r13190 * r13206;
        return r13207;
}

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 flip3-+0.0

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

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

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

Reproduce

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