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

René Kijewski notifications at github.com
Wed Aug 21 23:15:28 CEST 2013


> +    return (long) (genrand_int32() >> 1);
> +}
> +
> +/**
> + * generates a random number on [0,1]-real-interval
> + */
> +double genrand_real1(void)
> +{
> +    return genrand_int32() * (1.0 / 4294967295.0);
> +    /* divided by 2^32-1 */
> +}
> +
> +/**
> + * generates a random number on [0,1)-real-interval
> + */
> +double genrand_real2(void)

Useless. Or at least call it `genrand_real_left_inclusive`.

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


More information about the notifications mailing list