Average Error: 0.0 → 0.0
Time: 10.8s
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 r22650782 = 1.0;
        double r22650783 = x;
        double r22650784 = exp(r22650783);
        double r22650785 = r22650782 + r22650784;
        double r22650786 = log(r22650785);
        return r22650786;
}

double f(double x) {
        double r22650787 = 1.0;
        double r22650788 = x;
        double r22650789 = exp(r22650788);
        double r22650790 = r22650787 + r22650789;
        double r22650791 = log(r22650790);
        return r22650791;
}

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))))