Average Error: 0.0 → 0.0
Time: 28.2s
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 r422150 = 2.0;
        double r422151 = 1.0;
        double r422152 = x;
        double r422153 = r422151 - r422152;
        double r422154 = r422151 + r422152;
        double r422155 = r422153 / r422154;
        double r422156 = sqrt(r422155);
        double r422157 = atan(r422156);
        double r422158 = r422150 * r422157;
        return r422158;
}

double f(double x) {
        double r422159 = 1.0;
        double r422160 = x;
        double r422161 = r422159 - r422160;
        double r422162 = r422159 + r422160;
        double r422163 = r422161 / r422162;
        double r422164 = exp(r422163);
        double r422165 = log(r422164);
        double r422166 = sqrt(r422165);
        double r422167 = atan(r422166);
        double r422168 = 2.0;
        double r422169 = r422167 * r422168;
        return r422169;
}

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