Xorshiftã¯ç似乱æ°åçææ³ã®1ã¤ã§ãããGeorge Marsagliaï¼w:George Marsagliaï¼ã2003å¹´ã«ææ¡ãããæ¼ç®ãæä»çè«çåã¨ãããã·ããã®ã¿ã§ããããé«éã§ãã[1] ãªã©ã®ç¹å¾´ãããã #include <stdint.h> struct xorshift32_state { uint32_t a; }; /* The state word must be initialized to non-zero */ uint32_t xorshift32(struct xorshift32_state *state) { /* Algorithm "xor" from p. 4 of Marsaglia, "Xorshift RNGs" */ uint32_t x = state->a; x ^= x << 13; x ^= x >> 17; x ^=
{{#tags}}- {{label}}
{{/tags}}