UNARY OPERATION
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.
★ the absolute value operation is a unary operation on the real numbers
★ the opposite operation (-x) on the real numbers
★ the power operations (squaring, cubing, etc) on the real numbers
★ the factorial operation on the real numbers
★ the trigonometric functions (sin x, cos x, tan x, cot x, csc x, sec x) on the real numbers
★ the natural logarithm (ln x) on the real numbers
★ the logarithm of base 10 (log x) on the real numbers
★ logical negation on truth values
★ A unary operation on a given set ''S'' is a function ''S'' → ''S'', also called an endomorphism of ''S''.
Unary operators (called "monadic" in APL) are also used in programming languages. For example, in the C family of languages, the following operators are unary:
★ Increment: ++x, x++
★ Decrement: --x, x--
★ Address: &x
★ Indirection:
★ x
★ Positive: +x
★ Negative: -x
★ One's complement: ~x
★ Logical negation: !x
★ Sizeof: sizeof x
★ Sizeof: sizeof(type-name)
★ Cast: (''type-name'') ''cast-expression
★ Binary operation
★ Ternary operation
★ Arity
★ Operand
★ Operator
★ Operator (programming)
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.
| Contents |
| Examples of Unary Operations |
| Computer Programming |
| See also |
Examples of Unary Operations
★ the absolute value operation is a unary operation on the real numbers
★ the opposite operation (-x) on the real numbers
★ the power operations (squaring, cubing, etc) on the real numbers
★ the factorial operation on the real numbers
★ the trigonometric functions (sin x, cos x, tan x, cot x, csc x, sec x) on the real numbers
★ the natural logarithm (ln x) on the real numbers
★ the logarithm of base 10 (log x) on the real numbers
★ logical negation on truth values
★ A unary operation on a given set ''S'' is a function ''S'' → ''S'', also called an endomorphism of ''S''.
Computer Programming
Unary operators (called "monadic" in APL) are also used in programming languages. For example, in the C family of languages, the following operators are unary:
★ Increment: ++x, x++
★ Decrement: --x, x--
★ Address: &x
★ Indirection:
★ x
★ Positive: +x
★ Negative: -x
★ One's complement: ~x
★ Logical negation: !x
★ Sizeof: sizeof x
★ Sizeof: sizeof(type-name)
★ Cast: (''type-name'') ''cast-expression
See also
★ Binary operation
★ Ternary operation
★ Arity
★ Operand
★ Operator
★ Operator (programming)
This article provided by Wikipedia. To edit the contents of this article, click here for original source.
psst.. try this: add to faves

العربية
中国
Français
Deutsch
Ελληνική
हिन्दी
Italiano
日本語
Português
Русский
Español