Average Error: 0.0 → 0.0
Time: 6.9s
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 r28867 = 2.0;
        double r28868 = 1.0;
        double r28869 = x;
        double r28870 = r28868 - r28869;
        double r28871 = r28868 + r28869;
        double r28872 = r28870 / r28871;
        double r28873 = sqrt(r28872);
        double r28874 = atan(r28873);
        double r28875 = r28867 * r28874;
        return r28875;
}

double f(double x) {
        double r28876 = 2.0;
        double r28877 = 1.0;
        double r28878 = x;
        double r28879 = r28877 - r28878;
        double r28880 = 3.0;
        double r28881 = pow(r28877, r28880);
        double r28882 = pow(r28878, r28880);
        double r28883 = r28881 + r28882;
        double r28884 = r28879 / r28883;
        double r28885 = r28877 * r28877;
        double r28886 = r28878 * r28878;
        double r28887 = r28877 * r28878;
        double r28888 = r28886 - r28887;
        double r28889 = r28885 + r28888;
        double r28890 = r28884 * r28889;
        double r28891 = sqrt(r28890);
        double r28892 = atan(r28891);
        double r28893 = r28876 * r28892;
        return r28893;
}

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