?

Average Error: 12.0 → 11.9
Time: 15.1s
Precision: binary64
Cost: 72064

?

\[10^{-9} \leq x \land x \leq 10\]
\[\tan \tan^{-1} \left(\sqrt{2 \cdot x}\right) - \tan^{-1} \left(\sqrt{2 \cdot x}\right) \]
\[\begin{array}{l} t_0 := \sqrt{2 \cdot x}\\ t_1 := \tan^{-1} t_0\\ {\left(\frac{2 \cdot x - {t_1}^{2}}{\frac{t_0 + t_1}{{\left(t_0 - t_1\right)}^{2}}}\right)}^{0.3333333333333333} \end{array} \]
(FPCore (x)
 :precision binary64
 (- (tan (atan (sqrt (* 2.0 x)))) (atan (sqrt (* 2.0 x)))))
(FPCore (x)
 :precision binary64
 (let* ((t_0 (sqrt (* 2.0 x))) (t_1 (atan t_0)))
   (pow
    (/ (- (* 2.0 x) (pow t_1 2.0)) (/ (+ t_0 t_1) (pow (- t_0 t_1) 2.0)))
    0.3333333333333333)))
double code(double x) {
	return tan(atan(sqrt((2.0 * x)))) - atan(sqrt((2.0 * x)));
}
double code(double x) {
	double t_0 = sqrt((2.0 * x));
	double t_1 = atan(t_0);
	return pow((((2.0 * x) - pow(t_1, 2.0)) / ((t_0 + t_1) / pow((t_0 - t_1), 2.0))), 0.3333333333333333);
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = tan(atan(sqrt((2.0d0 * x)))) - atan(sqrt((2.0d0 * x)))
end function
real(8) function code(x)
    real(8), intent (in) :: x
    real(8) :: t_0
    real(8) :: t_1
    t_0 = sqrt((2.0d0 * x))
    t_1 = atan(t_0)
    code = (((2.0d0 * x) - (t_1 ** 2.0d0)) / ((t_0 + t_1) / ((t_0 - t_1) ** 2.0d0))) ** 0.3333333333333333d0
end function
public static double code(double x) {
	return Math.tan(Math.atan(Math.sqrt((2.0 * x)))) - Math.atan(Math.sqrt((2.0 * x)));
}
public static double code(double x) {
	double t_0 = Math.sqrt((2.0 * x));
	double t_1 = Math.atan(t_0);
	return Math.pow((((2.0 * x) - Math.pow(t_1, 2.0)) / ((t_0 + t_1) / Math.pow((t_0 - t_1), 2.0))), 0.3333333333333333);
}
def code(x):
	return math.tan(math.atan(math.sqrt((2.0 * x)))) - math.atan(math.sqrt((2.0 * x)))
def code(x):
	t_0 = math.sqrt((2.0 * x))
	t_1 = math.atan(t_0)
	return math.pow((((2.0 * x) - math.pow(t_1, 2.0)) / ((t_0 + t_1) / math.pow((t_0 - t_1), 2.0))), 0.3333333333333333)
function code(x)
	return Float64(tan(atan(sqrt(Float64(2.0 * x)))) - atan(sqrt(Float64(2.0 * x))))
end
function code(x)
	t_0 = sqrt(Float64(2.0 * x))
	t_1 = atan(t_0)
	return Float64(Float64(Float64(2.0 * x) - (t_1 ^ 2.0)) / Float64(Float64(t_0 + t_1) / (Float64(t_0 - t_1) ^ 2.0))) ^ 0.3333333333333333
end
function tmp = code(x)
	tmp = tan(atan(sqrt((2.0 * x)))) - atan(sqrt((2.0 * x)));
end
function tmp = code(x)
	t_0 = sqrt((2.0 * x));
	t_1 = atan(t_0);
	tmp = (((2.0 * x) - (t_1 ^ 2.0)) / ((t_0 + t_1) / ((t_0 - t_1) ^ 2.0))) ^ 0.3333333333333333;
end
code[x_] := N[(N[Tan[N[ArcTan[N[Sqrt[N[(2.0 * x), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - N[ArcTan[N[Sqrt[N[(2.0 * x), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[x_] := Block[{t$95$0 = N[Sqrt[N[(2.0 * x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[ArcTan[t$95$0], $MachinePrecision]}, N[Power[N[(N[(N[(2.0 * x), $MachinePrecision] - N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$0 + t$95$1), $MachinePrecision] / N[Power[N[(t$95$0 - t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]
\tan \tan^{-1} \left(\sqrt{2 \cdot x}\right) - \tan^{-1} \left(\sqrt{2 \cdot x}\right)
\begin{array}{l}
t_0 := \sqrt{2 \cdot x}\\
t_1 := \tan^{-1} t_0\\
{\left(\frac{2 \cdot x - {t_1}^{2}}{\frac{t_0 + t_1}{{\left(t_0 - t_1\right)}^{2}}}\right)}^{0.3333333333333333}
\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 12.0

    \[\tan \tan^{-1} \left(\sqrt{2 \cdot x}\right) - \tan^{-1} \left(\sqrt{2 \cdot x}\right) \]
  2. Applied egg-rr11.9

    \[\leadsto \color{blue}{{\left({\left(\sqrt{2 \cdot x} - \tan^{-1} \left(\sqrt{2 \cdot x}\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
  3. Applied egg-rr11.9

    \[\leadsto {\color{blue}{\left(\frac{2 \cdot x - {\tan^{-1} \left(\sqrt{2 \cdot x}\right)}^{2}}{\frac{\sqrt{2 \cdot x} + \tan^{-1} \left(\sqrt{2 \cdot x}\right)}{{\left(\sqrt{2 \cdot x} - \tan^{-1} \left(\sqrt{2 \cdot x}\right)\right)}^{2}}}\right)}}^{0.3333333333333333} \]
  4. Final simplification11.9

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

Alternatives

Alternative 1
Error11.9
Cost45376
\[\begin{array}{l} t_0 := \sqrt{2 \cdot x}\\ {\left({\left(e^{\log \left(t_0 - \tan^{-1} t_0\right)}\right)}^{3}\right)}^{0.3333333333333333} \end{array} \]
Alternative 2
Error11.9
Cost32576
\[\begin{array}{l} t_0 := \sqrt{2 \cdot x}\\ {\left({\left(t_0 - \tan^{-1} t_0\right)}^{3}\right)}^{0.3333333333333333} \end{array} \]
Alternative 3
Error11.9
Cost19648
\[\begin{array}{l} t_0 := \sqrt{2 \cdot x}\\ t_0 - \tan^{-1} t_0 \end{array} \]
Alternative 4
Error55.1
Cost19520
\[-\tan^{-1} \left(\sqrt{2} \cdot \left(-\sqrt{x}\right)\right) \]
Alternative 5
Error63.0
Cost13056
\[-\tan^{-1} \left(\sqrt{2 \cdot x}\right) \]

Error

Reproduce?

herbie shell --seed 1 
(FPCore (x)
  :name "tan(atan(sqrt(2*x)))-atan(sqrt(2*x))"
  :precision binary64
  :pre (and (<= 1e-9 x) (<= x 10.0))
  (- (tan (atan (sqrt (* 2.0 x)))) (atan (sqrt (* 2.0 x)))))