
12-11-2008, 06:11 PM
The random number generator occasionally doesn't generate an integer even when it is supposed to (a bug listed in the official bug list). This doesn't always happen (in one class I know of, for a specific program only about 4 people out of 20 had a problem) so it can be very discouraging to debug.
The fix is to basically multipy the result from the random number generator by 1.0 before making the test - for more detail do a forum search or look at the bug list on the Alice home page.
|