[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why couldn't it have been 42?
[drand48 is supposed to return a random number]
From: Arve Kjoelen <[email protected]>
To: [email protected]
Date: Wed, 20 Sep 1995 10:38:58 -0500
Kun Luo, one of our grad students here recently found a bug in Sun's
implementation of the drand48() function. We reported it to Sun, and they
acknowledged the bug exists - it seemed to be the first time they had
heard of it, though. The bug affects Sun's ANSI C compiler shipped with
SPARCWorks3.0 and consists of the following: If you're compiling using
the -Xc flag (strict ANSI C, no SUN C compatibility extensions), the
function drand48() is BROKEN. It ALWAYS returns the number 9.000000 ...