Unary operation
From Wikipedia, the free encyclopedia
|
In mathematics, a unary operation is an operation with only one operand, i.e. an operation with a single input, or in other words, a function of one variable (for the terminology see also operators versus functions). Common notations are prefix notation (+, −, not), postfix notation (factorial: n!), and functional notation (sin x or sin (x)). In the case of the square root a horizontal bar over the argument extending the square root sign can indicate the extent of the argument, so that parentheses can be dispensed with.
Examples of Unary Operations
Computer ProgrammingUnary operators (called "monadic" in APL) are also used in programming languages. For example, in the C family of languages, the following operators are unary:
Usage of Incremental and Decremental OperatorsIn most programming languages, incremental and decremental operators can be preffixed and suffixed to the variable. The preffix and suffix can be useful when manipulating variables. A suffixed operation increments the value after it has been called. Example 1int i = 0; Example 2int i = 0; See alsode:Einstellige Verknüpfung et:Unaarne tehe es:Operación unaria gl:Operación it:Operazione unaria he:פעולה יונארית nl:Unaire bewerking pt:Operação unária ja:単項演算 ru:Унарная операция sl:Enočlena operacija sv:Unär operator th:การดำเนินการเอกภาค |


