Average Error: 30.1 → 0.6
Time: 22.8s
Precision: 64
\[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
\[\begin{array}{l} \mathbf{if}\;\sqrt[3]{x + 1} - \sqrt[3]{x} \le 5.649099 \cdot 10^{-7}:\\ \;\;\;\;\left(\frac{\sqrt[3]{x}}{\frac{x}{0.333333333333333315}} + \left(\sqrt[3]{x} - \sqrt[3]{-1} \cdot \sqrt[3]{-x}\right)\right) - \frac{0.1111111111111111}{x \cdot x} \cdot \sqrt[3]{x}\\ \mathbf{else}:\\ \;\;\;\;\log \left(e^{\frac{\frac{\sqrt[3]{{x}^{6} - {1}^{6}}}{\sqrt[3]{\left(1 \cdot 1\right) \cdot \left(1 \cdot 1 + x \cdot x\right) + {x}^{4}}}}{\sqrt[3]{x - 1}} - \sqrt[3]{x}}\right)\\ \end{array}\]
\sqrt[3]{x + 1} - \sqrt[3]{x}
\begin{array}{l}
\mathbf{if}\;\sqrt[3]{x + 1} - \sqrt[3]{x} \le 5.649099 \cdot 10^{-7}:\\
\;\;\;\;\left(\frac{\sqrt[3]{x}}{\frac{x}{0.333333333333333315}} + \left(\sqrt[3]{x} - \sqrt[3]{-1} \cdot \sqrt[3]{-x}\right)\right) - \frac{0.1111111111111111}{x \cdot x} \cdot \sqrt[3]{x}\\

\mathbf{else}:\\
\;\;\;\;\log \left(e^{\frac{\frac{\sqrt[3]{{x}^{6} - {1}^{6}}}{\sqrt[3]{\left(1 \cdot 1\right) \cdot \left(1 \cdot 1 + x \cdot x\right) + {x}^{4}}}}{\sqrt[3]{x - 1}} - \sqrt[3]{x}}\right)\\

\end{array}
double f(double x) {
        double r76117 = x;
        double r76118 = 1.0;
        double r76119 = r76117 + r76118;
        double r76120 = cbrt(r76119);
        double r76121 = cbrt(r76117);
        double r76122 = r76120 - r76121;
        return r76122;
}

double f(double x) {
        double r76123 = x;
        double r76124 = 1.0;
        double r76125 = r76123 + r76124;
        double r76126 = cbrt(r76125);
        double r76127 = cbrt(r76123);
        double r76128 = r76126 - r76127;
        double r76129 = 5.6490989663871e-07;
        bool r76130 = r76128 <= r76129;
        double r76131 = 0.3333333333333333;
        double r76132 = r76123 / r76131;
        double r76133 = r76127 / r76132;
        double r76134 = -1.0;
        double r76135 = cbrt(r76134);
        double r76136 = -r76123;
        double r76137 = cbrt(r76136);
        double r76138 = r76135 * r76137;
        double r76139 = r76127 - r76138;
        double r76140 = r76133 + r76139;
        double r76141 = 0.1111111111111111;
        double r76142 = r76123 * r76123;
        double r76143 = r76141 / r76142;
        double r76144 = r76143 * r76127;
        double r76145 = r76140 - r76144;
        double r76146 = 6.0;
        double r76147 = pow(r76123, r76146);
        double r76148 = pow(r76124, r76146);
        double r76149 = r76147 - r76148;
        double r76150 = cbrt(r76149);
        double r76151 = r76124 * r76124;
        double r76152 = r76151 + r76142;
        double r76153 = r76151 * r76152;
        double r76154 = 4.0;
        double r76155 = pow(r76123, r76154);
        double r76156 = r76153 + r76155;
        double r76157 = cbrt(r76156);
        double r76158 = r76150 / r76157;
        double r76159 = r76123 - r76124;
        double r76160 = cbrt(r76159);
        double r76161 = r76158 / r76160;
        double r76162 = r76161 - r76127;
        double r76163 = exp(r76162);
        double r76164 = log(r76163);
        double r76165 = r76130 ? r76145 : r76164;
        return r76165;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if (- (cbrt (+ x 1.0)) (cbrt x)) < 5.6490989663871e-07

    1. Initial program 60.7

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

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{\log \left(e^{\sqrt[3]{x}}\right)}\]
    4. Applied add-log-exp64.0

      \[\leadsto \color{blue}{\log \left(e^{\sqrt[3]{x + 1}}\right)} - \log \left(e^{\sqrt[3]{x}}\right)\]
    5. Applied diff-log64.0

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

      \[\leadsto \log \color{blue}{\left(e^{\sqrt[3]{x + 1} - \sqrt[3]{x}}\right)}\]
    7. Taylor expanded around -inf 64.0

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

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

    if 5.6490989663871e-07 < (- (cbrt (+ x 1.0)) (cbrt x))

    1. Initial program 0.5

      \[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
    2. Using strategy rm
    3. Applied add-log-exp0.5

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{\log \left(e^{\sqrt[3]{x}}\right)}\]
    4. Applied add-log-exp0.5

      \[\leadsto \color{blue}{\log \left(e^{\sqrt[3]{x + 1}}\right)} - \log \left(e^{\sqrt[3]{x}}\right)\]
    5. Applied diff-log0.6

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

      \[\leadsto \log \color{blue}{\left(e^{\sqrt[3]{x + 1} - \sqrt[3]{x}}\right)}\]
    7. Using strategy rm
    8. Applied flip-+0.5

      \[\leadsto \log \left(e^{\sqrt[3]{\color{blue}{\frac{x \cdot x - 1 \cdot 1}{x - 1}}} - \sqrt[3]{x}}\right)\]
    9. Applied cbrt-div0.5

      \[\leadsto \log \left(e^{\color{blue}{\frac{\sqrt[3]{x \cdot x - 1 \cdot 1}}{\sqrt[3]{x - 1}}} - \sqrt[3]{x}}\right)\]
    10. Using strategy rm
    11. Applied flip3--0.5

      \[\leadsto \log \left(e^{\frac{\sqrt[3]{\color{blue}{\frac{{\left(x \cdot x\right)}^{3} - {\left(1 \cdot 1\right)}^{3}}{\left(x \cdot x\right) \cdot \left(x \cdot x\right) + \left(\left(1 \cdot 1\right) \cdot \left(1 \cdot 1\right) + \left(x \cdot x\right) \cdot \left(1 \cdot 1\right)\right)}}}}{\sqrt[3]{x - 1}} - \sqrt[3]{x}}\right)\]
    12. Applied cbrt-div0.5

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

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

      \[\leadsto \log \left(e^{\frac{\frac{\sqrt[3]{{x}^{6} - {1}^{6}}}{\color{blue}{\sqrt[3]{\left(1 \cdot 1\right) \cdot \left(1 \cdot 1 + x \cdot x\right) + {x}^{4}}}}}{\sqrt[3]{x - 1}} - \sqrt[3]{x}}\right)\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt[3]{x + 1} - \sqrt[3]{x} \le 5.649099 \cdot 10^{-7}:\\ \;\;\;\;\left(\frac{\sqrt[3]{x}}{\frac{x}{0.333333333333333315}} + \left(\sqrt[3]{x} - \sqrt[3]{-1} \cdot \sqrt[3]{-x}\right)\right) - \frac{0.1111111111111111}{x \cdot x} \cdot \sqrt[3]{x}\\ \mathbf{else}:\\ \;\;\;\;\log \left(e^{\frac{\frac{\sqrt[3]{{x}^{6} - {1}^{6}}}{\sqrt[3]{\left(1 \cdot 1\right) \cdot \left(1 \cdot 1 + x \cdot x\right) + {x}^{4}}}}{\sqrt[3]{x - 1}} - \sqrt[3]{x}}\right)\\ \end{array}\]

Reproduce

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