PDA

View Full Version : Operators and functions


SW VandeCarr
Jul2-09, 06:03 PM
Is there a fundamental difference between operators and functions?

For example we could have F(x,y)=x+y or we could write SUM(x,y) where SUM is a defined operation in some program. Could operators be considered a particular type of function?

Moo Of Doom
Jul2-09, 06:13 PM
Yes. Any binary operation on S is simpy a function from S \times S \to S. We use infix notation (that is, we write the function in between the operands as in x + y instead of +(x, y) ) out of convenience and familiarity.

SW VandeCarr
Jul3-09, 04:13 PM
Yes. Any binary operation on S is simpy a function from S \times S \to S. We use infix notation (that is, we write the function in between the operands as in x + y instead of +(x, y) ) out of convenience and familiarity.

Thanks Moo Of Doom. I was pretty sure of this, but math texts usually use these in terms in distinct ways.

HallsofIvy
Jul3-09, 04:33 PM
Moo of Doom talked about "operations". Your question was about "operators". Generally, an "operator" is a function defined on functions as opposed to functions on numbers.

SW VandeCarr
Jul3-09, 05:05 PM
Moo of Doom talked about "operations". Your question was about "operators". Generally, an "operator" is a function defined on functions as opposed to functions on numbers.

Then SUM(x,y) would not be read as an operator on (x,y), but rather as an operation on (x,y)?

HallsofIvy
Jul3-09, 06:41 PM
Yes, that is true. The original post was ambiguous.