Unary function: Difference between revisions

Content deleted Content added
Rewrite and organize examples into a section
Examples: usual notation for maps + more precisely
Line 4:
== Examples ==
 
The [[successor function]], denoted <math>\operatorname{succ}</math>, is a unary operator. Its ___domain and codomain are the [[Natural number|natural numbers]], its definition is as follows:
 
:<math display="block">
\begin{align}
\operatorname{succ} &: \quad & \mathbb{N} \longrightarrowrightarrow \mathbb{N} \\
\operatorname{succ}(n) &:= n \mapsto (n + 1)
\end{align}
</math>
 
In many [[Programming language|programming languages]] such as [[C (programming language)|C]], executing this operation is denoted by [[Reverse Polish notation|postfixpostfixing]] as <math>\mathrel{+{+}}</math> to the operand, i.e. the use of <math>\operatorname{succ}(n)=n\mathrel{+{+}} </math> is equivalent to executing the assignment <math> n:= \operatorname{succ}(n)</math>.
 
Many of the [[elementary function]]s are unary functions, in particular the [[trigonometric functions]], [[logarithm]] with a pre-specified base, [[exponentiation]] to a pre-specified power or of a pre-specified base, and [[hyperbolic function]]s are unary.