HP Forums

Full Version: RANDOM and CAS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In CAS, RANDOM(), with three arguments, appears to be only working for lists of size 11 or less, e..g.

RANDOM(11,0,10) OK
RANDOM(12,0,10) "Error: Invalid dimension."

No problem in Home! This is with firmware 6940 (now pulled). Not sure if this was OK in the previous firmware.
RANDOM in CAS with 3 args n,a,b does not the same as in Home. In CAS, you take n integer values between a and b but once the value has been selected you can not get it again (in contrast with randvector). For example, RANDOM(11,0,10) is a permutation and RANDOM(12,0,10) is indeed invalid dimension.
In Home, it seems you take 11 floating point values between 0 and 10.
(12-13-2014 06:28 PM)Helge Gabert Wrote: [ -> ]In CAS, RANDOM(), with three arguments, appears to be only working for lists of size 11 or less, e..g.

RANDOM(11,0,10) OK
RANDOM(12,0,10) "Error: Invalid dimension."

No problem in Home! This is with firmware 6940 (now pulled). Not sure if this was OK in the previous firmware.

Bug confirmed, also with the new debugged & withdrawn version.
(12-14-2014 09:52 AM)Gerald H Wrote: [ -> ]
(12-13-2014 06:28 PM)Helge Gabert Wrote: [ -> ]In CAS, RANDOM(), with three arguments, appears to be only working for lists of size 11 or less, e..g.

RANDOM(11,0,10) OK
RANDOM(12,0,10) "Error: Invalid dimension."

No problem in Home! This is with firmware 6940 (now pulled). Not sure if this was OK in the previous firmware.

Bug confirmed, also with the new debugged & withdrawn version.
It's a case problem. If you type "random" instead of RANDOM then you get the Home behavior in CAS. If you type RANDOM you see the error.
Yes, it is a case error, I agree. There needs to be "random" in the catalog.

Also, it should be made clear in the help catalog that RANDOM in CAS works (but as a permutation without replacement), and an entry for "randvector" is due.
Reference URL's