Average Error: 0.0 → 0.0
Time: 11.6s
Precision: 64
$\left(e^{x} - e^{4}\right) + 1$
$1 + \left(e^{x} - e^{4}\right)$
\left(e^{x} - e^{4}\right) + 1
1 + \left(e^{x} - e^{4}\right)
double f(double x) {
double r46469425 = x;
double r46469426 = exp(r46469425);
double r46469427 = 4.0;
double r46469428 = exp(r46469427);
double r46469429 = r46469426 - r46469428;
double r46469430 = 1.0;
double r46469431 = r46469429 + r46469430;
return r46469431;
}


double f(double x) {
double r46469432 = 1.0;
double r46469433 = x;
double r46469434 = exp(r46469433);
double r46469435 = 4.0;
double r46469436 = exp(r46469435);
double r46469437 = r46469434 - r46469436;
double r46469438 = r46469432 + r46469437;
return r46469438;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.0

$\left(e^{x} - e^{4}\right) + 1$
2. Final simplification0.0

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

# Reproduce

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