[riot-notifications] [RIOT] add mersene twister (#168)

René Kijewski notifications at github.com
Wed Aug 21 23:13:33 CEST 2013


> +        i++;
> +        if (i >= N) {
> +            mt[0] = mt[N - 1];
> +            i = 1;
> +        }
> +    }
> +
> +    mt[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */
> +}
> +
> +/**
> + * generates a random number on [0,0xffffffff]-interval
> + */
> +uint32_t genrand_int32(void)
> +{
> +    uint32_t y;

Please don't use ANSI style C. Eliminate the definition in this line, and define it in the various loops and just before `/* Tempering */`.

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/168/files#r5909325
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20130821/e661893a/attachment.html>


More information about the notifications mailing list