common macros
More...
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <locale.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
Common macros.
- Author
- Paul Serice
§ CGUL_VERSION
#define CGUL_VERSION "1.8.0" |
§ CGUL_EXPORT
The import/export tag for Windows.
§ CGUL_BEGIN_C
§ CGUL_END_C
§ CGUL_MIN
#define CGUL_MIN |
( |
|
x, |
|
|
|
y |
|
) |
| (((x) < (y)) ? (x) : (y)) |
Return the minimum of x
and y
.
§ CGUL_MAX
#define CGUL_MAX |
( |
|
x, |
|
|
|
y |
|
) |
| (((x) < (y)) ? (y) : (x)) |
Return the maximum of x
and y
.
§ CGUL_BITS_TO_BYTES
#define CGUL_BITS_TO_BYTES |
( |
|
nbits | ) |
(((nbits) + (CHAR_BIT - 1)) / CHAR_BIT) |
This macro will return the number of bytes needed to store "nbits".
§ CGUL_INVERSE_2_32
#define CGUL_INVERSE_2_32 ((double)2.3283064365386963e-10) |
Precomputed value of 1/2^32 as a double. This is used by PRNGs when return values on the range [0, 1).