This is for calculating e^x-1 for small values more accurately. You can also call expm1(x) function if you want, and it's available on your platform. FUNCTION: double expm1 ( double x )