SCCW 3CW "09 March 2008" "mathcw-1.00"

Table of contents


NAME

sccw - sanity check of mathcw library random-number generators

SYNOPSIS

cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]

#include <mathcw.h>

extern int sccw (void);


DESCRIPTION

Perform a sanity check of the mathcw library random-number generators, and return a count of errors found. The check first calls gscw() to save the current state, calls sscw() to set the generator to a known state, discards the first one hundred values returned by lrancw(), and verifies that the next ten match correct values in an internal table. In then restores the original state with another call to sscw(). When the unsigned long long int type is supported, the checks are repeated with llrancw(). Similar checks are also made for lrancw_r() and llrancw_r().

RETURN VALUES

Count of mismatches against correct stored values. If this is nonzero, then a serious problem exists in the library, and the random-number routines should be recompiled with a different compiler or different options until the sanity check succeeds.

ERRORS

None.

SEE ALSO

ercw(3CW), ercw_r(3CW), gscw(3CW), llrancw(3CW), llrancw_r(3CW), llrincw(3CW), llrincw_r(3CW), lrancw(3CW), lrancw_r(3CW), lrcw(3CW), lrcw_r(3CW), lrincw(3CW), lrincw_r(3CW), mscw(3CW), nrcw(3CW), nrcw_r(3CW), sscw(3CW), urcw(3CW), urcw1(3CW), urcw1_r(3CW), urcw2(3CW), urcw2_r(3CW), urcw3(3CW), urcw3_r(3CW), urcw4(3CW), urcw4_r(3CW), urcw_r(3CW), vercw(3CW), vercw_r(3CW), vllrancw(3CW), vllrancw_r(3CW), vllrincw(3CW), vllrincw_r(3CW), vlrancw(3CW), vlrancw_r(3CW), vlrcw(3CW), vlrcw_r(3CW), vlrincw(3CW), vlrincw_r(3CW), vnrcw(3CW), vnrcw_r(3CW), vurcw(3CW), vurcw1(3CW), vurcw1_r(3CW), vurcw2(3CW), vurcw2_r(3CW), vurcw3(3CW), vurcw3_r(3CW), vurcw4(3CW), vurcw4_r(3CW), vurcw_r(3CW).