diff --git a/src/query/inc/tdigest.h b/src/query/inc/tdigest.h index 582ad338ac4dffcaac883669c6f4f72a0fb64a9b..ef347f1b9ef2dcbd854b13b822425ce2ad95956d 100644 --- a/src/query/inc/tdigest.h +++ b/src/query/inc/tdigest.h @@ -22,6 +22,10 @@ #ifndef TDIGEST_H #define TDIGEST_H +#ifndef M_PI +#define M_PI 3.14159265358979323846264338327950288 /* pi */ +#endif + #define COMPRESSION 400 #define GET_CENTROID(compression) (ceil(compression * M_PI / 2) + 1) #define GET_THRESHOLD(compression) (7.5 + 0.37 * compression - 2e-4 * pow(compression, 2))