This commit is contained in:
Miloslav Ciz 2023-11-14 22:25:01 +01:00
parent 256c17b290
commit 3c46e49180
4 changed files with 13 additions and 6 deletions

View file

@ -54,12 +54,15 @@ Functions can have certain properties such as:
- being an **[even function](even_function.md)**: For this function it holds that *f(x) = f(-x)*, i.e. the plotted function is symmetric by the vertical axis. Example is the [cosine](cos.md) function.
- being an **[odd function](odd_function.md)**: For this function it holds that *-f(x) = f(-x)*, i.e. the plotted function is symmetric by the center point [0,0]. Example is the [sine](sin.md) function.
- being **[differentiable](differentiable.md)**: Its [derivative](derivative.md) is defined everywhere.
- **[recursive](recursion.md)**: Referring to themselves in their own definition.
- ...
In context of functions we may encounter the term [composition](composition.md) which simply means chaining the functions. E.g. the composition of functions *f(x)* and *g(x)* is written as *(f o g)(x)* which is the same as *f(g(x))*.
[Calculus](calculus.md) is an important mathematical field that studies changes of continuous functions. It can tell us how quickly functions grow, where they have maximum and minimum values, what's the area under the line in their plot and many other things.
Mathematical functions can be seen as [models of computation](model_of_computation.md), i.e. something akin an "abstract computer": the field studying such functions is called [computability](computability.md) theory. Here we may divide functions into [classes](class.md) depending on how "difficult" it is to compute their result.
### Notable Mathematical Functions
Functions commonly used in mathematics range from the trivial ones (such as the constant functions, *f(x) = constant*) to things like trigonometric functions ([sine](sin.md), [cosine](cos.md), [tangent](tan.md), ...), [factorial](factorial.md), [logarithm](log.md), [logistic](logistic_function.md) sigmoid function, [Gaussian function](gaussian_function.md) etc. Furthermore some more complex and/or interesting functions are (the term function may be applied liberally here):
@ -100,4 +103,6 @@ unsigned int pseudoRandom(unsigned int maxValue) // impure function
}
```
In older languages functions were also called *[procedures](procedure.md)* or *[routines](routine.md)*. Sometimes there was some distinction between them, e.g. in [Pascal](pascal.md) functions returned a value while procedures didn't.
In older languages functions were also called *[procedures](procedure.md)* or *[routines](routine.md)*. Sometimes there was some distinction between them, e.g. in [Pascal](pascal.md) functions returned a value while procedures didn't.
Just as in mathematics, a function in programming may be [recursive](recursion.md) -- here we define recursion as a function that calls itself.