Average Error: 1.0 → 0.2
Time: 1.2m
Precision: 64
$\cosh \left(x + 1\right) - 2$
$\frac{\cosh \left(x + 1\right) \cdot \left(\cosh \left(x + 1\right) \cdot \cosh \left(x + 1\right)\right) - 2 \cdot \left(2 \cdot 2\right)}{\cosh \left(x + 1\right) \cdot \cosh \left(x + 1\right) + \left(2 \cdot 2 + 2 \cdot \left(\sqrt{\cosh \left(x + 1\right)} \cdot \sqrt{\cosh \left(x + 1\right)}\right)\right)}$
\cosh \left(x + 1\right) - 2
\frac{\cosh \left(x + 1\right) \cdot \left(\cosh \left(x + 1\right) \cdot \cosh \left(x + 1\right)\right) - 2 \cdot \left(2 \cdot 2\right)}{\cosh \left(x + 1\right) \cdot \cosh \left(x + 1\right) + \left(2 \cdot 2 + 2 \cdot \left(\sqrt{\cosh \left(x + 1\right)} \cdot \sqrt{\cosh \left(x + 1\right)}\right)\right)}
double f(double x) {
double r19141397 = x;
double r19141398 = 1.0;
double r19141399 = r19141397 + r19141398;
double r19141400 = cosh(r19141399);
double r19141401 = 2.0;
double r19141402 = r19141400 - r19141401;
return r19141402;
}


double f(double x) {
double r19141403 = x;
double r19141404 = 1.0;
double r19141405 = r19141403 + r19141404;
double r19141406 = cosh(r19141405);
double r19141407 = r19141406 * r19141406;
double r19141408 = r19141406 * r19141407;
double r19141409 = 2.0;
double r19141410 = r19141409 * r19141409;
double r19141411 = r19141409 * r19141410;
double r19141412 = r19141408 - r19141411;
double r19141413 = sqrt(r19141406);
double r19141414 = r19141413 * r19141413;
double r19141415 = r19141409 * r19141414;
double r19141416 = r19141410 + r19141415;
double r19141417 = r19141407 + r19141416;
double r19141418 = r19141412 / r19141417;
return r19141418;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 1.0

$\cosh \left(x + 1\right) - 2$
2. Using strategy rm
3. Applied flip3--0.2

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

$\leadsto \frac{\color{blue}{\left(\cosh \left(x + 1\right) \cdot \cosh \left(x + 1\right)\right) \cdot \cosh \left(x + 1\right) - 2 \cdot \left(2 \cdot 2\right)}}{\cosh \left(x + 1\right) \cdot \cosh \left(x + 1\right) + \left(2 \cdot 2 + \cosh \left(x + 1\right) \cdot 2\right)}$
5. Using strategy rm
$\leadsto \frac{\left(\cosh \left(x + 1\right) \cdot \cosh \left(x + 1\right)\right) \cdot \cosh \left(x + 1\right) - 2 \cdot \left(2 \cdot 2\right)}{\cosh \left(x + 1\right) \cdot \cosh \left(x + 1\right) + \left(2 \cdot 2 + \color{blue}{\left(\sqrt{\cosh \left(x + 1\right)} \cdot \sqrt{\cosh \left(x + 1\right)}\right)} \cdot 2\right)}$
$\leadsto \frac{\cosh \left(x + 1\right) \cdot \left(\cosh \left(x + 1\right) \cdot \cosh \left(x + 1\right)\right) - 2 \cdot \left(2 \cdot 2\right)}{\cosh \left(x + 1\right) \cdot \cosh \left(x + 1\right) + \left(2 \cdot 2 + 2 \cdot \left(\sqrt{\cosh \left(x + 1\right)} \cdot \sqrt{\cosh \left(x + 1\right)}\right)\right)}$
herbie shell --seed 1