Average Error: 30.3 → 30.3
Time: 7.1s
Precision: 64
\[\mathsf{log1p}\left(x - 1\right)\]
\[\mathsf{log1p}\left(x - 1\right)\]
\mathsf{log1p}\left(x - 1\right)
\mathsf{log1p}\left(x - 1\right)
double f(double x) {
        double r1181334 = x;
        double r1181335 = 1.0;
        double r1181336 = r1181334 - r1181335;
        double r1181337 = log1p(r1181336);
        return r1181337;
}

double f(double x) {
        double r1181338 = x;
        double r1181339 = 1.0;
        double r1181340 = r1181338 - r1181339;
        double r1181341 = log1p(r1181340);
        return r1181341;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 30.3

    \[\mathsf{log1p}\left(x - 1\right)\]
  2. Final simplification30.3

    \[\leadsto \mathsf{log1p}\left(x - 1\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "log1p(x-1)"
  :precision binary64
  (log1p (- x 1)))