Printer Friendly
Dictionary, Encyclopedia and Thesaurus - The Free Dictionary
1,808,090,953 visitors served.
forum mailing list For webmasters
?
New: Language forums
Dictionary/
thesaurus
Medical
dictionary
Legal
dictionary
Financial
dictionary
Acronyms
 
Idioms
Encyclopedia
Wikipedia
encyclopedia
?

function
(redirected from functioning)

   Also found in: Dictionary/thesaurus, Medical, Legal, Wikipedia, Hutchinson 0.02 sec.
function, in mathematics, a relation f that assigns to each member x of some set X a corresponding member y of some set Y; y is said to be a function of x, usually denoted f(x) (read "f of x "). In the equation y=f(x), x is called the independent variable and y the dependent variable. In practice, X and Y will most often be sets of numbers, vectors, points of some geometric object, or the like. For example, X might be a solid body and f(x) the temperature at the point x in X; in this case, Y will be a set of numbers. The formula Ar 2 expresses the area of a circle as a function of its radius. A function f is often described in terms of its graph, which consists of all points (x,y) in the plane such that y=f(x). Although a function f assigns a unique y to each x, several x 's may yield the same y ; e.g., if y=f(x)=x 2 (x is a number), then f(2)=f(−2). If this never occurs, then f is called a one-to-one, or injective, function.

function

In mathematics, an expression, rule, or law that defines a relationship between one variable (the independent variable) and another (the dependent variable), which changes along with it. Most functions are numerical; that is, a numerical input value is associated with a single numerical output value. The formula A = πr2, for example, assigns to each positive real number r the area A of a circle with a radius of that length. The symbols f(x) and g(x) are typically used for functions of the independent variable x. A multivariable function such as w = f(x, y) is a rule for deriving a single numerical value from more than one input value. A periodic function repeats values over fixed intervals. If f(x + k) = f(x) for any value of x, f is a periodic function with a period of length k (a constant). The trigonometric functions are periodic. See also density function; exponential function; hyperbolic function; inverse function; transcendental function.


function

In programming, a self-contained software routine that performs a task. Functions can do a large amount of processing or as little as adding two numbers and deriving a result. Values are passed to the function, and values may be returned. Or, the function may just perform the operation and not return a resulting value. The concept of a function within a program is that, once written, it can be used over and over again without the programmer having to duplicate the same lines of code in the program each time that same processing is desired.

Standard and Programmer-Defined
Programming languages provide a set of standard functions as well as allow programmers to define their own functions. For example, the C and C++ programming languages are built entirely of functions and always contain a "main" function.

The Application Programming Interface (API)
Functions in one program can also be called for by other programs and shared. For example, operating systems can contain more than a thousand functions to display data, print, read and write disks and perform a myriad of tasks. Programmers write their applications to interact with the OS using these functions. This list of functions is called the "application programming interface" (API).

Function Calls
Functions are activated by placing a "function call" statement in the program. The function call often includes values (parameters) that are passed to the function. When called, the function performs the operation and returns control to the instruction following the call. The function may return a value or not. Writing a program in a language such as C/C++ involves calling language functions, one's own functions and operating system functions (APIs). There is a whole lot of function calling. See function prototype, API and interface.

A Function Call Example: Open and Read
The example below shows two very simplified API functions to open and read a file.

The OPEN function is called to read the file "budget.txt," and the function returns a value in the variable HANDLE. If the file was opened successfully, HANDLE might contain a positive number, but if not, a negative one. The value in HANDLE is then passed to the READ function to read so many bytes (LENGTH) of the file into a memory area called INPUTBUFFER. The OPEN function returns the number of bytes read in the SIZE variable.

     handle = open("budget.txt");
     size = read(handle, InputBuffer, length);


function
Maths logic a relation between two sets that associates a unique element (the value) of the second (the range) with each element (the argument) of the first (the domain): a many-one relation. Symbol: f(x) The value of f(x) for x = 2 is f(2) FORMULA

function [′fəŋk·shən]
(computer science)
In FORTRAN, a subroutine of a particular kind which returns a computational value whenever it is called.
(mathematics)
A mathematical rule between two sets which assigns to each member of the first, exactly one member of the second.

1.(mathematics)function - (Or "map", "mapping") If D and C are sets (the domain and codomain) then a function f from D to C, normally written "f : D -> C" is a subset of D x C such that:
2.function - For each d in D there exists some c in C such that (d,c) is an element of f. I.e. the function is defined for every element of D.
3.function - For each d in D, c1 and c2 in C, if both (d,c1) and (d,c2) are elements of f then c1 = c2. I.e. the function is uniquely defined for every element of D.

See also image, inverse, partial function.
4.(programming)function - Computing usage derives from the mathematical term but is much less strict. In programming (except in functional programming), a function may return different values each time it is called with the same argument values and may have side effects.

A procedure is a function which returns no value but has only side-effects. The C language, for example, has no procedures, only functions. ANSI C even defines a type, void, for the result of a function that has no result.


How to thank TFD for its existence? Tell a friend about us, add a link to this page, add the site to iGoogle, or visit webmaster's page for free fun content.
?Page tools
Printer friendly
Cite / link
Email
Feedback
? Mentioned in
 
Encyclopedia browser? ? Full browser
 
 
Encyclopedia
?

Disclaimer | Privacy policy | Feedback | Copyright © 2009 Farlex, Inc.
All content on this website, including dictionary, thesaurus, literature, geography, and other reference data is for informational purposes only. This information should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional. Terms of Use.