Average Error: 29.5 → 0.5
Time: 9.9s
Precision: binary64
Cost: 32896
\[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
\[\begin{array}{l} t_0 := \sqrt[3]{1 + x}\\ \frac{1}{{t_0}^{2} + \sqrt[3]{x} \cdot \left(t_0 + \sqrt[3]{x}\right)} \end{array} \]
(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
(FPCore (x)
 :precision binary64
 (let* ((t_0 (cbrt (+ 1.0 x))))
   (/ 1.0 (+ (pow t_0 2.0) (* (cbrt x) (+ t_0 (cbrt x)))))))
double code(double x) {
	return cbrt((x + 1.0)) - cbrt(x);
}
double code(double x) {
	double t_0 = cbrt((1.0 + x));
	return 1.0 / (pow(t_0, 2.0) + (cbrt(x) * (t_0 + cbrt(x))));
}
public static double code(double x) {
	return Math.cbrt((x + 1.0)) - Math.cbrt(x);
}
public static double code(double x) {
	double t_0 = Math.cbrt((1.0 + x));
	return 1.0 / (Math.pow(t_0, 2.0) + (Math.cbrt(x) * (t_0 + Math.cbrt(x))));
}
function code(x)
	return Float64(cbrt(Float64(x + 1.0)) - cbrt(x))
end
function code(x)
	t_0 = cbrt(Float64(1.0 + x))
	return Float64(1.0 / Float64((t_0 ^ 2.0) + Float64(cbrt(x) * Float64(t_0 + cbrt(x)))))
end
code[x_] := N[(N[Power[N[(x + 1.0), $MachinePrecision], 1/3], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]
code[x_] := Block[{t$95$0 = N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision]}, N[(1.0 / N[(N[Power[t$95$0, 2.0], $MachinePrecision] + N[(N[Power[x, 1/3], $MachinePrecision] * N[(t$95$0 + N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\sqrt[3]{x + 1} - \sqrt[3]{x}
\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
\frac{1}{{t_0}^{2} + \sqrt[3]{x} \cdot \left(t_0 + \sqrt[3]{x}\right)}
\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 29.5

    \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
  2. Applied egg-rr28.7

    \[\leadsto \color{blue}{\frac{\left(x + 1\right) - x}{{\left(\sqrt[3]{x + 1}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x + 1} + \sqrt[3]{x}\right)}} \]
  3. Taylor expanded in x around 0 0.5

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

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

Alternatives

Alternative 1
Error7.8
Cost33028
\[\begin{array}{l} \mathbf{if}\;x \leq 9.346374982514411 \cdot 10^{-7}:\\ \;\;\;\;\frac{1}{\sqrt[3]{x} \cdot \left(\sqrt[3]{1 + x} + \sqrt[3]{x}\right) + \sqrt[3]{{\left(1 + x\right)}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.3333333333333333, \frac{\sqrt[3]{x}}{x}, -0.1111111111111111 \cdot \frac{\sqrt[3]{e^{\log x}}}{x \cdot x}\right)\\ \end{array} \]
Alternative 2
Error7.7
Cost32968
\[\begin{array}{l} \mathbf{if}\;x \leq -3764496675.277617:\\ \;\;\;\;\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{\frac{\frac{1}{x}}{x}}, -0.1111111111111111 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)\\ \mathbf{elif}\;x \leq 9.346374982514411 \cdot 10^{-7}:\\ \;\;\;\;{\left({\left(\sqrt[3]{1 + x} - \sqrt[3]{x}\right)}^{3}\right)}^{0.3333333333333333}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.3333333333333333, \frac{\sqrt[3]{x}}{x}, -0.1111111111111111 \cdot \frac{\sqrt[3]{e^{\log x}}}{x \cdot x}\right)\\ \end{array} \]
Alternative 3
Error8.7
Cost32776
\[\begin{array}{l} \mathbf{if}\;x \leq -3764496675.277617:\\ \;\;\;\;\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{\frac{\frac{1}{x}}{x}}, -0.1111111111111111 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)\\ \mathbf{elif}\;x \leq 9.346374982514411 \cdot 10^{-7}:\\ \;\;\;\;{\left({\left(\sqrt[3]{1 + x} - \sqrt[3]{x}\right)}^{3}\right)}^{0.3333333333333333}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.3333333333333333, \frac{\sqrt[3]{e^{\log x}}}{x}, -0.1111111111111111 \cdot {x}^{-1.6666666666666667}\right)\\ \end{array} \]
Alternative 4
Error8.8
Cost26500
\[\begin{array}{l} \mathbf{if}\;x \leq -3764496675.277617:\\ \;\;\;\;\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{\frac{\frac{1}{x}}{x}}, -0.1111111111111111 \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)\\ \mathbf{elif}\;x \leq 9.346374982514411 \cdot 10^{-7}:\\ \;\;\;\;{\left({\left(\sqrt[3]{1 + x} - \sqrt[3]{x}\right)}^{3}\right)}^{0.3333333333333333}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{e^{\log x}} \cdot \frac{0.3333333333333333}{x}\\ \end{array} \]
Alternative 5
Error8.9
Cost26312
\[\begin{array}{l} \mathbf{if}\;x \leq -3764496675.277617:\\ \;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{\frac{1}{x}}{x}}\\ \mathbf{elif}\;x \leq 9.346374982514411 \cdot 10^{-7}:\\ \;\;\;\;{\left({\left(\sqrt[3]{1 + x} - \sqrt[3]{x}\right)}^{3}\right)}^{0.3333333333333333}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{e^{\log x}} \cdot \frac{0.3333333333333333}{x}\\ \end{array} \]
Alternative 6
Error8.9
Cost19784
\[\begin{array}{l} \mathbf{if}\;x \leq -3764496675.277617:\\ \;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{\frac{1}{x}}{x}}\\ \mathbf{elif}\;x \leq 9.346374982514411 \cdot 10^{-7}:\\ \;\;\;\;\sqrt[3]{1 + x} - \sqrt[3]{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{e^{\log x}} \cdot \frac{0.3333333333333333}{x}\\ \end{array} \]
Alternative 7
Error15.6
Cost13384
\[\begin{array}{l} t_0 := 0.3333333333333333 \cdot \sqrt[3]{\frac{\frac{1}{x}}{x}}\\ \mathbf{if}\;x \leq -3764496675.277617:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 9.346374982514411 \cdot 10^{-7}:\\ \;\;\;\;\sqrt[3]{1 + x} - \sqrt[3]{x}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 8
Error17.6
Cost7112
\[\begin{array}{l} t_0 := 0.3333333333333333 \cdot \sqrt[3]{\frac{\frac{1}{x}}{x}}\\ \mathbf{if}\;x \leq -73.91254236331184:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 9.346374982514411 \cdot 10^{-7}:\\ \;\;\;\;1 + x \cdot 0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 9
Error31.8
Cost64
\[1 \]

Error

Reproduce

herbie shell --seed 2022294 
(FPCore (x)
  :name "2cbrt (problem 3.3.4)"
  :precision binary64
  (- (cbrt (+ x 1.0)) (cbrt x)))