Average Error: 29.7 → 0.3
Time: 6.3s
Precision: binary64
\[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
\[\begin{array}{l} t_0 := \sqrt[3]{1 + x}\\ \frac{1}{\mathsf{fma}\left(t_0, t_0, \sqrt[3]{x} \cdot \sqrt[3]{x} + t_0 \cdot \sqrt[3]{x}\right)} \end{array} \]
\sqrt[3]{x + 1} - \sqrt[3]{x}
\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
\frac{1}{\mathsf{fma}\left(t_0, t_0, \sqrt[3]{x} \cdot \sqrt[3]{x} + t_0 \cdot \sqrt[3]{x}\right)}
\end{array}
(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
(FPCore (x)
 :precision binary64
 (let* ((t_0 (cbrt (+ 1.0 x))))
   (/ 1.0 (fma t_0 t_0 (+ (* (cbrt x) (cbrt x)) (* t_0 (cbrt x)))))))
double code(double x) {
	return cbrt(x + 1.0) - cbrt(x);
}
double code(double x) {
	double t_0 = cbrt(1.0 + x);
	return 1.0 / fma(t_0, t_0, ((cbrt(x) * cbrt(x)) + (t_0 * cbrt(x))));
}

Error

Bits error versus x

Derivation

  1. Initial program 29.7

    \[\sqrt[3]{x + 1} - \sqrt[3]{x} \]
  2. Applied flip3--_binary6429.5

    \[\leadsto \color{blue}{\frac{{\left(\sqrt[3]{x + 1}\right)}^{3} - {\left(\sqrt[3]{x}\right)}^{3}}{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{x + 1} \cdot \sqrt[3]{x}\right)}} \]
  3. Taylor expanded in x around 0 0.3

    \[\leadsto \frac{\color{blue}{1}}{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{x + 1} \cdot \sqrt[3]{x}\right)} \]
  4. Applied fma-def_binary640.3

    \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(\sqrt[3]{x + 1}, \sqrt[3]{x + 1}, \sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{x + 1} \cdot \sqrt[3]{x}\right)}} \]
  5. Final simplification0.3

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

Reproduce

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