Average Error: 0.0 → 0.0
Time: 5.6s
Precision: 64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)\]
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1}{\sqrt{{1}^{3} + {x}^{3}}} \cdot \left(\sqrt{1 \cdot 1 + \left(x \cdot x - 1 \cdot x\right)} \cdot \frac{1 - x}{\sqrt{1 + x}}\right)}\right)\]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
2 \cdot \tan^{-1} \left(\sqrt{\frac{1}{\sqrt{{1}^{3} + {x}^{3}}} \cdot \left(\sqrt{1 \cdot 1 + \left(x \cdot x - 1 \cdot x\right)} \cdot \frac{1 - x}{\sqrt{1 + x}}\right)}\right)
double f(double x) {
        double r26330 = 2.0;
        double r26331 = 1.0;
        double r26332 = x;
        double r26333 = r26331 - r26332;
        double r26334 = r26331 + r26332;
        double r26335 = r26333 / r26334;
        double r26336 = sqrt(r26335);
        double r26337 = atan(r26336);
        double r26338 = r26330 * r26337;
        return r26338;
}

double f(double x) {
        double r26339 = 2.0;
        double r26340 = 1.0;
        double r26341 = 1.0;
        double r26342 = 3.0;
        double r26343 = pow(r26341, r26342);
        double r26344 = x;
        double r26345 = pow(r26344, r26342);
        double r26346 = r26343 + r26345;
        double r26347 = sqrt(r26346);
        double r26348 = r26340 / r26347;
        double r26349 = r26341 * r26341;
        double r26350 = r26344 * r26344;
        double r26351 = r26341 * r26344;
        double r26352 = r26350 - r26351;
        double r26353 = r26349 + r26352;
        double r26354 = sqrt(r26353);
        double r26355 = r26341 - r26344;
        double r26356 = r26341 + r26344;
        double r26357 = sqrt(r26356);
        double r26358 = r26355 / r26357;
        double r26359 = r26354 * r26358;
        double r26360 = r26348 * r26359;
        double r26361 = sqrt(r26360);
        double r26362 = atan(r26361);
        double r26363 = r26339 * r26362;
        return r26363;
}

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-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. Using strategy rm
  7. Applied flip3-+0.0

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

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

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

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

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

Reproduce

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