diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-24 09:54:23 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-24 09:54:44 +0000 |
commit | 836b47cb7e99a977c5a23b059ca1d0b5065d310e (patch) | |
tree | 1604da8f482d02effa033c94a84be42bc0c848c3 /web/server/h2o/libh2o/deps/klib/kmath.h | |
parent | Releasing debian version 1.44.3-2. (diff) | |
download | netdata-836b47cb7e99a977c5a23b059ca1d0b5065d310e.tar.xz netdata-836b47cb7e99a977c5a23b059ca1d0b5065d310e.zip |
Merging upstream version 1.46.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/server/h2o/libh2o/deps/klib/kmath.h')
-rw-r--r-- | web/server/h2o/libh2o/deps/klib/kmath.h | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/web/server/h2o/libh2o/deps/klib/kmath.h b/web/server/h2o/libh2o/deps/klib/kmath.h deleted file mode 100644 index 2c3e77969..000000000 --- a/web/server/h2o/libh2o/deps/klib/kmath.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef AC_KMATH_H -#define AC_KMATH_H - -#include <stdint.h> - -#ifdef __cplusplus -extern "C" { -#endif - - /********************************** - * Pseudo-random number generator * - **********************************/ - - typedef uint64_t krint64_t; - - struct _krand_t; - typedef struct _krand_t krand_t; - - #define kr_drand(_kr) ((kr_rand(_kr) >> 11) * (1.0/9007199254740992.0)) - #define kr_sample(_kr, _k, _cnt) ((*(_cnt))++ < (_k)? *(_cnt) - 1 : kr_rand(_kr) % *(_cnt)) - - krand_t *kr_srand(krint64_t seed); - krint64_t kr_rand(krand_t *kr); - - /************************** - * Non-linear programming * - **************************/ - - #define KMIN_RADIUS 0.5 - #define KMIN_EPS 1e-7 - #define KMIN_MAXCALL 50000 - - typedef double (*kmin_f)(int, double*, void*); - typedef double (*kmin1_f)(double, void*); - - double kmin_hj(kmin_f func, int n, double *x, void *data, double r, double eps, int max_calls); // Hooke-Jeeves' - double kmin_brent(kmin1_f func, double a, double b, void *data, double tol, double *xmin); // Brent's 1-dimenssion - - /********************* - * Special functions * - *********************/ - - double kf_lgamma(double z); // log gamma function - double kf_erfc(double x); // complementary error function - double kf_gammap(double s, double z); // regularized lower incomplete gamma function - double kf_gammaq(double s, double z); // regularized upper incomplete gamma function - double kf_betai(double a, double b, double x); // regularized incomplete beta function - -#ifdef __cplusplus -} -#endif - -#endif |