This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/3747] mrand48 and it's friends return values outside of [-2^31, 2^31] on 64-bit platforms
- From: "nmiell at comcast dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 19 Dec 2006 02:32:14 -0000
- Subject: [Bug libc/3747] mrand48 and it's friends return values outside of [-2^31, 2^31] on 64-bit platforms
- References: <20061218005704.3747.nmiell@comcast.net>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From nmiell at comcast dot net 2006-12-19 02:32 -------
Since you're too lazy to do the obvious:
#include <stdlib.h>
#include <stdio.h>
int main(void)
{
while(1) {
long x = mrand48();
if (x > 2147483648L || x < -2147483648L) {
printf("long: %ld, int: %d\n", x, (int) x);
abort();
}
}
}
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3747
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.