/* This file contains a 64-bit random number generator written bythelateGeorgeMarsaglia,publishedonlineat https://www.thecodingforums.com/threads/64-bit-kiss-rngs.673657/
staticlong
ran_init_time_kiss(void) /* Added by BDM: use the real time and getrandom() to initialize. */
{ double t; unsignedlonglong ul; long seed; int i;
REALTIMEDEFS
t = NAUTYREALTIME; if (t > 1660000000.0) ul = (nauty_counter)(t*2100001.0); else ul = (nauty_counter)(t+212300021.0);
kissx = KISSX + ul;
i = getrandom(&ul,sizeof(ul),0);
kissy = KISSY + (ul ^ getpid() * 997);
for (i = 0; i < 1000; ++i) ul = KISS;
return ul;
}
staticlong
ran_init_kiss(int seed) /* Added by BDM: deterministically initialise using seed */
{ double t; unsignedlonglong ul; int i;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.