Average Error: 0.0 → 0.0
Time: 4.7s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[2 \cdot \tan^{-1} \left(\frac{\sqrt{\left(1 \cdot 1 - x \cdot x\right) \cdot \left({\left(1 \cdot 1\right)}^{3} + {\left(x \cdot x - 1 \cdot x\right)}^{3}\right)}}{\sqrt{\left({1}^{3} + {x}^{3}\right) \cdot \left(\left(1 \cdot 1\right) \cdot \left(1 \cdot 1\right) + \left(\left(x \cdot x - 1 \cdot x\right) \cdot \left(x \cdot x - 1 \cdot x\right) - \left(1 \cdot 1\right) \cdot \left(x \cdot x - 1 \cdot x\right)\right)\right)} \cdot \sqrt{1 + x}}\right)\]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
2 \cdot \tan^{-1} \left(\frac{\sqrt{\left(1 \cdot 1 - x \cdot x\right) \cdot \left({\left(1 \cdot 1\right)}^{3} + {\left(x \cdot x - 1 \cdot x\right)}^{3}\right)}}{\sqrt{\left({1}^{3} + {x}^{3}\right) \cdot \left(\left(1 \cdot 1\right) \cdot \left(1 \cdot 1\right) + \left(\left(x \cdot x - 1 \cdot x\right) \cdot \left(x \cdot x - 1 \cdot x\right) - \left(1 \cdot 1\right) \cdot \left(x \cdot x - 1 \cdot x\right)\right)\right)} \cdot \sqrt{1 + x}}\right)
double f(double x) {
        double r19023 = 2.0;
        double r19024 = 1.0;
        double r19025 = x;
        double r19026 = r19024 - r19025;
        double r19027 = r19024 + r19025;
        double r19028 = r19026 / r19027;
        double r19029 = sqrt(r19028);
        double r19030 = atan(r19029);
        double r19031 = r19023 * r19030;
        return r19031;
}

double f(double x) {
        double r19032 = 2.0;
        double r19033 = 1.0;
        double r19034 = r19033 * r19033;
        double r19035 = x;
        double r19036 = r19035 * r19035;
        double r19037 = r19034 - r19036;
        double r19038 = 3.0;
        double r19039 = pow(r19034, r19038);
        double r19040 = r19033 * r19035;
        double r19041 = r19036 - r19040;
        double r19042 = pow(r19041, r19038);
        double r19043 = r19039 + r19042;
        double r19044 = r19037 * r19043;
        double r19045 = sqrt(r19044);
        double r19046 = pow(r19033, r19038);
        double r19047 = pow(r19035, r19038);
        double r19048 = r19046 + r19047;
        double r19049 = r19034 * r19034;
        double r19050 = r19041 * r19041;
        double r19051 = r19034 * r19041;
        double r19052 = r19050 - r19051;
        double r19053 = r19049 + r19052;
        double r19054 = r19048 * r19053;
        double r19055 = sqrt(r19054);
        double r19056 = r19033 + r19035;
        double r19057 = sqrt(r19056);
        double r19058 = r19055 * r19057;
        double r19059 = r19045 / r19058;
        double r19060 = atan(r19059);
        double r19061 = r19032 * r19060;
        return r19061;
}

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

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

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

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

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

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

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

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

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

Reproduce

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