\log \left(1 + x\right)
\mathsf{log1p}\left(x\right)double f(double x) {
double r1898714 = 1.0;
double r1898715 = x;
double r1898716 = r1898714 + r1898715;
double r1898717 = log(r1898716);
return r1898717;
}
double f(double x) {
double r1898718 = x;
double r1898719 = log1p(r1898718);
return r1898719;
}




Bits error versus x
Results
| Original | 39.4 |
|---|---|
| Target | 0.2 |
| Herbie | 0.0 |
Initial program 39.4
Simplified0.0
Final simplification0.0
herbie shell --seed 2019138 +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)))