Average Error: 0.0 → 0.0
Time: 15.7s
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 r36241892 = 1.0;
        double r36241893 = x;
        double r36241894 = exp(r36241893);
        double r36241895 = r36241892 + r36241894;
        double r36241896 = log(r36241895);
        return r36241896;
}

double f(double x) {
        double r36241897 = 1.0;
        double r36241898 = x;
        double r36241899 = exp(r36241898);
        double r36241900 = r36241897 + r36241899;
        double r36241901 = log(r36241900);
        return r36241901;
}

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 x 8)
  (log (+ 1 (exp x))))