Average Error: 30.2 → 12.1
Time: 7.5s
Precision: 64
\[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
\[\begin{array}{l} \mathbf{if}\;x \le -4.525623377353304991893677634993147751034 \cdot 10^{61}:\\ \;\;\;\;\mathsf{fma}\left({\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}}, 0.3333333333333333148296162562473909929395, 0.06172839506172839163511412152729462832212 \cdot {\left(\frac{1}{{x}^{8}}\right)}^{\frac{1}{3}} - 0.1111111111111111049432054187491303309798 \cdot {\left(\frac{1}{{x}^{5}}\right)}^{\frac{1}{3}}\right)\\ \mathbf{elif}\;x \le 3466.285162327480520616518333554267883301:\\ \;\;\;\;\frac{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1} - \left(\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{x}}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left({\left(\frac{1}{{x}^{7}}\right)}^{\frac{1}{3}}, 0.0493827160493827133080912972218357026577, 0.6666666666666666296592325124947819858789 \cdot {\left(\frac{1}{x}\right)}^{\frac{1}{3}} - 0.1111111111111111049432054187491303309798 \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.525623377353304991893677634993147751034 \cdot 10^{61}:\\
\;\;\;\;\mathsf{fma}\left({\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}}, 0.3333333333333333148296162562473909929395, 0.06172839506172839163511412152729462832212 \cdot {\left(\frac{1}{{x}^{8}}\right)}^{\frac{1}{3}} - 0.1111111111111111049432054187491303309798 \cdot {\left(\frac{1}{{x}^{5}}\right)}^{\frac{1}{3}}\right)\\

\mathbf{elif}\;x \le 3466.285162327480520616518333554267883301:\\
\;\;\;\;\frac{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1} - \left(\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{x}}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\\

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left({\left(\frac{1}{{x}^{7}}\right)}^{\frac{1}{3}}, 0.0493827160493827133080912972218357026577, 0.6666666666666666296592325124947819858789 \cdot {\left(\frac{1}{x}\right)}^{\frac{1}{3}} - 0.1111111111111111049432054187491303309798 \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 r72787 = x;
        double r72788 = 1.0;
        double r72789 = r72787 + r72788;
        double r72790 = cbrt(r72789);
        double r72791 = cbrt(r72787);
        double r72792 = r72790 - r72791;
        return r72792;
}

double f(double x) {
        double r72793 = x;
        double r72794 = -4.525623377353305e+61;
        bool r72795 = r72793 <= r72794;
        double r72796 = 1.0;
        double r72797 = 2.0;
        double r72798 = pow(r72793, r72797);
        double r72799 = r72796 / r72798;
        double r72800 = 0.3333333333333333;
        double r72801 = pow(r72799, r72800);
        double r72802 = 0.3333333333333333;
        double r72803 = 0.06172839506172839;
        double r72804 = 8.0;
        double r72805 = pow(r72793, r72804);
        double r72806 = r72796 / r72805;
        double r72807 = pow(r72806, r72800);
        double r72808 = r72803 * r72807;
        double r72809 = 0.1111111111111111;
        double r72810 = 5.0;
        double r72811 = pow(r72793, r72810);
        double r72812 = r72796 / r72811;
        double r72813 = pow(r72812, r72800);
        double r72814 = r72809 * r72813;
        double r72815 = r72808 - r72814;
        double r72816 = fma(r72801, r72802, r72815);
        double r72817 = 3466.2851623274805;
        bool r72818 = r72793 <= r72817;
        double r72819 = 1.0;
        double r72820 = r72793 + r72819;
        double r72821 = cbrt(r72820);
        double r72822 = r72821 * r72821;
        double r72823 = cbrt(r72793);
        double r72824 = cbrt(r72823);
        double r72825 = r72824 * r72824;
        double r72826 = r72825 * r72824;
        double r72827 = r72826 * r72823;
        double r72828 = r72822 - r72827;
        double r72829 = r72821 + r72823;
        double r72830 = r72828 / r72829;
        double r72831 = 7.0;
        double r72832 = pow(r72793, r72831);
        double r72833 = r72796 / r72832;
        double r72834 = pow(r72833, r72800);
        double r72835 = 0.04938271604938271;
        double r72836 = 0.6666666666666666;
        double r72837 = r72796 / r72793;
        double r72838 = pow(r72837, r72800);
        double r72839 = r72836 * r72838;
        double r72840 = 4.0;
        double r72841 = pow(r72793, r72840);
        double r72842 = r72796 / r72841;
        double r72843 = pow(r72842, r72800);
        double r72844 = r72809 * r72843;
        double r72845 = r72839 - r72844;
        double r72846 = fma(r72834, r72835, r72845);
        double r72847 = r72846 / r72829;
        double r72848 = r72818 ? r72830 : r72847;
        double r72849 = r72795 ? r72816 : r72848;
        return r72849;
}

Error

Bits error versus x

Derivation

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

    1. Initial program 61.2

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

      \[\leadsto \color{blue}{\left(0.3333333333333333148296162562473909929395 \cdot {\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}} + 0.06172839506172839163511412152729462832212 \cdot {\left(\frac{1}{{x}^{8}}\right)}^{\frac{1}{3}}\right) - 0.1111111111111111049432054187491303309798 \cdot {\left(\frac{1}{{x}^{5}}\right)}^{\frac{1}{3}}}\]
    3. Simplified39.8

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

    if -4.525623377353305e+61 < x < 3466.2851623274805

    1. Initial program 4.9

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

      \[\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. Using strategy rm
    5. Applied add-cube-cbrt4.9

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

    if 3466.2851623274805 < 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.0493827160493827133080912972218357026577 \cdot {\left(\frac{1}{{x}^{7}}\right)}^{\frac{1}{3}} + 0.6666666666666666296592325124947819858789 \cdot {\left(\frac{1}{x}\right)}^{\frac{1}{3}}\right) - 0.1111111111111111049432054187491303309798 \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.0493827160493827133080912972218357026577, 0.6666666666666666296592325124947819858789 \cdot {\left(\frac{1}{x}\right)}^{\frac{1}{3}} - 0.1111111111111111049432054187491303309798 \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.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -4.525623377353304991893677634993147751034 \cdot 10^{61}:\\ \;\;\;\;\mathsf{fma}\left({\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}}, 0.3333333333333333148296162562473909929395, 0.06172839506172839163511412152729462832212 \cdot {\left(\frac{1}{{x}^{8}}\right)}^{\frac{1}{3}} - 0.1111111111111111049432054187491303309798 \cdot {\left(\frac{1}{{x}^{5}}\right)}^{\frac{1}{3}}\right)\\ \mathbf{elif}\;x \le 3466.285162327480520616518333554267883301:\\ \;\;\;\;\frac{\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1} - \left(\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{x}}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left({\left(\frac{1}{{x}^{7}}\right)}^{\frac{1}{3}}, 0.0493827160493827133080912972218357026577, 0.6666666666666666296592325124947819858789 \cdot {\left(\frac{1}{x}\right)}^{\frac{1}{3}} - 0.1111111111111111049432054187491303309798 \cdot {\left(\frac{1}{{x}^{4}}\right)}^{\frac{1}{3}}\right)}{\sqrt[3]{x + 1} + \sqrt[3]{x}}\\ \end{array}\]

Reproduce

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