Average Error: 0.1 → 0.0
Time: 12.4s
Precision: 64
$e^{x + 5} - \sqrt{x}$
$\left(\sqrt{e^{5}} \cdot e^{x}\right) \cdot \sqrt{e^{5}} - \sqrt{x}$
e^{x + 5} - \sqrt{x}
\left(\sqrt{e^{5}} \cdot e^{x}\right) \cdot \sqrt{e^{5}} - \sqrt{x}
double f(double x) {
double r1351618 = x;
double r1351619 = 5.0;
double r1351620 = r1351618 + r1351619;
double r1351621 = exp(r1351620);
double r1351622 = sqrt(r1351618);
double r1351623 = r1351621 - r1351622;
return r1351623;
}


double f(double x) {
double r1351624 = 5.0;
double r1351625 = exp(r1351624);
double r1351626 = sqrt(r1351625);
double r1351627 = x;
double r1351628 = exp(r1351627);
double r1351629 = r1351626 * r1351628;
double r1351630 = r1351629 * r1351626;
double r1351631 = sqrt(r1351627);
double r1351632 = r1351630 - r1351631;
return r1351632;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.1

$e^{x + 5} - \sqrt{x}$
2. Using strategy rm
3. Applied exp-sum0.0

$\leadsto \color{blue}{e^{x} \cdot e^{5}} - \sqrt{x}$
4. Using strategy rm

$\leadsto e^{x} \cdot \color{blue}{\left(\sqrt{e^{5}} \cdot \sqrt{e^{5}}\right)} - \sqrt{x}$
6. Applied associate-*r*0.0

$\leadsto \color{blue}{\left(e^{x} \cdot \sqrt{e^{5}}\right) \cdot \sqrt{e^{5}}} - \sqrt{x}$
7. Simplified0.0

$\leadsto \color{blue}{\left(\sqrt{e^{5}} \cdot e^{x}\right)} \cdot \sqrt{e^{5}} - \sqrt{x}$
8. Final simplification0.0

$\leadsto \left(\sqrt{e^{5}} \cdot e^{x}\right) \cdot \sqrt{e^{5}} - \sqrt{x}$

# Reproduce

herbie shell --seed 1
(FPCore (x)
:name "exp(x + 5) - sqrt(x)"
:precision binary64
(- (exp (+ x 5)) (sqrt x)))