Average Error: 0.0 → 0.0
Time: 10.4s
Precision: 64
\[-8 \le x \le 8\]
\[\log \left(1 + e^{x}\right)\]
\[\log \left(1 + e^{x}\right)\]
\log \left(1 + e^{x}\right)
\log \left(1 + e^{x}\right)
double f(double x) {
        double r39598522 = 1.0;
        double r39598523 = x;
        double r39598524 = exp(r39598523);
        double r39598525 = r39598522 + r39598524;
        double r39598526 = log(r39598525);
        return r39598526;
}

double f(double x) {
        double r39598527 = 1.0;
        double r39598528 = x;
        double r39598529 = exp(r39598528);
        double r39598530 = r39598527 + r39598529;
        double r39598531 = log(r39598530);
        return r39598531;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\log \left(1 + e^{x}\right)\]
  2. Final simplification0.0

    \[\leadsto \log \left(1 + e^{x}\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "logexp"
  :pre (<= -8.0 x 8.0)
  (log (+ 1.0 (exp x))))