Average Error: 0.0 → 0.0
Time: 4.1s
Precision: binary64
\[2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right) \]
\[\begin{array}{l} t_0 := \frac{1 - x}{1 + x}\\ 2 \cdot \tan^{-1} \left(\sqrt[3]{t_0} \cdot {t_0}^{0.16666666666666666}\right) \end{array} \]
2 \cdot \tan^{-1} \left(\sqrt{\frac{1 - x}{1 + x}}\right)
\begin{array}{l}
t_0 := \frac{1 - x}{1 + x}\\
2 \cdot \tan^{-1} \left(\sqrt[3]{t_0} \cdot {t_0}^{0.16666666666666666}\right)
\end{array}
(FPCore (x) :precision binary64 (* 2.0 (atan (sqrt (/ (- 1.0 x) (+ 1.0 x))))))
(FPCore (x)
 :precision binary64
 (let* ((t_0 (/ (- 1.0 x) (+ 1.0 x))))
   (* 2.0 (atan (* (cbrt t_0) (pow t_0 0.16666666666666666))))))
double code(double x) {
	return 2.0 * atan(sqrt((1.0 - x) / (1.0 + x)));
}
double code(double x) {
	double t_0 = (1.0 - x) / (1.0 + x);
	return 2.0 * atan(cbrt(t_0) * pow(t_0, 0.16666666666666666));
}

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. Applied add-cube-cbrt_binary640.0

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

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

    \[\leadsto 2 \cdot \tan^{-1} \left(\color{blue}{\left|\sqrt[3]{\frac{1 - x}{1 + x}}\right|} \cdot \sqrt{\sqrt[3]{\frac{1 - x}{1 + x}}}\right) \]
  5. Applied add-cube-cbrt_binary640.1

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

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

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

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

Reproduce

herbie shell --seed 2022103 
(FPCore (x)
  :name "arccos"
  :precision binary64
  (* 2.0 (atan (sqrt (/ (- 1.0 x) (+ 1.0 x))))))