Unary function: Difference between revisions

Content deleted Content added
 
(20 intermediate revisions by 14 users not shown)
Line 1:
{{Short description|Function that takes one argument}}
{{refimprove|date=August 2012}}
{{Multiple issues|
A '''unary function''' is a [[function (mathematics)|function]] that takes one [[Parameter (computer science)|argument]]. A [[unary operator]] belongs to a subset of unary functions, in that its [[range of a function|range]] coincides with its [[___domain (mathematics)|___domain]].
{{one source |date=May 2024}}
{{No footnotes|date=December 2024}}
}}
<!-- {{refimprovemore citations needed|date=August 2012}} -->
AIn [[mathematics]], a '''unary function''' is a [[function (mathematics)|function]] that takes one [[Parameter (computer science)Arity|argument]]. A [[unary operator]] belongs to a subset of unary functions, in that its [[range of a function|rangecodomain]] coincides with its [[___domain (mathematics)of a function|___domain]]. In contrast, a unary function's ___domain need not coincide with its range.
 
== Examples ==
 
The [[successor function]], denoted <math>\operatorname{succ}</math>, is a unary operator. Its ___domain and codomain are the [[Naturalnatural number|natural numbers]],s; its definition is as follows:
: <math display="block">
 
:<math display="block">
\begin{align}
\operatorname{succ} : \quad & \mathbb{N} \rightarrow \mathbb{N} \\
Line 13 ⟶ 17:
</math>
 
In manysome [[Programmingprogramming language|programming languages]]s such as [[C (programming language)|C]], executing this operation is denoted by [[Reverse Polish notation|postfixing]] <math>\mathrel{+{code|++}}</math> to the operand, i.e. the use of <math>n\mathrel{+{code|n++}} </math> is equivalent to executing the assignment <math> n:= \operatorname{succ}(n)</math>.
 
Many of the [[elementary function]]s are unary functions, in particularincluding the [[trigonometric functions]], [[logarithm]] with a pre-specified base, [[exponentiation]] to a pre-specifiedparticular power or of a pre-specified base, and [[hyperbolic function]]s are unary.
 
== See also ==
 
* [[Arity]]
* [[Binary function]]
* [[Binary operatoroperation]]
* [[Iterated binary operation]]
*[[List of mathematical functions]]
* [[Ternary operation]]
* [[Unary operation]]
 
==References Bibliography ==
* [http://www.cs.ucl.ac.uk/staff/W.Langdon/FOGP Foundations of Genetic Programming]
 
{{Authority control}}
 
[[Category:Functions and mappings]]
[[Category:Types of functions]]
[[Category:Unary operations|*]]
 
 
{{maths-stub}}