Average Error: 0.0 → 0.0
Time: 12.1s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[\tan^{-1} \left(\sqrt{\frac{1 - x}{1 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)} \cdot \left(\left(1 - x\right) \cdot \left(1 + x \cdot x\right)\right)}\right) \cdot 2\]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
\tan^{-1} \left(\sqrt{\frac{1 - x}{1 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)} \cdot \left(\left(1 - x\right) \cdot \left(1 + x \cdot x\right)\right)}\right) \cdot 2
double f(double x) {
        double r784073 = 2.0;
        double r784074 = 1.0;
        double r784075 = x;
        double r784076 = r784074 - r784075;
        double r784077 = r784074 + r784075;
        double r784078 = r784076 / r784077;
        double r784079 = sqrt(r784078);
        double r784080 = atan(r784079);
        double r784081 = r784073 * r784080;
        return r784081;
}

double f(double x) {
        double r784082 = 1.0;
        double r784083 = x;
        double r784084 = r784082 - r784083;
        double r784085 = r784083 * r784083;
        double r784086 = r784085 * r784085;
        double r784087 = r784082 - r784086;
        double r784088 = r784084 / r784087;
        double r784089 = r784082 + r784085;
        double r784090 = r784084 * r784089;
        double r784091 = r784088 * r784090;
        double r784092 = sqrt(r784091);
        double r784093 = atan(r784092);
        double r784094 = 2.0;
        double r784095 = r784093 * r784094;
        return r784095;
}

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 flip-+0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{\color{blue}{\frac{1 \cdot 1 - x \cdot x}{1 - x}}}}\right)\]
  4. Applied associate-/r/0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\color{blue}{\frac{1 - x}{1 \cdot 1 - x \cdot x} \cdot \left(1 - x\right)}}\right)\]
  5. Simplified0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\color{blue}{\frac{1 - x}{1 - x \cdot x}} \cdot \left(1 - x\right)}\right)\]
  6. Using strategy rm
  7. Applied flip--0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{\color{blue}{\frac{1 \cdot 1 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 + x \cdot x}}} \cdot \left(1 - x\right)}\right)\]
  8. Applied associate-/r/0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\color{blue}{\left(\frac{1 - x}{1 \cdot 1 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)} \cdot \left(1 + x \cdot x\right)\right)} \cdot \left(1 - x\right)}\right)\]
  9. Applied associate-*l*0.0

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

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

Reproduce

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