ABSTRACT

This chapter introduces the random selection functions of A Programming Language (APL), roll and deal. It illustrates their use with probability simulations and Monte Carlo integrations. The chapter also introduces the factorial and binomial functions, with applications to probability problems, including the binomial probability distribution, and a polynomial translation formula. It presents the circular, hyperbolic, and Pythagorean trigonometric functions and multiplication by pi. Random selections can be made with the APL function roll, which is named in analogy with a roll of a die. Random link can be made a local variable in a defined function; in that case, it must be assigned a value before any execution of roll or deal. The binomial function of APL is indicated by dyadic use of the factorial symbol. The circular and hyperbolic functions are primitive APL functions, and, as with all the primitives, the trig functions are invoked with special symbols.