#include <math.h>
Go to the source code of this file.
Defines | |
#define | logBase2(x) (log(x)/log(2)) |
Return log base two of number x. | |
#define | round(a) ((int)((a)+0.5)) |
Round floating point value to nearest integer. | |
#define | roundll(a) ((long long)((a)+0.5)) |
Round floating point value to nearest long long. | |
Functions | |
unsigned | byteSwap32 (unsigned a) |
Return byte-swapped version of a. | |
int | digitsBaseTen (int x) |
Return number of digits base 10. | |
int | digitsBaseTwo (unsigned long x) |
Return base two number of digits. | |
int | positiveRangeIntersection (int start1, int end1, int start2, int end2) |
Return number of bases in intersection of two ranges, or zero if they don't intersect. | |
int | rangeIntersection (int start1, int end1, int start2, int end2) |
Return amount of bases two ranges intersect over, 0 or negative if no intersection. | |
int | roundingScale (int a, int p, int q) |
Returns rounded a*p/q. |
Definition in file numUtil.h.