| Alternative 1 | |
|---|---|
| Error | 30.1 |
| Cost | 13120 |
\[\sqrt[3]{x + 1} - \sqrt[3]{x}
\]
(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
(FPCore (x) :precision binary64 (+ 1.0 (- (cbrt (+ 1.0 x)) (- (cbrt x) -1.0))))
double code(double x) {
return cbrt((x + 1.0)) - cbrt(x);
}
double code(double x) {
return 1.0 + (cbrt((1.0 + x)) - (cbrt(x) - -1.0));
}
public static double code(double x) {
return Math.cbrt((x + 1.0)) - Math.cbrt(x);
}
public static double code(double x) {
return 1.0 + (Math.cbrt((1.0 + x)) - (Math.cbrt(x) - -1.0));
}
function code(x) return Float64(cbrt(Float64(x + 1.0)) - cbrt(x)) end
function code(x) return Float64(1.0 + Float64(cbrt(Float64(1.0 + x)) - Float64(cbrt(x) - -1.0))) end
code[x_] := N[(N[Power[N[(x + 1.0), $MachinePrecision], 1/3], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]
code[x_] := N[(1.0 + N[(N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision] - N[(N[Power[x, 1/3], $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\sqrt[3]{x + 1} - \sqrt[3]{x}
1 + \left(\sqrt[3]{1 + x} - \left(\sqrt[3]{x} - -1\right)\right)
Results
Initial program 30.1
Applied egg-rr30.1
Simplified29.8
[Start]30.1 | \[ 1 + \left(-1 - \left(\sqrt[3]{x} - \sqrt[3]{x + 1}\right)\right)
\] |
|---|---|
rational.json-simplify-44 [=>]29.8 | \[ 1 + \color{blue}{\left(\sqrt[3]{x + 1} - \left(\sqrt[3]{x} - -1\right)\right)}
\] |
rational.json-simplify-1 [=>]29.8 | \[ 1 + \left(\sqrt[3]{\color{blue}{1 + x}} - \left(\sqrt[3]{x} - -1\right)\right)
\] |
Final simplification29.8
| Alternative 1 | |
|---|---|
| Error | 30.1 |
| Cost | 13120 |
| Alternative 2 | |
|---|---|
| Error | 61.7 |
| Cost | 64 |
| Alternative 3 | |
|---|---|
| Error | 32.2 |
| Cost | 64 |
herbie shell --seed 2023077
(FPCore (x)
:name "2cbrt (problem 3.3.4)"
:precision binary64
(- (cbrt (+ x 1.0)) (cbrt x)))