Average Error: 0.0 → 0.0
Time: 8.3s
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 r72567 = 1.0;
        double r72568 = x;
        double r72569 = exp(r72568);
        double r72570 = r72567 + r72569;
        double r72571 = log(r72570);
        return r72571;
}

double f(double x) {
        double r72572 = 1.0;
        double r72573 = x;
        double r72574 = exp(r72573);
        double r72575 = r72572 + r72574;
        double r72576 = log(r72575);
        return r72576;
}

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"
  :precision binary64
  :pre (<= -8 x 8)
  (log (+ 1 (exp x))))