Average Error: 0.0 → 0.0
Time: 14.2s
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 r470961 = 2.0;
        double r470962 = 1.0;
        double r470963 = x;
        double r470964 = r470962 - r470963;
        double r470965 = r470962 + r470963;
        double r470966 = r470964 / r470965;
        double r470967 = sqrt(r470966);
        double r470968 = atan(r470967);
        double r470969 = r470961 * r470968;
        return r470969;
}

double f(double x) {
        double r470970 = 2.0;
        double r470971 = 1.0;
        double r470972 = x;
        double r470973 = r470971 - r470972;
        double r470974 = sqrt(r470973);
        double r470975 = r470971 + r470972;
        double r470976 = sqrt(r470975);
        double r470977 = r470974 / r470976;
        double r470978 = atan(r470977);
        double r470979 = r470970 * r470978;
        return r470979;
}

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