Newsgroups: comp.lang.apl
Path: watmath!watserv1!utgpu!news-server.csri.toronto.edu!torsqnt!jtsv16!itcyyz!yrloc!rbe
From: rbe@yrloc.ipsa.reuter.COM (Robert Bernecky)
Subject: Re: APL*Plus questions
Message-ID: <1991Oct14.170926.28329@yrloc.ipsa.reuter.COM>
Reply-To: rbe@yrloc.ipsa.reuter.COM (Robert Bernecky)
Organization: Snake Island Research Inc, Toronto
References: <1991Oct10.054807.21471@jyu.fi> <1991Oct11.163603.14930@csi.jpl.nasa.gov>
Date: Mon, 14 Oct 91 17:09:26 GMT

In article <1991Oct11.163603.14930@csi.jpl.nasa.gov> sam@csi.jpl.nasa.gov (Sam Sirlin) writes:
>
>In article <1991Oct10.054807.21471@jyu.fi>, huhtala@jyu.fi (Kyosti Huhtala) writes:
>|> Having studied some APL using STSC's APL*Plus/PC and APL*Plus II/386 two
>|> 1) What random number generator is used to implement roll (?-symbol)?
>
>I don't know, but I would assume it's bad (like a random number
>supplied with any other language). If you care, you should probably
>write your own. You might start with something from netlib...

Actually, APL systems tend to have fairly good random number generators.
Most of them are the Lehmer linear congruential algorithm. Besides the
Berry SHARP APL Reference Manual citation, you might look into:
   Knuth's Art of Computer Programming, Vol ii, "Seminumerical ALgorithms".
   Page 9:
     "by far the most successful random number generators known today
      are special cases of the following scheme, introduced by R.H. Lehmer
      in 1948..."

Also unlike many other system-supplied utilities for other languages, 
SHARP APL provided (about 10 years ago or so):
   Precise elementary functions (designed and written by E.E. McDonnell
   Precise number to character and character to number functions
     (also by EEM, with a lot of design work by L.M. Breed) 
    These algorithms, I believe, showed up years later as
     "How to format floating point numbers correctly" and a companion
    paper, by people who had nothing to do with APL. Serves us
     APLers right for not crowing about accomplishments, I guess.

Bob





Robert Bernecky      rbe@yrloc.ipsa.reuter.com  bernecky@itrchq.itrc.on.ca 
Snake Island Research Inc  (416) 368-6944   FAX: (416) 360-4694 
18 Fifth Street, Ward's Island
Toronto, Ontario M5J 2B9 
Canada
