Maeckes logo

<    1      2    >


Arity

The arity is the number of arguments or operands taken by a function or operation.

 


Explanation

This number is expressed by names as:

  • Nullary
A constant is an operation of arity 0.

  • Unary
The plus sign and the minus sign are operations of arity 1.

  • Binary
An addition, a subtraction, a multiplication and a division are operations of arity 2.

  • Ternary
A ternary operator takes three operands.

  • n-ary
An n-ary operator takes n operands.

  • Varying ary
A function can accept a variable number of arguments.

 


Example 0

The nullary function f () or the operation time have no argument. The instruction STOP has no operand.

 


Example 1

The unary function f (x has the variable x as argument. The operation +1 has only one operand.

 


Example 2

The binary function f (x, y) has the two variables x and y as argument. The operation x + y has 2 operands.

 


Example 3

The ternary function f (x, y, z) has the three variables x, y and z as argument.

 


Example 4

The n-ary function f (x1x2, . . . , xn) has n variables as argument.

 


Example 5

The varying ary function with the variable x as argument is written as

The number m is the lower bound of the summation, the number n is its upper bound.

 


Deutsch   Español   Français   Nederlands   中文   Русский