Popis: |
Examples of extended arithmetics include range, polynomial, dimensional, extended precision and fault tolerant arithmetic, and arithmetic on distributions of random variables. APL2's defined operators and general arrays enable the programmer to easily define such extensions. In this paper we will discuss some extended arithmetics and a prototype of arithmetic on statistical distributions that we have implemented in APL2 [1]. In this prototype, distributions take the place of numbers and the ordinary arithmetic scalar functions are replaced by derived functions that take distributions as arguments and return distributions as results. For ordinary addition, the natural derived function is convolution. Design issues and application examples are discussed. |