HiveBrain v1.2.0
Get Started
← Back to all entries
gotchaMinor

Is there difference between a function in mathematics to a function in computer science?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
sciencefunctiondifferencebetweencomputermathematicsthere

Problem

I never learned a lot of mathematics (generally only arithmetic) and never learned computer science in a formal frame.

I emphasize that I don't mean to ask about a "function" in programming ("procedure"/"method"), rather only about the difference between the formal definition of function in mathematics to the formal definition of function in (theoretical) computer science, if at all there is any such difference (unless computer science don't share the exact definition common in mathematics).

Is there difference between a function in mathematics to a function in computer science?

Solution

A function in mathematics is just a special case for a binary relation, where for every x there is exactly one y such that xRy is in the binary relation.

Computer science uses that term with the same meaning, as it uses lots of mathematical terms. It also uses the term "function" (or "subroutine", "procedure", "method") with a totally different meaning of one component of a program in the area of computer programming.

Just like the word "function" would be used with a completely different meaning in patent law (functional vs. decorative components) architecture (a functional design), medicine or psychology (like a "functional alcoholic").

Context

StackExchange Computer Science Q#130998, answer score: 4

Revisions (0)

No revisions yet.