This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/3747] mrand48 and it's friends return values outside of [-2^31, 2^31] on 64-bit platforms


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]