?

Average Error: 58.7 → 0.0
Time: 9.4s
Precision: binary64
Cost: 13632

?

\[0 \leq x \land x \leq 1\]
\[\sqrt[3]{1 + x} - 1 \]
\[\begin{array}{l} t_0 := \sqrt[3]{x + 1}\\ \frac{x}{1 + t_0 \cdot \left(1 + t_0\right)} \end{array} \]
(FPCore (x) :precision binary64 (- (cbrt (+ 1.0 x)) 1.0))
(FPCore (x)
 :precision binary64
 (let* ((t_0 (cbrt (+ x 1.0)))) (/ x (+ 1.0 (* t_0 (+ 1.0 t_0))))))
double code(double x) {
	return cbrt((1.0 + x)) - 1.0;
}
double code(double x) {
	double t_0 = cbrt((x + 1.0));
	return x / (1.0 + (t_0 * (1.0 + t_0)));
}
public static double code(double x) {
	return Math.cbrt((1.0 + x)) - 1.0;
}
public static double code(double x) {
	double t_0 = Math.cbrt((x + 1.0));
	return x / (1.0 + (t_0 * (1.0 + t_0)));
}
function code(x)
	return Float64(cbrt(Float64(1.0 + x)) - 1.0)
end
function code(x)
	t_0 = cbrt(Float64(x + 1.0))
	return Float64(x / Float64(1.0 + Float64(t_0 * Float64(1.0 + t_0))))
end
code[x_] := N[(N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision] - 1.0), $MachinePrecision]
code[x_] := Block[{t$95$0 = N[Power[N[(x + 1.0), $MachinePrecision], 1/3], $MachinePrecision]}, N[(x / N[(1.0 + N[(t$95$0 * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\sqrt[3]{1 + x} - 1
\begin{array}{l}
t_0 := \sqrt[3]{x + 1}\\
\frac{x}{1 + t_0 \cdot \left(1 + t_0\right)}
\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 58.7

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

    \[\leadsto \color{blue}{x \cdot \frac{1}{{\left(\sqrt[3]{1 + x}\right)}^{2} + \left(1 + \sqrt[3]{1 + x}\right)}} \]
  3. Simplified0.0

    \[\leadsto \color{blue}{\frac{x}{1 + \sqrt[3]{x + 1} \cdot \left(1 + \sqrt[3]{x + 1}\right)}} \]
    Proof

    [Start]0.3

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

    associate-*r/ [=>]0.0

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

    *-rgt-identity [=>]0.0

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

    associate-+r+ [=>]0.0

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

    metadata-eval [<=]0.0

    \[ \frac{x}{\left({\left(\sqrt[3]{1 + x}\right)}^{2} + \color{blue}{\left(1 - 0\right)}\right) + \sqrt[3]{1 + x}} \]

    associate--l+ [<=]0.0

    \[ \frac{x}{\color{blue}{\left(\left({\left(\sqrt[3]{1 + x}\right)}^{2} + 1\right) - 0\right)} + \sqrt[3]{1 + x}} \]

    associate--r- [<=]0.0

    \[ \frac{x}{\color{blue}{\left({\left(\sqrt[3]{1 + x}\right)}^{2} + 1\right) - \left(0 - \sqrt[3]{1 + x}\right)}} \]

    neg-sub0 [<=]0.0

    \[ \frac{x}{\left({\left(\sqrt[3]{1 + x}\right)}^{2} + 1\right) - \color{blue}{\left(-\sqrt[3]{1 + x}\right)}} \]

    mul-1-neg [<=]0.0

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

    *-commutative [<=]0.0

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

    associate-+r- [<=]0.0

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

    +-commutative [=>]0.0

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

    cancel-sign-sub-inv [=>]0.0

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

    associate-+l+ [=>]0.0

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

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

Alternatives

Alternative 1
Error0.3
Cost12992
\[\mathsf{expm1}\left(0.3333333333333333 \cdot \mathsf{log1p}\left(x\right)\right) \]
Alternative 2
Error0.4
Cost7104
\[\frac{x}{1 + \left(2 + \mathsf{fma}\left(x \cdot x, -0.2222222222222222, x\right)\right)} \]
Alternative 3
Error1.0
Cost448
\[x \cdot \left(0.3333333333333333 + x \cdot -0.1111111111111111\right) \]
Alternative 4
Error0.6
Cost448
\[\frac{x}{1 + \left(x + 2\right)} \]
Alternative 5
Error1.6
Cost192
\[x \cdot 0.3333333333333333 \]
Alternative 6
Error1.3
Cost192
\[\frac{x}{3} \]
Alternative 7
Error62.6
Cost64
\[-1 \]
Alternative 8
Error52.7
Cost64
\[x \]

Error

Reproduce?

herbie shell --seed 1 
(FPCore (x)
  :name "cbrt(1+x)-1"
  :precision binary64
  :pre (and (<= 0.0 x) (<= x 1.0))
  (- (cbrt (+ 1.0 x)) 1.0))