diff options
author | tlatorre <tlatorre@uchicago.edu> | 2018-09-13 10:04:56 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2018-09-13 10:04:56 -0500 |
commit | cf903578dab6002be56fa00f3e2064f904c95fba (patch) | |
tree | b483084dd63d63fe16e95fba8e7663ebd5237269 /src/misc.h | |
parent | 8beebac19b9351cdc6108ea31eeda6531d75540b (diff) | |
download | sddm-cf903578dab6002be56fa00f3e2064f904c95fba.tar.gz sddm-cf903578dab6002be56fa00f3e2064f904c95fba.tar.bz2 sddm-cf903578dab6002be56fa00f3e2064f904c95fba.zip |
add a function to compute log(n) for integer n
This commit adds the function ln() to compute log(n) for integer n. It uses a
lookup table for n < 100 to speed things up.
Diffstat (limited to 'src/misc.h')
-rw-r--r-- | src/misc.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -3,8 +3,10 @@ #include <stdlib.h> /* for size_t */ +#define LN_MAX 100 #define LNFACT_MAX 100 +double ln(unsigned int n); double lnfact(unsigned int n); double kahan_sum(double *x, size_t n); double interp1d(double x, double *xp, double *yp, size_t n); |