Number: 342

Date: 28-Mar-84 10':10':14

Submitter: Sannella.PA

Source: Burton.pa

Subject: (RAND 0 65536) returns negative numbers about half the time

Assigned To: Masinter.pa

Attn: 

Status: Closed

In/By: Carol

Problem Type: Bug

Impact: Serious

Difficulty: 

Frequency: Intermittent

Priority: Hopefully

System: Language Support

Subsystem: Arithmetic

Machine: 

Disk: 

Lisp Version: 27-Mar-84

Source Files: 

Microcode Version: 

Memory Size: 

File Server: 

Server Software Version: 

Disposition: '
["Sannella.PA" "20-Aug-84 17':06':12" Attn': Status':(Fixed->Closed) In/By':]'
["Sannella.PA" "12-Sep-84 19':13':48" In/By':]

Description: '
Date': 27 Mar 84 20':06 PST'
From': Burton.pa'
Subject': Lisp': bug in RAND'
To': LispSupport.pa'
Lisp-System-Date': 27-Mar-84 08':53':34'
'
'
(RAND 0 65536) returns negative numbers about half the time!!!'
'
richard'
'
-----'
'
Date': 27 Mar 84 21':58 PST'
From': Masinter.pa'
Subject': FIXED': RAND(0 70000) returns negative values'
To': LispSupport.pa'
cc': burton'
Lisp-System-Date': 27-Mar-84 08':53':34'
Machine-Type': Dorado'
'
Submit as FIXED. The problem was that internally RAND was calling IREMAINDER on a large number where it should have been calling IMOD (since the internal random state as 2 16-bit numbers could have represented a negative number.).'
'
I fixed it, for next loadup.'
'


Workaround: 

Test Case: 

Edit-By: Sannella.PA

Edit-Date: 12-Sep-84 19':13':49