Average Error: 30.2 → 0.6
Time: 51.3s
Precision: binary64
Cost: 59976
\[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
\[\begin{array}{l} \mathbf{if}\;x \leq -1.0054527956503754 \lor \neg \left(x \leq 576.7628552642777\right):\\ \;\;\;\;\frac{\left(0.6666666666666666 \cdot \sqrt[3]{\frac{1}{x}} + 0.04938271604938271 \cdot \sqrt[3]{\frac{1}{{x}^{7}}}\right) - \left(0.1111111111111111 \cdot \sqrt[3]{\frac{1}{{x}^{4}}} + 0.02880658436213992 \cdot \sqrt[3]{\frac{1}{{x}^{10}}}\right)}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\\ \mathbf{else}:\\ \;\;\;\;{\left(x + 1\right)}^{0.3333333333333333} - \sqrt[3]{x}\\ \end{array}\]
\sqrt[3]{x + 1} - \sqrt[3]{x}
\begin{array}{l}
\mathbf{if}\;x \leq -1.0054527956503754 \lor \neg \left(x \leq 576.7628552642777\right):\\
\;\;\;\;\frac{\left(0.6666666666666666 \cdot \sqrt[3]{\frac{1}{x}} + 0.04938271604938271 \cdot \sqrt[3]{\frac{1}{{x}^{7}}}\right) - \left(0.1111111111111111 \cdot \sqrt[3]{\frac{1}{{x}^{4}}} + 0.02880658436213992 \cdot \sqrt[3]{\frac{1}{{x}^{10}}}\right)}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\\

\mathbf{else}:\\
\;\;\;\;{\left(x + 1\right)}^{0.3333333333333333} - \sqrt[3]{x}\\

\end{array}
(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
(FPCore (x)
 :precision binary64
 (if (or (<= x -1.0054527956503754) (not (<= x 576.7628552642777)))
   (/
    (-
     (+
      (* 0.6666666666666666 (cbrt (/ 1.0 x)))
      (* 0.04938271604938271 (cbrt (/ 1.0 (pow x 7.0)))))
     (+
      (* 0.1111111111111111 (cbrt (/ 1.0 (pow x 4.0))))
      (* 0.02880658436213992 (cbrt (/ 1.0 (pow x 10.0))))))
    (+ (cbrt (+ x 1.0)) (cbrt x)))
   (- (pow (+ x 1.0) 0.3333333333333333) (cbrt x))))
double code(double x) {
	return cbrt(x + 1.0) - cbrt(x);
}
double code(double x) {
	double tmp;
	if ((x <= -1.0054527956503754) || !(x <= 576.7628552642777)) {
		tmp = (((0.6666666666666666 * cbrt(1.0 / x)) + (0.04938271604938271 * cbrt(1.0 / pow(x, 7.0)))) - ((0.1111111111111111 * cbrt(1.0 / pow(x, 4.0))) + (0.02880658436213992 * cbrt(1.0 / pow(x, 10.0))))) / (cbrt(x + 1.0) + cbrt(x));
	} else {
		tmp = pow((x + 1.0), 0.3333333333333333) - cbrt(x);
	}
	return tmp;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error0.6
Cost46728
\[\begin{array}{l} \mathbf{if}\;x \leq -4332.041001643122 \lor \neg \left(x \leq 2693.05771023905\right):\\ \;\;\;\;\frac{0.04938271604938271 \cdot \sqrt[3]{\frac{1}{{x}^{7}}} + \left(0.6666666666666666 \cdot \sqrt[3]{\frac{1}{x}} - 0.1111111111111111 \cdot \sqrt[3]{\frac{1}{{x}^{4}}}\right)}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{x + 1} - \sqrt[3]{\sqrt[3]{x}} \cdot \left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right)\\ \end{array}\]
Alternative 2
Error0.7
Cost33480
\[\begin{array}{l} \mathbf{if}\;x \leq -105352.56770425299 \lor \neg \left(x \leq 63605.802848912346\right):\\ \;\;\;\;\frac{0.6666666666666666 \cdot \sqrt[3]{\frac{1}{x}} - 0.1111111111111111 \cdot \sqrt[3]{\frac{1}{{x}^{4}}}}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1} - \sqrt[3]{x \cdot x}}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\\ \end{array}\]
Alternative 3
Error0.8
Cost26824
\[\begin{array}{l} \mathbf{if}\;x \leq -25266815.562077403 \lor \neg \left(x \leq 56905652.54357344\right):\\ \;\;\;\;\frac{0.6666666666666666 \cdot \sqrt[3]{\frac{1}{x}}}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{1 + {x}^{3}}}{\sqrt[3]{x \cdot x + \left(1 - x\right)}} - \sqrt[3]{x}\\ \end{array}\]
Alternative 4
Error0.8
Cost20232
\[\begin{array}{l} \mathbf{if}\;x \leq -13625869.572864452 \lor \neg \left(x \leq 18145458.081923485\right):\\ \;\;\;\;\frac{0.6666666666666666 \cdot \sqrt[3]{\frac{1}{x}}}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{x \cdot x + -1}}{\sqrt[3]{x + -1}} - \sqrt[3]{x}\\ \end{array}\]
Alternative 5
Error16.2
Cost20232
\[\begin{array}{l} \mathbf{if}\;x \leq -30197579.700860236 \lor \neg \left(x \leq 19112764.660132885\right):\\ \;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{1}{x \cdot x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{x \cdot x + -1}}{\sqrt[3]{x + -1}} - \sqrt[3]{x}\\ \end{array}\]
Alternative 6
Error16.1
Cost13448
\[\begin{array}{l} \mathbf{if}\;x \leq -50261857.06093893 \lor \neg \left(x \leq 21047377.816551685\right):\\ \;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{1}{x \cdot x}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{x + 1} - \sqrt[3]{x}\\ \end{array}\]
Alternative 7
Error16.6
Cost7688
\[\begin{array}{l} \mathbf{if}\;x \leq -1.0054527956503754 \lor \neg \left(x \leq 1.257388279530115\right):\\ \;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{1}{x \cdot x}}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(x \cdot \left(0.3333333333333333 + x \cdot \left(x \cdot 0.06172839506172839 + -0.1111111111111111\right)\right) - \sqrt[3]{x}\right)\\ \end{array}\]
Alternative 8
Error16.6
Cost7432
\[\begin{array}{l} \mathbf{if}\;x \leq -1.0054527956503754 \lor \neg \left(x \leq 1.0270220023312078\right):\\ \;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{1}{x \cdot x}}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + x \cdot \left(0.3333333333333333 - x \cdot 0.1111111111111111\right)\right) - \sqrt[3]{x}\\ \end{array}\]
Alternative 9
Error16.7
Cost7176
\[\begin{array}{l} \mathbf{if}\;x \leq -1.0054527956503754 \lor \neg \left(x \leq 1.0270220023312078\right):\\ \;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{1}{x \cdot x}}\\ \mathbf{else}:\\ \;\;\;\;1 + \left(x \cdot 0.3333333333333333 - \sqrt[3]{x}\right)\\ \end{array}\]
Alternative 10
Error16.7
Cost7176
\[\begin{array}{l} \mathbf{if}\;x \leq -1.0054527956503754 \lor \neg \left(x \leq 1.0270220023312078\right):\\ \;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{1}{x \cdot x}}\\ \mathbf{else}:\\ \;\;\;\;\left(1 + x \cdot 0.3333333333333333\right) - \sqrt[3]{x}\\ \end{array}\]
Alternative 11
Error31.8
Cost6592
\[1 - \sqrt[3]{x}\]
Alternative 12
Error32.3
Cost64
\[1\]
Alternative 13
Error61.7
Cost64
\[0\]

Error

Derivation

  1. Split input into 2 regimes
  2. if x < -1.0054527956503754 or 576.76285526427773 < x

    1. Initial program 59.6

      \[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
    2. Using strategy rm
    3. Applied flip--_binary64_5359.6

      \[\leadsto \color{blue}{\frac{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1} - \sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{x + 1} + \sqrt[3]{x}}}\]
    4. Simplified61.7

      \[\leadsto \frac{\color{blue}{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1} - {x}^{0.6666666666666666}}}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\]
    5. Taylor expanded around inf 35.6

      \[\leadsto \frac{\color{blue}{\left(0.04938271604938271 \cdot {\left(\frac{1}{{x}^{7}}\right)}^{0.3333333333333333} + 0.6666666666666666 \cdot {\left(\frac{1}{x}\right)}^{0.3333333333333333}\right) - \left(0.02880658436213992 \cdot {\left(\frac{1}{{x}^{10}}\right)}^{0.3333333333333333} + 0.1111111111111111 \cdot {\left(\frac{1}{{x}^{4}}\right)}^{0.3333333333333333}\right)}}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\]
    6. Simplified1.1

      \[\leadsto \frac{\color{blue}{\left(0.6666666666666666 \cdot \sqrt[3]{\frac{1}{x}} + 0.04938271604938271 \cdot \sqrt[3]{\frac{1}{{x}^{7}}}\right) - \left(0.1111111111111111 \cdot \sqrt[3]{\frac{1}{{x}^{4}}} + 0.02880658436213992 \cdot \sqrt[3]{\frac{1}{{x}^{10}}}\right)}}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\]
    7. Simplified1.1

      \[\leadsto \color{blue}{\frac{\left(0.6666666666666666 \cdot \sqrt[3]{\frac{1}{x}} + 0.04938271604938271 \cdot \sqrt[3]{\frac{1}{{x}^{7}}}\right) - \left(0.1111111111111111 \cdot \sqrt[3]{\frac{1}{{x}^{4}}} + 0.02880658436213992 \cdot \sqrt[3]{\frac{1}{{x}^{10}}}\right)}{\sqrt[3]{1 + x} + \sqrt[3]{x}}}\]

    if -1.0054527956503754 < x < 576.76285526427773

    1. Initial program 0.0

      \[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
    2. Using strategy rm
    3. Applied sub-neg_binary64_710.0

      \[\leadsto \color{blue}{\sqrt[3]{x + 1} + \left(-\sqrt[3]{x}\right)}\]
    4. Using strategy rm
    5. Applied pow1/3_binary64_1600.0

      \[\leadsto \color{blue}{{\left(x + 1\right)}^{0.3333333333333333}} + \left(-\sqrt[3]{x}\right)\]
    6. Simplified0.0

      \[\leadsto \color{blue}{{\left(1 + x\right)}^{0.3333333333333333} - \sqrt[3]{x}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.0054527956503754 \lor \neg \left(x \leq 576.7628552642777\right):\\ \;\;\;\;\frac{\left(0.6666666666666666 \cdot \sqrt[3]{\frac{1}{x}} + 0.04938271604938271 \cdot \sqrt[3]{\frac{1}{{x}^{7}}}\right) - \left(0.1111111111111111 \cdot \sqrt[3]{\frac{1}{{x}^{4}}} + 0.02880658436213992 \cdot \sqrt[3]{\frac{1}{{x}^{10}}}\right)}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\\ \mathbf{else}:\\ \;\;\;\;{\left(x + 1\right)}^{0.3333333333333333} - \sqrt[3]{x}\\ \end{array}\]

Reproduce

herbie shell --seed 2021014 
(FPCore (x)
  :name "2cbrt (problem 3.3.4)"
  :precision binary64
  (- (cbrt (+ x 1.0)) (cbrt x)))