\[\sqrt[3]{x + 1} - \sqrt[3]{x}
\]
↓
\[\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
t_1 := \sqrt[3]{-{\left(\frac{-1}{x}\right)}^{-1}}\\
\mathbf{if}\;t_0 - \sqrt[3]{x} \leq 5 \cdot 10^{-6}:\\
\;\;\;\;\frac{0.3333333333333333 \cdot t_1}{x} + \frac{t_1}{x \cdot x} \cdot -0.1111111111111111\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(1 + x\right) - x}{\sqrt[3]{{\left(1 + x\right)}^{2}} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + t_0\right)}\\
\end{array}
\]
(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
↓
(FPCore (x)
:precision binary64
(let* ((t_0 (cbrt (+ 1.0 x))) (t_1 (cbrt (- (pow (/ -1.0 x) -1.0)))))
(if (<= (- t_0 (cbrt x)) 5e-6)
(+
(/ (* 0.3333333333333333 t_1) x)
(* (/ t_1 (* x x)) -0.1111111111111111))
(/
(- (+ 1.0 x) x)
(+ (cbrt (pow (+ 1.0 x) 2.0)) (* (cbrt x) (+ (cbrt x) t_0)))))))double code(double x) {
return cbrt((x + 1.0)) - cbrt(x);
}
↓
double code(double x) {
double t_0 = cbrt((1.0 + x));
double t_1 = cbrt(-pow((-1.0 / x), -1.0));
double tmp;
if ((t_0 - cbrt(x)) <= 5e-6) {
tmp = ((0.3333333333333333 * t_1) / x) + ((t_1 / (x * x)) * -0.1111111111111111);
} else {
tmp = ((1.0 + x) - x) / (cbrt(pow((1.0 + x), 2.0)) + (cbrt(x) * (cbrt(x) + t_0)));
}
return tmp;
}
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));
double t_1 = Math.cbrt(-Math.pow((-1.0 / x), -1.0));
double tmp;
if ((t_0 - Math.cbrt(x)) <= 5e-6) {
tmp = ((0.3333333333333333 * t_1) / x) + ((t_1 / (x * x)) * -0.1111111111111111);
} else {
tmp = ((1.0 + x) - x) / (Math.cbrt(Math.pow((1.0 + x), 2.0)) + (Math.cbrt(x) * (Math.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(1.0 + x))
t_1 = cbrt(Float64(-(Float64(-1.0 / x) ^ -1.0)))
tmp = 0.0
if (Float64(t_0 - cbrt(x)) <= 5e-6)
tmp = Float64(Float64(Float64(0.3333333333333333 * t_1) / x) + Float64(Float64(t_1 / Float64(x * x)) * -0.1111111111111111));
else
tmp = Float64(Float64(Float64(1.0 + x) - x) / Float64(cbrt((Float64(1.0 + x) ^ 2.0)) + Float64(cbrt(x) * 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[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$1 = N[Power[(-N[Power[N[(-1.0 / x), $MachinePrecision], -1.0], $MachinePrecision]), 1/3], $MachinePrecision]}, If[LessEqual[N[(t$95$0 - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision], 5e-6], N[(N[(N[(0.3333333333333333 * t$95$1), $MachinePrecision] / x), $MachinePrecision] + N[(N[(t$95$1 / N[(x * x), $MachinePrecision]), $MachinePrecision] * -0.1111111111111111), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + x), $MachinePrecision] - x), $MachinePrecision] / N[(N[Power[N[Power[N[(1.0 + x), $MachinePrecision], 2.0], $MachinePrecision], 1/3], $MachinePrecision] + N[(N[Power[x, 1/3], $MachinePrecision] * 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]{1 + x}\\
t_1 := \sqrt[3]{-{\left(\frac{-1}{x}\right)}^{-1}}\\
\mathbf{if}\;t_0 - \sqrt[3]{x} \leq 5 \cdot 10^{-6}:\\
\;\;\;\;\frac{0.3333333333333333 \cdot t_1}{x} + \frac{t_1}{x \cdot x} \cdot -0.1111111111111111\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(1 + x\right) - x}{\sqrt[3]{{\left(1 + x\right)}^{2}} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + t_0\right)}\\
\end{array}