\log \left(1 + x\right)
\mathsf{log1p}\left(x\right)double f(double x) {
double r1040655 = 1.0;
double r1040656 = x;
double r1040657 = r1040655 + r1040656;
double r1040658 = log(r1040657);
return r1040658;
}
double f(double x) {
double r1040659 = x;
double r1040660 = log1p(r1040659);
return r1040660;
}




Bits error versus x
Results
| Original | 39.2 |
|---|---|
| Target | 0.2 |
| Herbie | 0.0 |
Initial program 39.2
Simplified0.0
Final simplification0.0
herbie shell --seed 2019128 +o rules:numerics
(FPCore (x)
:name "ln(1 + x)"
:herbie-target
(if (== (+ 1 x) 1) x (/ (* x (log (+ 1 x))) (- (+ 1 x) 1)))
(log (+ 1 x)))