Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!think.com!zaphod.mps.ohio-state.edu!wuarchive!emory!ogicse!orstcs!thyphy.physics.orst.edu!ghe From: ghe@physics.orst.edu (Guangliang He) Newsgroups: comp.unix.aix Subject: drand48() Keywords: BUG, work as designed Message-ID: <1991May08.214654.26143@lynx.CS.ORST.EDU> Date: 8 May 91 21:46:54 GMT Sender: @lynx.CS.ORST.EDU Reply-To: ghe@physics.orst.edu Organization: Dept. of Physics, Oregon State University Lines: 45 Nntp-Posting-Host: thyphy.physics.orst.edu Can anyone tell me what kind result I should expect from the following little C program? ----- #include main() { int i; for (i = 0; i < 10; i++) printf("%e\n", drand48()); } ----- The answer I got from a RS/6000 is following: 1.531272e-154 1.531272e-154 1.531272e-154 1.531272e-154 1.531272e-154 1.531272e-154 1.531272e-154 1.531272e-154 1.531272e-154 1.531272e-154 While the answer from a SUN is 3.964646e-01 8.404851e-01 3.533361e-01 4.465833e-01 3.186927e-01 8.864284e-01 1.558284e-02 5.840898e-01 1.593685e-01 3.837159e-01 What is the problem on RS/6000? Is it a BUG in drand48() or is it 'work as designed'??? :-( :-( --- Guangliang He | -----Go Blazers!----- ghe@physics.orst.edu | -----Go Blazers!-----