Developer's Daily | Unix by Example |
main | java | perl | unix | dev directory | web log |
expm1, log1p ? exponential minus 1, logarithm of 1 plus argument |
#include <math.h> double expm1 ( double x ); double log1p ( double x ); |
expm1(x) returns a value equivalent to ‘exp (x) - 1’. It is computed in a way that is accurate even if the value of x is near zero--a case where ‘exp (x) - 1’ would be inaccurate due to subtraction of two numbers that are nearly equal. log1p(x) returns a value equivalent to ‘log (1 + x)’. It is computed in a way that is accurate even if the value of x is near zero. |
BSD |
exp(3), log(3) |