[CM] clm-random error and "double-float"

bill sack wsack@buffalo.edu
Tue, 10 Jan 2006 15:33:06 -0500


hi again,
while looking for a replacement for lisp's 'random' for use in clm run 
loops, i stumbled across what might be a problem:

these clm expressions evaluate fine:
* (centered-random 1.0)
-0.7780328
* (mus-random 1.0)
0.2189467
but this one produces an error
* (clm-random 1.0)


Type-error in KERNEL::OBJECT-NOT-DOUBLE-FLOAT-ERROR-HANDLER:
   1.0 is not of type DOUBLE-FLOAT
   [Condition of type TYPE-ERROR]

Restarts:
  0: [ABORT] Return to Top-Level.

Debug  (type H for help)

(CLM-RANDOM 1.0)
Source: (DEF-ALIEN-ROUTINE ("mus_frandom" CLM-RANDOM) FLOAT (AMP 
DOUBLE-FLOAT))

according to the docs, 'clm-random' would seem like the closest drop-in 
replacement for lisp 'random' (which is being redefined in CM?), as 
mus-random and centered-random return a range plus and minus the amp 
argument.

i am understanding this correctly, or am i out to lunch? i'm using cmucl 
19c these days, also.

thanks!
bill sack