(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
(FPCore (x)
:precision binary64
(let* ((t_0 (cbrt (+ x 1.0))))
(if (<= x -0.9923966394082389)
(fma
0.3333333333333333
(cbrt (/ 1.0 (* x x)))
(fma
0.06172839506172839
(cbrt (/ 1.0 (pow x 8.0)))
(fma
(cbrt (/ 1.0 (pow x 11.0)))
-0.0411522633744856
(* (cbrt (/ 1.0 (pow x 5.0))) -0.1111111111111111))))
(if (<= x 0.013917355932293938)
(- (pow (+ x 1.0) 0.3333333333333333) (cbrt x))
(/ 1.0 (+ (pow x 0.6666666666666666) (* t_0 (+ (cbrt x) t_0))))))))double code(double x) {
return cbrt((x + 1.0)) - cbrt(x);
}
double code(double x) {
double t_0 = cbrt((x + 1.0));
double tmp;
if (x <= -0.9923966394082389) {
tmp = fma(0.3333333333333333, cbrt((1.0 / (x * x))), fma(0.06172839506172839, cbrt((1.0 / pow(x, 8.0))), fma(cbrt((1.0 / pow(x, 11.0))), -0.0411522633744856, (cbrt((1.0 / pow(x, 5.0))) * -0.1111111111111111))));
} else if (x <= 0.013917355932293938) {
tmp = pow((x + 1.0), 0.3333333333333333) - cbrt(x);
} else {
tmp = 1.0 / (pow(x, 0.6666666666666666) + (t_0 * (cbrt(x) + t_0)));
}
return tmp;
}
function code(x) return Float64(cbrt(Float64(x + 1.0)) - cbrt(x)) end
function code(x) t_0 = cbrt(Float64(x + 1.0)) tmp = 0.0 if (x <= -0.9923966394082389) tmp = fma(0.3333333333333333, cbrt(Float64(1.0 / Float64(x * x))), fma(0.06172839506172839, cbrt(Float64(1.0 / (x ^ 8.0))), fma(cbrt(Float64(1.0 / (x ^ 11.0))), -0.0411522633744856, Float64(cbrt(Float64(1.0 / (x ^ 5.0))) * -0.1111111111111111)))); elseif (x <= 0.013917355932293938) tmp = Float64((Float64(x + 1.0) ^ 0.3333333333333333) - cbrt(x)); else tmp = Float64(1.0 / Float64((x ^ 0.6666666666666666) + Float64(t_0 * Float64(cbrt(x) + t_0)))); end return tmp 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[(x + 1.0), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[x, -0.9923966394082389], N[(0.3333333333333333 * N[Power[N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + N[(0.06172839506172839 * N[Power[N[(1.0 / N[Power[x, 8.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] + N[(N[Power[N[(1.0 / N[Power[x, 11.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * -0.0411522633744856 + N[(N[Power[N[(1.0 / N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * -0.1111111111111111), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.013917355932293938], N[(N[Power[N[(x + 1.0), $MachinePrecision], 0.3333333333333333], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Power[x, 0.6666666666666666], $MachinePrecision] + N[(t$95$0 * N[(N[Power[x, 1/3], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\sqrt[3]{x + 1} - \sqrt[3]{x}
\begin{array}{l}
t_0 := \sqrt[3]{x + 1}\\
\mathbf{if}\;x \leq -0.9923966394082389:\\
\;\;\;\;\mathsf{fma}\left(0.3333333333333333, \sqrt[3]{\frac{1}{x \cdot x}}, \mathsf{fma}\left(0.06172839506172839, \sqrt[3]{\frac{1}{{x}^{8}}}, \mathsf{fma}\left(\sqrt[3]{\frac{1}{{x}^{11}}}, -0.0411522633744856, \sqrt[3]{\frac{1}{{x}^{5}}} \cdot -0.1111111111111111\right)\right)\right)\\
\mathbf{elif}\;x \leq 0.013917355932293938:\\
\;\;\;\;{\left(x + 1\right)}^{0.3333333333333333} - \sqrt[3]{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{{x}^{0.6666666666666666} + t_0 \cdot \left(\sqrt[3]{x} + t_0\right)}\\
\end{array}



Bits error versus x
if x < -0.99239663940823886Initial program 59.7
Taylor expanded in x around inf 44.7
Simplified30.8
if -0.99239663940823886 < x < 0.0139173559322939375Initial program 0.0
Applied pow1/3_binary640.0
if 0.0139173559322939375 < x Initial program 59.7
Applied flip3--_binary6459.6
Simplified1.0
Simplified4.5
Final simplification8.8
herbie shell --seed 2022129
(FPCore (x)
:name "2cbrt (problem 3.3.4)"
:precision binary64
(- (cbrt (+ x 1.0)) (cbrt x)))