Average Error: 0.0 → 0.0
Time: 9.1s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[\tan^{-1} \left(\sqrt{\log \left(e^{\frac{1 - x}{1 + x}}\right)}\right) \cdot 2\]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
\tan^{-1} \left(\sqrt{\log \left(e^{\frac{1 - x}{1 + x}}\right)}\right) \cdot 2
double f(double x) {
        double r210170 = 2.0;
        double r210171 = 1.0;
        double r210172 = x;
        double r210173 = r210171 - r210172;
        double r210174 = r210171 + r210172;
        double r210175 = r210173 / r210174;
        double r210176 = sqrt(r210175);
        double r210177 = atan(r210176);
        double r210178 = r210170 * r210177;
        return r210178;
}

double f(double x) {
        double r210179 = 1.0;
        double r210180 = x;
        double r210181 = r210179 - r210180;
        double r210182 = r210179 + r210180;
        double r210183 = r210181 / r210182;
        double r210184 = exp(r210183);
        double r210185 = log(r210184);
        double r210186 = sqrt(r210185);
        double r210187 = atan(r210186);
        double r210188 = 2.0;
        double r210189 = r210187 * r210188;
        return r210189;
}

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 add-log-exp0.0

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

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

Reproduce

herbie shell --seed 2019130 +o rules:numerics
(FPCore (x)
  :name "arccos"
  (* 2 (atan (sqrt (/ (- 1 x) (+ 1 x))))))