There are various standard ways for denoting functions. The most commonly used notation is functional notation, which is the first notation described below.
In this example, the function f takes a real number as input, squares it, then adds 1 to the result, then takes the sine of the result, and returns the final result as the output.
This defines a function sqr from the integers to the integers that returns the square of its input.
Functions are often classified by the nature of formulas that define them:
On the other hand, if a function's domain is continuous, a table can give the values of the function at specific values of the domain. If an intermediate value is needed, interpolation can be used to estimate the value of the function. For example, a portion of a table for the sine function might be given as follows, with values rounded to 6 decimal places:
Before the advent of handheld calculators and personal computers, such tables were often compiled and published for functions such as logarithms and trigonometric functions.
This section describes general properties of functions, that are independent of specific properties of the domain and the codomain.
The definition of a function that is given in this article requires the concept of set, since the domain and the codomain of a function must be a set. This is not a problem in usual mathematics, as it is generally not difficult to consider only functions whose domain and codomain are sets, which are well defined, even if the domain is not explicitly defined. However, it is sometimes useful to consider more general functions.
General recursive functions are partial functions from integers to integers that can be defined from
Although defined only for functions from integers to integers, they can model any computable function as a consequence of the following properties: