Average Error: 0.0 → 0.0
Time: 4.5s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1}{1 \cdot 1 + \left(x \cdot x - 1 \cdot x\right)} \cdot \left(\left(x \cdot \left(x - 1\right) + 1 \cdot 1\right) \cdot \frac{1 - x}{1 + x}\right)}\right)\]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
2 \cdot \tan^{-1} \left(\sqrt{\frac{1}{1 \cdot 1 + \left(x \cdot x - 1 \cdot x\right)} \cdot \left(\left(x \cdot \left(x - 1\right) + 1 \cdot 1\right) \cdot \frac{1 - x}{1 + x}\right)}\right)
double f(double x) {
        double r17729 = 2.0;
        double r17730 = 1.0;
        double r17731 = x;
        double r17732 = r17730 - r17731;
        double r17733 = r17730 + r17731;
        double r17734 = r17732 / r17733;
        double r17735 = sqrt(r17734);
        double r17736 = atan(r17735);
        double r17737 = r17729 * r17736;
        return r17737;
}

double f(double x) {
        double r17738 = 2.0;
        double r17739 = 1.0;
        double r17740 = 1.0;
        double r17741 = r17740 * r17740;
        double r17742 = x;
        double r17743 = r17742 * r17742;
        double r17744 = r17740 * r17742;
        double r17745 = r17743 - r17744;
        double r17746 = r17741 + r17745;
        double r17747 = r17739 / r17746;
        double r17748 = r17742 - r17740;
        double r17749 = r17742 * r17748;
        double r17750 = r17749 + r17741;
        double r17751 = r17740 - r17742;
        double r17752 = r17740 + r17742;
        double r17753 = r17751 / r17752;
        double r17754 = r17750 * r17753;
        double r17755 = r17747 * r17754;
        double r17756 = sqrt(r17755);
        double r17757 = atan(r17756);
        double r17758 = r17738 * r17757;
        return r17758;
}

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

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

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\color{blue}{\frac{1 - x}{{1}^{3} + {x}^{3}} \cdot \left(1 \cdot 1 + \left(x \cdot x - 1 \cdot x\right)\right)}}\right)\]
  5. Using strategy rm
  6. Applied sum-cubes0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{\color{blue}{\left(1 \cdot 1 + \left(x \cdot x - 1 \cdot x\right)\right) \cdot \left(1 + x\right)}} \cdot \left(1 \cdot 1 + \left(x \cdot x - 1 \cdot x\right)\right)}\right)\]
  7. Applied *-un-lft-identity0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\frac{\color{blue}{1 \cdot \left(1 - x\right)}}{\left(1 \cdot 1 + \left(x \cdot x - 1 \cdot x\right)\right) \cdot \left(1 + x\right)} \cdot \left(1 \cdot 1 + \left(x \cdot x - 1 \cdot x\right)\right)}\right)\]
  8. Applied times-frac0.0

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

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

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

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

Reproduce

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