Unary function

A unary function is a function that takes one argument. A unary operator belongs to a subset of unary functions, in that its range coincides with its domain.

Examples

The successor function, denoted , is a unary operator. Its domain and codomain are the natural numbers, its definition is as follows:

In many programming languages such as C, executing this operation is denoted by postfixing to the operand, i.e. the use of is equivalent to executing the assignment .

Many of the elementary functions 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 functions are unary.

gollark: Haskell has values too. It's very bee.
gollark: It might be. I don't think you can, as an oper, arbitrarily impersonate servers or something.
gollark: Joe has no knowledge of IRC, as far as I know, merely late homework.
gollark: * IRC
gollark: JRC admin interface idea: a box which just sends raw IRC protocol messages on a server to server connection.

See also

References

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.