Simple question out of curiosity, why does Math.log1p return ln(x+1) instead of just ln(x)?

Printable View

- 01-01-2011, 12:14 PMimorioMath.log1p=ln(x+1) instead of ln(x)
Simple question out of curiosity, why does Math.log1p return ln(x+1) instead of just ln(x)?

- 01-01-2011, 12:28 PMJosAH
ln(1+x) is mathematically quite a fundamental function (as is ln(x) which is another function/method in the Math class). The first derivative of ln(1+x) w.r.t. x is 1-x+x^2-x^3+x^4 ... and is a nice tool to construct other fundamental series with.

kind regards,

Jos - 01-01-2011, 12:46 PMimorio
Ah ok, nice. I didn't see ln(x) was also in there. Thanks for the explanation.

- 01-01-2011, 12:51 PMJosAH