Average Error: 29.6 → 0.5
Time: 13.5s
Precision: 64
Internal Precision: 128
\[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
\[\begin{array}{l} \mathbf{if}\;\sqrt[3]{1 + x} - \sqrt[3]{x} \le 1.7627915696039054 \cdot 10^{-05}:\\ \;\;\;\;\left(\sqrt[3]{x} - \sqrt[3]{-1} \cdot \sqrt[3]{-x}\right) + \left(\frac{\frac{-1}{9}}{x} + \frac{1}{3}\right) \cdot \frac{\sqrt[3]{x}}{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{1 + x} - \sqrt[3]{x}\\ \end{array}\]

Error

Bits error versus x

Derivation

  1. Split input into 2 regimes
  2. if (- (cbrt (+ x 1)) (cbrt x)) < 1.7627915696039054e-05

    1. Initial program 60.5

      \[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
    2. Taylor expanded around 0 61.1

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{\frac{1}{3}}}\]
    3. Simplified60.5

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{\sqrt[3]{x}}\]
    4. Taylor expanded around 0 61.1

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{\frac{1}{3}}}\]
    5. Simplified60.5

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{\sqrt[3]{x}}\]
    6. Taylor expanded around -inf 62.4

      \[\leadsto \color{blue}{\left(e^{\frac{1}{3} \cdot \left(\log -1 - \log \left(\frac{-1}{x}\right)\right)} + \frac{1}{3} \cdot \frac{e^{\frac{1}{3} \cdot \left(\log -1 - \log \left(\frac{-1}{x}\right)\right)}}{x}\right) - \left({\left(x \cdot -1\right)}^{\frac{1}{3}} \cdot \sqrt[3]{-1} + \frac{1}{9} \cdot \frac{e^{\frac{1}{3} \cdot \left(\log -1 - \log \left(\frac{-1}{x}\right)\right)}}{{x}^{2}}\right)}\]
    7. Simplified0.6

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

    if 1.7627915696039054e-05 < (- (cbrt (+ x 1)) (cbrt x))

    1. Initial program 0.3

      \[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
    2. Taylor expanded around 0 31.2

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{\frac{1}{3}}}\]
    3. Simplified0.3

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{\sqrt[3]{x}}\]
    4. Taylor expanded around 0 31.2

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{\frac{1}{3}}}\]
    5. Simplified0.3

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{\sqrt[3]{x}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt[3]{1 + x} - \sqrt[3]{x} \le 1.7627915696039054 \cdot 10^{-05}:\\ \;\;\;\;\left(\sqrt[3]{x} - \sqrt[3]{-1} \cdot \sqrt[3]{-x}\right) + \left(\frac{\frac{-1}{9}}{x} + \frac{1}{3}\right) \cdot \frac{\sqrt[3]{x}}{x}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{1 + x} - \sqrt[3]{x}\\ \end{array}\]

Reproduce

herbie shell --seed 2019090 
(FPCore (x)
  :name "2cbrt (problem 3.3.4)"
  (- (cbrt (+ x 1)) (cbrt x)))