Hi Skip,

I did a search with the finder on my mac for the text "rand11=" and those were 
two of the files that were shown to contain it. It is the trick that I use to 
find the origins of verbs that don't show up in the usual ways.

Cheers, bob

> On Oct 29, 2017, at 12:23 AM, 'Skip Cave' via Programming 
> <programm...@jsoftware.com> wrote:
> 
> Bob, thanks for the link.
> I searched the jsoftware.com website for the rand11 verb, and none of the
> hits showed the code, or what package the function might be in. I just
> found a brief description, with no indication what package the verb might
> be in:
> 
> rand11 random <http://www.jsoftware.com/docs/help602/user/script_random.htm>
> v generate y random numbers in interval (_1,1)
> Where does one find the list all the packages that are included in the J
> distribution, both standard & optional, along with the verbs in each
> package. Suppose I know the name of a verb in some package (usually from
> reading someone's code), how do I know which package that verb is in, and
> whether the package must be "loaded" (like stats), or "required" (like
> plot).
> 
> Skip
> 
> 
> 
> ​
> 
> Skip Cave
> Cave Consulting LLC
> 
> On Sun, Oct 29, 2017 at 1:20 AM, robert therriault <bobtherria...@mac.com>
> wrote:
> 
>> I found it in j602 in this path ~/j602/system/packages/stats/random.ijs
>> 
>> setrl=: 9!:1
>> 
>> deal=: (# ? #) : (? #) { ]
>> dealx=: ] #: ?~ : ? & (*/)
>> toss=: ? @ (# #) { ]
>> tossx=: ] #: (?@# */)
>> rand01=: ?@$ 0:
>> rand11=: <: @: +: @: rand01
>> 
>> and it remains in the newest version of the j beta
>> ~/j64-806/addons/stats/base/random.ijs although with more documentation
>> 
>> cocurrent 'z'
>> 
>> setrl=: 9!:1                NB. set random link
>> 
>> deal=: (# ? #) : (? #) { ]  NB. deal x items from y (no repetition)
>> dealx=: ] #: ?~ : ? & (*/)  NB. deal x items from shape y (no repetition)
>> toss=: ? @ (# #) { ]        NB. pick x items from y (with replacement)
>> tossx=: ] #: (?@# */)       NB. pick x items from shape y (with
>> replacement)
>> rand01=: ?@$ 0:             NB. generate y random numbers in interval (0,1)
>> rand11=: <: @: +: @: rand01  NB. generate y random numbers in interval
>> (_1,1)
>> 
>> 
>> Cheers, bob
>> 
>> 
>> 
>> 
>>> On Oct 28, 2017, at 10:46 PM, 'Skip Cave' via Programming <
>> programm...@jsoftware.com> wrote:
>>> 
>>> I found this verb description in the Jsoftware website"
>>> 
>>> rand11 random <http://www.jsoftware.com/docs/help602/user/script_
>> random.htm>
>>> v generate y random numbers in interval (_1,1)
>>> 
>>> ​Bu I can't find ​the actual code implementing the rand11 function
>> anywhere
>>> on the Jsoftware site. Can anyone point me to the code?
>>> 
>>> Skip
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>> 
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to