Average Error: 0.0 → 0.0
Time: 13.2s
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 r18329 = 2.0;
        double r18330 = 1.0;
        double r18331 = x;
        double r18332 = r18330 - r18331;
        double r18333 = r18330 + r18331;
        double r18334 = r18332 / r18333;
        double r18335 = sqrt(r18334);
        double r18336 = atan(r18335);
        double r18337 = r18329 * r18336;
        return r18337;
}

double f(double x) {
        double r18338 = 2.0;
        double r18339 = 1.0;
        double r18340 = x;
        double r18341 = r18339 - r18340;
        double r18342 = 3.0;
        double r18343 = pow(r18339, r18342);
        double r18344 = pow(r18340, r18342);
        double r18345 = r18343 + r18344;
        double r18346 = r18341 / r18345;
        double r18347 = r18339 * r18339;
        double r18348 = r18340 * r18340;
        double r18349 = r18339 * r18340;
        double r18350 = r18348 - r18349;
        double r18351 = r18347 + r18350;
        double r18352 = r18346 * r18351;
        double r18353 = sqrt(r18352);
        double r18354 = atan(r18353);
        double r18355 = r18338 * r18354;
        return r18355;
}

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