Average Error: 30.4 → 11.7
Time: 6.1s
Precision: 64
\[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -4.4424562017088699 \cdot 10^{61}:\\ \;\;\;\;\mathsf{fma}\left({\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}}, 0.333333333333333315, 0.061728395061728392 \cdot {\left(\frac{1}{{x}^{8}}\right)}^{\frac{1}{3}} - 0.1111111111111111 \cdot {\left(\frac{1}{{x}^{5}}\right)}^{\frac{1}{3}}\right)\\ \mathbf{elif}\;x \le 3388.19456960033722:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{\sqrt[3]{x + 1} \cdot \sqrt[3]{{x}^{3} + {1}^{3}}}{\sqrt[3]{x \cdot x + \left(1 \cdot 1 - x \cdot 1\right)}}}, \sqrt[3]{\sqrt[3]{x + 1}}, -\sqrt[3]{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left({\left(\frac{1}{{x}^{7}}\right)}^{\frac{1}{3}}, 0.04938271604938271, 0.66666666666666663 \cdot {\left(\frac{1}{x}\right)}^{\frac{1}{3}} - 0.1111111111111111 \cdot {\left(\frac{1}{{x}^{4}}\right)}^{\frac{1}{3}}\right)}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\\ \end{array}\]
\sqrt[3]{x + 1} - \sqrt[3]{x}
\begin{array}{l}
\mathbf{if}\;x \le -4.4424562017088699 \cdot 10^{61}:\\
\;\;\;\;\mathsf{fma}\left({\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}}, 0.333333333333333315, 0.061728395061728392 \cdot {\left(\frac{1}{{x}^{8}}\right)}^{\frac{1}{3}} - 0.1111111111111111 \cdot {\left(\frac{1}{{x}^{5}}\right)}^{\frac{1}{3}}\right)\\

\mathbf{elif}\;x \le 3388.19456960033722:\\
\;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{\sqrt[3]{x + 1} \cdot \sqrt[3]{{x}^{3} + {1}^{3}}}{\sqrt[3]{x \cdot x + \left(1 \cdot 1 - x \cdot 1\right)}}}, \sqrt[3]{\sqrt[3]{x + 1}}, -\sqrt[3]{x}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left({\left(\frac{1}{{x}^{7}}\right)}^{\frac{1}{3}}, 0.04938271604938271, 0.66666666666666663 \cdot {\left(\frac{1}{x}\right)}^{\frac{1}{3}} - 0.1111111111111111 \cdot {\left(\frac{1}{{x}^{4}}\right)}^{\frac{1}{3}}\right)}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\\

\end{array}
double f(double x) {
        double r77191 = x;
        double r77192 = 1.0;
        double r77193 = r77191 + r77192;
        double r77194 = cbrt(r77193);
        double r77195 = cbrt(r77191);
        double r77196 = r77194 - r77195;
        return r77196;
}

double f(double x) {
        double r77197 = x;
        double r77198 = -4.44245620170887e+61;
        bool r77199 = r77197 <= r77198;
        double r77200 = 1.0;
        double r77201 = 2.0;
        double r77202 = pow(r77197, r77201);
        double r77203 = r77200 / r77202;
        double r77204 = 0.3333333333333333;
        double r77205 = pow(r77203, r77204);
        double r77206 = 0.3333333333333333;
        double r77207 = 0.06172839506172839;
        double r77208 = 8.0;
        double r77209 = pow(r77197, r77208);
        double r77210 = r77200 / r77209;
        double r77211 = pow(r77210, r77204);
        double r77212 = r77207 * r77211;
        double r77213 = 0.1111111111111111;
        double r77214 = 5.0;
        double r77215 = pow(r77197, r77214);
        double r77216 = r77200 / r77215;
        double r77217 = pow(r77216, r77204);
        double r77218 = r77213 * r77217;
        double r77219 = r77212 - r77218;
        double r77220 = fma(r77205, r77206, r77219);
        double r77221 = 3388.194569600337;
        bool r77222 = r77197 <= r77221;
        double r77223 = 1.0;
        double r77224 = r77197 + r77223;
        double r77225 = cbrt(r77224);
        double r77226 = 3.0;
        double r77227 = pow(r77197, r77226);
        double r77228 = pow(r77223, r77226);
        double r77229 = r77227 + r77228;
        double r77230 = cbrt(r77229);
        double r77231 = r77225 * r77230;
        double r77232 = r77197 * r77197;
        double r77233 = r77223 * r77223;
        double r77234 = r77197 * r77223;
        double r77235 = r77233 - r77234;
        double r77236 = r77232 + r77235;
        double r77237 = cbrt(r77236);
        double r77238 = r77231 / r77237;
        double r77239 = cbrt(r77238);
        double r77240 = cbrt(r77225);
        double r77241 = cbrt(r77197);
        double r77242 = -r77241;
        double r77243 = fma(r77239, r77240, r77242);
        double r77244 = 7.0;
        double r77245 = pow(r77197, r77244);
        double r77246 = r77200 / r77245;
        double r77247 = pow(r77246, r77204);
        double r77248 = 0.04938271604938271;
        double r77249 = 0.6666666666666666;
        double r77250 = r77200 / r77197;
        double r77251 = pow(r77250, r77204);
        double r77252 = r77249 * r77251;
        double r77253 = 4.0;
        double r77254 = pow(r77197, r77253);
        double r77255 = r77200 / r77254;
        double r77256 = pow(r77255, r77204);
        double r77257 = r77213 * r77256;
        double r77258 = r77252 - r77257;
        double r77259 = fma(r77247, r77248, r77258);
        double r77260 = r77225 + r77241;
        double r77261 = r77259 / r77260;
        double r77262 = r77222 ? r77243 : r77261;
        double r77263 = r77199 ? r77220 : r77262;
        return r77263;
}

Error

Bits error versus x

Derivation

  1. Split input into 3 regimes
  2. if x < -4.44245620170887e+61

    1. Initial program 61.2

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

      \[\leadsto \color{blue}{\left(0.333333333333333315 \cdot {\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}} + 0.061728395061728392 \cdot {\left(\frac{1}{{x}^{8}}\right)}^{\frac{1}{3}}\right) - 0.1111111111111111 \cdot {\left(\frac{1}{{x}^{5}}\right)}^{\frac{1}{3}}}\]
    3. Simplified38.9

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}}, 0.333333333333333315, 0.061728395061728392 \cdot {\left(\frac{1}{{x}^{8}}\right)}^{\frac{1}{3}} - 0.1111111111111111 \cdot {\left(\frac{1}{{x}^{5}}\right)}^{\frac{1}{3}}\right)}\]

    if -4.44245620170887e+61 < x < 3388.194569600337

    1. Initial program 5.0

      \[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt5.0

      \[\leadsto \sqrt[3]{\color{blue}{\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{x + 1}}} - \sqrt[3]{x}\]
    4. Applied cbrt-prod5.0

      \[\leadsto \color{blue}{\sqrt[3]{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}} \cdot \sqrt[3]{\sqrt[3]{x + 1}}} - \sqrt[3]{x}\]
    5. Applied fma-neg4.9

      \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt[3]{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}}, \sqrt[3]{\sqrt[3]{x + 1}}, -\sqrt[3]{x}\right)}\]
    6. Using strategy rm
    7. Applied flip3-+4.9

      \[\leadsto \mathsf{fma}\left(\sqrt[3]{\sqrt[3]{x + 1} \cdot \sqrt[3]{\color{blue}{\frac{{x}^{3} + {1}^{3}}{x \cdot x + \left(1 \cdot 1 - x \cdot 1\right)}}}}, \sqrt[3]{\sqrt[3]{x + 1}}, -\sqrt[3]{x}\right)\]
    8. Applied cbrt-div4.9

      \[\leadsto \mathsf{fma}\left(\sqrt[3]{\sqrt[3]{x + 1} \cdot \color{blue}{\frac{\sqrt[3]{{x}^{3} + {1}^{3}}}{\sqrt[3]{x \cdot x + \left(1 \cdot 1 - x \cdot 1\right)}}}}, \sqrt[3]{\sqrt[3]{x + 1}}, -\sqrt[3]{x}\right)\]
    9. Applied associate-*r/4.9

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

    if 3388.194569600337 < x

    1. Initial program 60.2

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

      \[\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. Taylor expanded around inf 5.1

      \[\leadsto \frac{\color{blue}{\left(0.04938271604938271 \cdot {\left(\frac{1}{{x}^{7}}\right)}^{\frac{1}{3}} + 0.66666666666666663 \cdot {\left(\frac{1}{x}\right)}^{\frac{1}{3}}\right) - 0.1111111111111111 \cdot {\left(\frac{1}{{x}^{4}}\right)}^{\frac{1}{3}}}}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\]
    5. Simplified5.1

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left({\left(\frac{1}{{x}^{7}}\right)}^{\frac{1}{3}}, 0.04938271604938271, 0.66666666666666663 \cdot {\left(\frac{1}{x}\right)}^{\frac{1}{3}} - 0.1111111111111111 \cdot {\left(\frac{1}{{x}^{4}}\right)}^{\frac{1}{3}}\right)}}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification11.7

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -4.4424562017088699 \cdot 10^{61}:\\ \;\;\;\;\mathsf{fma}\left({\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}}, 0.333333333333333315, 0.061728395061728392 \cdot {\left(\frac{1}{{x}^{8}}\right)}^{\frac{1}{3}} - 0.1111111111111111 \cdot {\left(\frac{1}{{x}^{5}}\right)}^{\frac{1}{3}}\right)\\ \mathbf{elif}\;x \le 3388.19456960033722:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\frac{\sqrt[3]{x + 1} \cdot \sqrt[3]{{x}^{3} + {1}^{3}}}{\sqrt[3]{x \cdot x + \left(1 \cdot 1 - x \cdot 1\right)}}}, \sqrt[3]{\sqrt[3]{x + 1}}, -\sqrt[3]{x}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left({\left(\frac{1}{{x}^{7}}\right)}^{\frac{1}{3}}, 0.04938271604938271, 0.66666666666666663 \cdot {\left(\frac{1}{x}\right)}^{\frac{1}{3}} - 0.1111111111111111 \cdot {\left(\frac{1}{{x}^{4}}\right)}^{\frac{1}{3}}\right)}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\\ \end{array}\]

Reproduce

herbie shell --seed 2020060 +o rules:numerics
(FPCore (x)
  :name "2cbrt (problem 3.3.4)"
  :precision binary64
  (- (cbrt (+ x 1)) (cbrt x)))