Average Error: 0.0 → 0.0
Time: 8.1s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[\tan^{-1} \left(\sqrt{\frac{1 - x}{\sqrt[3]{x + 1}}} \cdot \sqrt{\frac{1}{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}}}\right) \cdot 2\]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
\tan^{-1} \left(\sqrt{\frac{1 - x}{\sqrt[3]{x + 1}}} \cdot \sqrt{\frac{1}{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}}}\right) \cdot 2
double f(double x) {
        double r508145 = 2.0;
        double r508146 = 1.0;
        double r508147 = x;
        double r508148 = r508146 - r508147;
        double r508149 = r508146 + r508147;
        double r508150 = r508148 / r508149;
        double r508151 = sqrt(r508150);
        double r508152 = atan(r508151);
        double r508153 = r508145 * r508152;
        return r508153;
}

double f(double x) {
        double r508154 = 1.0;
        double r508155 = x;
        double r508156 = r508154 - r508155;
        double r508157 = r508155 + r508154;
        double r508158 = cbrt(r508157);
        double r508159 = r508156 / r508158;
        double r508160 = sqrt(r508159);
        double r508161 = 1.0;
        double r508162 = r508158 * r508158;
        double r508163 = r508161 / r508162;
        double r508164 = sqrt(r508163);
        double r508165 = r508160 * r508164;
        double r508166 = atan(r508165);
        double r508167 = 2.0;
        double r508168 = r508166 * r508167;
        return r508168;
}

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-cube-cbrt0.0

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

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

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

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

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

Reproduce

herbie shell --seed 2019192 +o rules:numerics
(FPCore (x)
  :name "arccos"
  (* 2.0 (atan (sqrt (/ (- 1.0 x) (+ 1.0 x))))))