Average Error: 0.0 → 0.0
Time: 11.7s
Precision: 64
$e^{-1} + e^{x + 1}$
$e^{-1} + {e}^{\left(1 + x\right)}$
e^{-1} + e^{x + 1}
e^{-1} + {e}^{\left(1 + x\right)}
double f(double x) {
double r46835593 = 1.0;
double r46835594 = -r46835593;
double r46835595 = exp(r46835594);
double r46835596 = x;
double r46835597 = r46835596 + r46835593;
double r46835598 = exp(r46835597);
double r46835599 = r46835595 + r46835598;
return r46835599;
}


double f(double x) {
double r46835600 = 1.0;
double r46835601 = -r46835600;
double r46835602 = exp(r46835601);
double r46835603 = exp(1.0);
double r46835604 = x;
double r46835605 = r46835600 + r46835604;
double r46835606 = pow(r46835603, r46835605);
double r46835607 = r46835602 + r46835606;
return r46835607;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.0

$e^{-1} + e^{x + 1}$
2. Using strategy rm
3. Applied *-un-lft-identity0.0

$\leadsto e^{-1} + e^{\color{blue}{1 \cdot \left(x + 1\right)}}$
4. Applied exp-prod0.0

$\leadsto e^{-1} + \color{blue}{{\left(e^{1}\right)}^{\left(x + 1\right)}}$
5. Simplified0.0

$\leadsto e^{-1} + {\color{blue}{e}}^{\left(x + 1\right)}$
6. Final simplification0.0

$\leadsto e^{-1} + {e}^{\left(1 + x\right)}$

# Reproduce

herbie shell --seed 1
(FPCore (x)
:name "exp(-1)+exp(x+1)"
(+ (exp (- 1.0)) (exp (+ x 1.0))))