Average Error: 29.8 → 12.2
Time: 5.5s
Precision: 64
\[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -4.45528114356724952 \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 2758.73681089307456:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}}, \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.45528114356724952 \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 2758.73681089307456:\\
\;\;\;\;\mathsf{fma}\left(\sqrt[3]{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}}, \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 r53473 = x;
        double r53474 = 1.0;
        double r53475 = r53473 + r53474;
        double r53476 = cbrt(r53475);
        double r53477 = cbrt(r53473);
        double r53478 = r53476 - r53477;
        return r53478;
}

double f(double x) {
        double r53479 = x;
        double r53480 = -4.4552811435672495e+61;
        bool r53481 = r53479 <= r53480;
        double r53482 = 1.0;
        double r53483 = 2.0;
        double r53484 = pow(r53479, r53483);
        double r53485 = r53482 / r53484;
        double r53486 = 0.3333333333333333;
        double r53487 = pow(r53485, r53486);
        double r53488 = 0.3333333333333333;
        double r53489 = 0.06172839506172839;
        double r53490 = 8.0;
        double r53491 = pow(r53479, r53490);
        double r53492 = r53482 / r53491;
        double r53493 = pow(r53492, r53486);
        double r53494 = r53489 * r53493;
        double r53495 = 0.1111111111111111;
        double r53496 = 5.0;
        double r53497 = pow(r53479, r53496);
        double r53498 = r53482 / r53497;
        double r53499 = pow(r53498, r53486);
        double r53500 = r53495 * r53499;
        double r53501 = r53494 - r53500;
        double r53502 = fma(r53487, r53488, r53501);
        double r53503 = 2758.7368108930746;
        bool r53504 = r53479 <= r53503;
        double r53505 = 1.0;
        double r53506 = r53479 + r53505;
        double r53507 = cbrt(r53506);
        double r53508 = r53507 * r53507;
        double r53509 = cbrt(r53508);
        double r53510 = cbrt(r53507);
        double r53511 = cbrt(r53479);
        double r53512 = -r53511;
        double r53513 = fma(r53509, r53510, r53512);
        double r53514 = 7.0;
        double r53515 = pow(r53479, r53514);
        double r53516 = r53482 / r53515;
        double r53517 = pow(r53516, r53486);
        double r53518 = 0.04938271604938271;
        double r53519 = 0.6666666666666666;
        double r53520 = r53482 / r53479;
        double r53521 = pow(r53520, r53486);
        double r53522 = r53519 * r53521;
        double r53523 = 4.0;
        double r53524 = pow(r53479, r53523);
        double r53525 = r53482 / r53524;
        double r53526 = pow(r53525, r53486);
        double r53527 = r53495 * r53526;
        double r53528 = r53522 - r53527;
        double r53529 = fma(r53517, r53518, r53528);
        double r53530 = r53507 + r53511;
        double r53531 = r53529 / r53530;
        double r53532 = r53504 ? r53513 : r53531;
        double r53533 = r53481 ? r53502 : r53532;
        return r53533;
}

Error

Bits error versus x

Derivation

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

    1. Initial program 61.2

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

      \[\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. Simplified41.0

      \[\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.4552811435672495e+61 < x < 2758.7368108930746

    1. Initial program 5.1

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

      \[\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.1

      \[\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-neg5.1

      \[\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)}\]

    if 2758.7368108930746 < x

    1. Initial program 60.3

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

      \[\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 simplification12.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -4.45528114356724952 \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 2758.73681089307456:\\ \;\;\;\;\mathsf{fma}\left(\sqrt[3]{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}}, \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 2020057 +o rules:numerics
(FPCore (x)
  :name "2cbrt (problem 3.3.4)"
  :precision binary64
  (- (cbrt (+ x 1)) (cbrt x)))