(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
(FPCore (x)
:precision binary64
(let* ((t_0 (cbrt (+ 1.0 x))))
(*
(+ 1.0 (- x 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 + (x - x)) * (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 + (x - x)) * (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(Float64(1.0 + Float64(x - x)) * 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[(N[(1.0 + N[(x - x), $MachinePrecision]), $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]), $MachinePrecision]]
\sqrt[3]{x + 1} - \sqrt[3]{x}
\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
\left(1 + \left(x - x\right)\right) \cdot \frac{1}{{t_0}^{2} + \sqrt[3]{x} \cdot \left(t_0 + \sqrt[3]{x}\right)}
\end{array}
Results
Initial program 29.7
Applied egg-rr29.0
Applied egg-rr14.9
Applied egg-rr0.5
Final simplification0.5
herbie shell --seed 2022190
(FPCore (x)
:name "2cbrt (problem 3.3.4)"
:precision binary64
(- (cbrt (+ x 1.0)) (cbrt x)))