Average Error: 29.7 → 2.5
Time: 18.9s
Precision: 64
$x \ge 0.0$
${\left(x + 1\right)}^{\left(\frac{1}{3}\right)} - {x}^{\left(\frac{1}{3}\right)}$
$\begin{array}{l} \mathbf{if}\;x \le 4408.457049919303244678303599357604980469:\\ \;\;\;\;\frac{{\left(1 + x\right)}^{\left(\frac{1}{3}\right)} \cdot \left({\left(1 + x\right)}^{\left(\frac{1}{3}\right)} \cdot {\left(1 + x\right)}^{\left(\frac{1}{3}\right)}\right) - {x}^{\left(\frac{1}{3}\right)} \cdot \left({x}^{\left(\frac{1}{3}\right)} \cdot {x}^{\left(\frac{1}{3}\right)}\right)}{\left({x}^{\left(\frac{1}{3}\right)} \cdot {\left(1 + x\right)}^{\left(\frac{1}{3}\right)} + {x}^{\left(\frac{1}{3}\right)} \cdot {x}^{\left(\frac{1}{3}\right)}\right) + {\left(1 + x\right)}^{\left(\frac{1}{3}\right)} \cdot {\left(1 + x\right)}^{\left(\frac{1}{3}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{e^{0.3333333333333333148296162562473909929395 \cdot \log x}}{\left(x \cdot x\right) \cdot x} \cdot 0.06172839506172839163511412152729462832212 - \frac{e^{0.3333333333333333148296162562473909929395 \cdot \log x}}{x} \cdot \frac{0.1111111111111111049432054187491303309798}{x}\right) + \frac{0.3333333333333333148296162562473909929395}{\frac{x}{e^{0.3333333333333333148296162562473909929395 \cdot \log x}}}\\ \end{array}$
{\left(x + 1\right)}^{\left(\frac{1}{3}\right)} - {x}^{\left(\frac{1}{3}\right)}
\begin{array}{l}
\mathbf{if}\;x \le 4408.457049919303244678303599357604980469:\\
\;\;\;\;\frac{{\left(1 + x\right)}^{\left(\frac{1}{3}\right)} \cdot \left({\left(1 + x\right)}^{\left(\frac{1}{3}\right)} \cdot {\left(1 + x\right)}^{\left(\frac{1}{3}\right)}\right) - {x}^{\left(\frac{1}{3}\right)} \cdot \left({x}^{\left(\frac{1}{3}\right)} \cdot {x}^{\left(\frac{1}{3}\right)}\right)}{\left({x}^{\left(\frac{1}{3}\right)} \cdot {\left(1 + x\right)}^{\left(\frac{1}{3}\right)} + {x}^{\left(\frac{1}{3}\right)} \cdot {x}^{\left(\frac{1}{3}\right)}\right) + {\left(1 + x\right)}^{\left(\frac{1}{3}\right)} \cdot {\left(1 + x\right)}^{\left(\frac{1}{3}\right)}}\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{e^{0.3333333333333333148296162562473909929395 \cdot \log x}}{\left(x \cdot x\right) \cdot x} \cdot 0.06172839506172839163511412152729462832212 - \frac{e^{0.3333333333333333148296162562473909929395 \cdot \log x}}{x} \cdot \frac{0.1111111111111111049432054187491303309798}{x}\right) + \frac{0.3333333333333333148296162562473909929395}{\frac{x}{e^{0.3333333333333333148296162562473909929395 \cdot \log x}}}\\

\end{array}
double f(double x) {
double r15371292 = x;
double r15371293 = 1.0;
double r15371294 = r15371292 + r15371293;
double r15371295 = 3.0;
double r15371296 = r15371293 / r15371295;
double r15371297 = pow(r15371294, r15371296);
double r15371298 = pow(r15371292, r15371296);
double r15371299 = r15371297 - r15371298;
return r15371299;
}


double f(double x) {
double r15371300 = x;
double r15371301 = 4408.457049919303;
bool r15371302 = r15371300 <= r15371301;
double r15371303 = 1.0;
double r15371304 = r15371303 + r15371300;
double r15371305 = 3.0;
double r15371306 = r15371303 / r15371305;
double r15371307 = pow(r15371304, r15371306);
double r15371308 = r15371307 * r15371307;
double r15371309 = r15371307 * r15371308;
double r15371310 = pow(r15371300, r15371306);
double r15371311 = r15371310 * r15371310;
double r15371312 = r15371310 * r15371311;
double r15371313 = r15371309 - r15371312;
double r15371314 = r15371310 * r15371307;
double r15371315 = r15371314 + r15371311;
double r15371316 = r15371315 + r15371308;
double r15371317 = r15371313 / r15371316;
double r15371318 = 0.3333333333333333;
double r15371319 = log(r15371300);
double r15371320 = r15371318 * r15371319;
double r15371321 = exp(r15371320);
double r15371322 = r15371300 * r15371300;
double r15371323 = r15371322 * r15371300;
double r15371324 = r15371321 / r15371323;
double r15371325 = 0.06172839506172839;
double r15371326 = r15371324 * r15371325;
double r15371327 = r15371321 / r15371300;
double r15371328 = 0.1111111111111111;
double r15371329 = r15371328 / r15371300;
double r15371330 = r15371327 * r15371329;
double r15371331 = r15371326 - r15371330;
double r15371332 = r15371300 / r15371321;
double r15371333 = r15371318 / r15371332;
double r15371334 = r15371331 + r15371333;
double r15371335 = r15371302 ? r15371317 : r15371334;
return r15371335;
}



# Try it out

Your Program's Arguments

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Split input into 2 regimes
2. ## if x < 4408.457049919303

1. Initial program 0.1

${\left(x + 1\right)}^{\left(\frac{1}{3}\right)} - {x}^{\left(\frac{1}{3}\right)}$
2. Using strategy rm
3. Applied flip3--0.1

$\leadsto \color{blue}{\frac{{\left({\left(x + 1\right)}^{\left(\frac{1}{3}\right)}\right)}^{3} - {\left({x}^{\left(\frac{1}{3}\right)}\right)}^{3}}{{\left(x + 1\right)}^{\left(\frac{1}{3}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{3}\right)} + \left({x}^{\left(\frac{1}{3}\right)} \cdot {x}^{\left(\frac{1}{3}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{3}\right)} \cdot {x}^{\left(\frac{1}{3}\right)}\right)}}$
4. Simplified0.1

$\leadsto \frac{\color{blue}{\left({\left(x + 1\right)}^{\left(\frac{1}{3}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{3}\right)}\right) \cdot {\left(x + 1\right)}^{\left(\frac{1}{3}\right)} - {x}^{\left(\frac{1}{3}\right)} \cdot \left({x}^{\left(\frac{1}{3}\right)} \cdot {x}^{\left(\frac{1}{3}\right)}\right)}}{{\left(x + 1\right)}^{\left(\frac{1}{3}\right)} \cdot {\left(x + 1\right)}^{\left(\frac{1}{3}\right)} + \left({x}^{\left(\frac{1}{3}\right)} \cdot {x}^{\left(\frac{1}{3}\right)} + {\left(x + 1\right)}^{\left(\frac{1}{3}\right)} \cdot {x}^{\left(\frac{1}{3}\right)}\right)}$

## if 4408.457049919303 < x

1. Initial program 60.0

${\left(x + 1\right)}^{\left(\frac{1}{3}\right)} - {x}^{\left(\frac{1}{3}\right)}$
2. Taylor expanded around -inf 64.0

$\leadsto \color{blue}{\left(0.06172839506172839163511412152729462832212 \cdot \frac{e^{0.3333333333333333148296162562473909929395 \cdot \left(\log -1 - \log \left(\frac{-1}{x}\right)\right)}}{{x}^{3}} + 0.3333333333333333148296162562473909929395 \cdot \frac{e^{0.3333333333333333148296162562473909929395 \cdot \left(\log -1 - \log \left(\frac{-1}{x}\right)\right)}}{x}\right) - 0.1111111111111111049432054187491303309798 \cdot \frac{e^{0.3333333333333333148296162562473909929395 \cdot \left(\log -1 - \log \left(\frac{-1}{x}\right)\right)}}{{x}^{2}}}$
3. Simplified5.0

$\leadsto \color{blue}{\frac{0.3333333333333333148296162562473909929395}{\frac{x}{e^{\left(0 + \log x\right) \cdot 0.3333333333333333148296162562473909929395}}} + \left(0.06172839506172839163511412152729462832212 \cdot \frac{e^{\left(0 + \log x\right) \cdot 0.3333333333333333148296162562473909929395}}{\left(x \cdot x\right) \cdot x} - \frac{e^{\left(0 + \log x\right) \cdot 0.3333333333333333148296162562473909929395}}{x} \cdot \frac{0.1111111111111111049432054187491303309798}{x}\right)}$
3. Recombined 2 regimes into one program.
4. Final simplification2.5

$\leadsto \begin{array}{l} \mathbf{if}\;x \le 4408.457049919303244678303599357604980469:\\ \;\;\;\;\frac{{\left(1 + x\right)}^{\left(\frac{1}{3}\right)} \cdot \left({\left(1 + x\right)}^{\left(\frac{1}{3}\right)} \cdot {\left(1 + x\right)}^{\left(\frac{1}{3}\right)}\right) - {x}^{\left(\frac{1}{3}\right)} \cdot \left({x}^{\left(\frac{1}{3}\right)} \cdot {x}^{\left(\frac{1}{3}\right)}\right)}{\left({x}^{\left(\frac{1}{3}\right)} \cdot {\left(1 + x\right)}^{\left(\frac{1}{3}\right)} + {x}^{\left(\frac{1}{3}\right)} \cdot {x}^{\left(\frac{1}{3}\right)}\right) + {\left(1 + x\right)}^{\left(\frac{1}{3}\right)} \cdot {\left(1 + x\right)}^{\left(\frac{1}{3}\right)}}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{e^{0.3333333333333333148296162562473909929395 \cdot \log x}}{\left(x \cdot x\right) \cdot x} \cdot 0.06172839506172839163511412152729462832212 - \frac{e^{0.3333333333333333148296162562473909929395 \cdot \log x}}{x} \cdot \frac{0.1111111111111111049432054187491303309798}{x}\right) + \frac{0.3333333333333333148296162562473909929395}{\frac{x}{e^{0.3333333333333333148296162562473909929395 \cdot \log x}}}\\ \end{array}$

# Reproduce

herbie shell --seed 1
(FPCore (x)
:name "NMSE problem 3.3.4"
:pre (>= x 0.0)
(- (pow (+ x 1.0) (/ 1.0 3.0)) (pow x (/ 1.0 3.0))))