Average Error: 0.0 → 0.0
Time: 3.0s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[2 \cdot \tan^{-1} \left(\frac{\sqrt{1 - x}}{\sqrt{1 + x}}\right)\]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
2 \cdot \tan^{-1} \left(\frac{\sqrt{1 - x}}{\sqrt{1 + x}}\right)
double f(double x) {
        double r11131 = 2.0;
        double r11132 = 1.0;
        double r11133 = x;
        double r11134 = r11132 - r11133;
        double r11135 = r11132 + r11133;
        double r11136 = r11134 / r11135;
        double r11137 = sqrt(r11136);
        double r11138 = atan(r11137);
        double r11139 = r11131 * r11138;
        return r11139;
}

double f(double x) {
        double r11140 = 2.0;
        double r11141 = 1.0;
        double r11142 = x;
        double r11143 = r11141 - r11142;
        double r11144 = sqrt(r11143);
        double r11145 = r11141 + r11142;
        double r11146 = sqrt(r11145);
        double r11147 = r11144 / r11146;
        double r11148 = atan(r11147);
        double r11149 = r11140 * r11148;
        return r11149;
}

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 sqrt-div0.0

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

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

Reproduce

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