Average Error: 0.0 → 0.0
Time: 3.5s
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 r10799 = 2.0;
        double r10800 = 1.0;
        double r10801 = x;
        double r10802 = r10800 - r10801;
        double r10803 = r10800 + r10801;
        double r10804 = r10802 / r10803;
        double r10805 = sqrt(r10804);
        double r10806 = atan(r10805);
        double r10807 = r10799 * r10806;
        return r10807;
}

double f(double x) {
        double r10808 = 2.0;
        double r10809 = 1.0;
        double r10810 = x;
        double r10811 = r10809 - r10810;
        double r10812 = 3.0;
        double r10813 = pow(r10809, r10812);
        double r10814 = pow(r10810, r10812);
        double r10815 = r10813 + r10814;
        double r10816 = r10811 / r10815;
        double r10817 = r10809 * r10809;
        double r10818 = r10810 * r10810;
        double r10819 = r10809 * r10810;
        double r10820 = r10818 - r10819;
        double r10821 = r10817 + r10820;
        double r10822 = r10816 * r10821;
        double r10823 = sqrt(r10822);
        double r10824 = atan(r10823);
        double r10825 = r10808 * r10824;
        return r10825;
}

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