cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ] #include <mathcw.h> extern float ercwf_r (randcw_state_t state); extern double ercw_r (randcw_state_t state); extern long double ercwl_r (randcw_state_t state); extern __float80 ercww_r (randcw_state_t state); extern __float128 ercwq_r (randcw_state_t state); extern long_long_double ercwll_r (randcw_state_t state); extern decimal_float ercwdf_r (randcw_state_t state); extern decimal_double ercwd_r (randcw_state_t state); extern decimal_long_double ercwdl_r (randcw_state_t state); extern decimal_long_long_double ercwdll_r (randcw_state_t state);
NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.
The generator state is keep externally in the state argument, a vector of four UINT_LEAST32_T values, most conveniently initialized with incw_r(). This makes the functions thread safe, and allows creation of a practically-unlimited number of independent families of generators, each with its own state.