Average Error: 0.0 → 0.0
Time: 1.5m
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[2 \cdot \tan^{-1} \left(\sqrt[3]{\left(\sqrt{\frac{1}{\sqrt{1 + x}}} \cdot \frac{\sqrt{\frac{1 - x}{\sqrt{1 + x}}}}{\sqrt{1 + x}}\right) \cdot \frac{1 - x}{\sqrt{1 + x}}}\right)\]
double f(double x) {
        double r2865127 = 2.0;
        double r2865128 = 1.0;
        double r2865129 = x;
        double r2865130 = r2865128 - r2865129;
        double r2865131 = r2865128 + r2865129;
        double r2865132 = r2865130 / r2865131;
        double r2865133 = sqrt(r2865132);
        double r2865134 = atan(r2865133);
        double r2865135 = r2865127 * r2865134;
        return r2865135;
}

double f(double x) {
        double r2865136 = 2.0;
        double r2865137 = 1.0;
        double r2865138 = x;
        double r2865139 = r2865137 + r2865138;
        double r2865140 = sqrt(r2865139);
        double r2865141 = r2865137 / r2865140;
        double r2865142 = sqrt(r2865141);
        double r2865143 = r2865137 - r2865138;
        double r2865144 = r2865143 / r2865140;
        double r2865145 = sqrt(r2865144);
        double r2865146 = r2865145 / r2865140;
        double r2865147 = r2865142 * r2865146;
        double r2865148 = r2865147 * r2865144;
        double r2865149 = cbrt(r2865148);
        double r2865150 = atan(r2865149);
        double r2865151 = r2865136 * r2865150;
        return r2865151;
}

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

Error

Bits error versus x

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-sqr-sqrt0.0

    \[\leadsto 2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{\color{blue}{\sqrt{1 + x} \cdot \sqrt{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)}}{\sqrt{1 + x} \cdot \sqrt{1 + x}}}\right)\]
  5. Applied times-frac0.0

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

    \[\leadsto 2 \cdot \tan^{-1} \color{blue}{\left(\sqrt{\frac{1}{\sqrt{1 + x}}} \cdot \sqrt{\frac{1 - x}{\sqrt{1 + x}}}\right)}\]
  7. Using strategy rm
  8. Applied add-cbrt-cube0.0

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

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

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

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

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

Reproduce

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