Average Error: 0.0 → 0.0
Time: 8.8s
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 r16808 = 2.0;
        double r16809 = 1.0;
        double r16810 = x;
        double r16811 = r16809 - r16810;
        double r16812 = r16809 + r16810;
        double r16813 = r16811 / r16812;
        double r16814 = sqrt(r16813);
        double r16815 = atan(r16814);
        double r16816 = r16808 * r16815;
        return r16816;
}

double f(double x) {
        double r16817 = 2.0;
        double r16818 = 1.0;
        double r16819 = x;
        double r16820 = r16818 - r16819;
        double r16821 = 3.0;
        double r16822 = pow(r16818, r16821);
        double r16823 = pow(r16819, r16821);
        double r16824 = r16822 + r16823;
        double r16825 = r16820 / r16824;
        double r16826 = r16818 * r16818;
        double r16827 = r16819 * r16819;
        double r16828 = r16818 * r16819;
        double r16829 = r16827 - r16828;
        double r16830 = r16826 + r16829;
        double r16831 = r16825 * r16830;
        double r16832 = sqrt(r16831);
        double r16833 = atan(r16832);
        double r16834 = r16817 * r16833;
        return r16834;
}

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