Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1030417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:41:46+00:00 2026-05-16T12:41:46+00:00

What is the difference between functions in math and functions in programming?

  • 0

What is the difference between functions in math and functions in programming?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T12:41:47+00:00Added an answer on May 16, 2026 at 12:41 pm

    In functional programming you have Referential Transparency, which means that you can replace a function with its value without altering the program. This is true in Math too, but this is not always true in Imperative languages.

    A math function is defined by: a relationship that maps elements from one set (A) to another (B), mapping each element of the first set with only one of the other set.
    In C (as in other programming languages) this is also true, you have your input set, and your output set (which is almost always only ONE).

    The main difference, is, then, that if you call f(x) in math, you will ALWAYS get the same answer, but if you call f'(x) in C, the answer may not be the same – the same arguments don’t always return the same output. A function in non-functional languages may not depend solely on the arguments you give them, but on other things in the program (enclosing scope, globals, builtins, state if you’re using object orientation).

    Another difference between math and C functions, is that in Math you can’t make a function that goes from a non-empty set to an empty set (in C this would be: You aren’t requiered to always return something with your function). Also, not all function are computable (I don’t know if there’s something similiar to this in math..). You don’t have functions for infinite sets (you have finite memory, so the set of the possible input parameters must be finite), but in math, you can define a function for infinite sets (like f: N -> N) and for uncountable sets (like f: R -> R) (In C you have floating point numbers, but they only represent a reduced set of real numbers, which is finite).

    Summarizing:

    In C you don’t always have Referential Transparency. Your functions may not always give the same output for the same input parameters. You can have Math functions that defined for an infinite set of inputs, but in C functions your input is finite. In C functions you can have functions that returns nothing, but in Math you can’t have that (if you have a function that has a non empty input set, you must map each element with one of another set).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What's the difference between the functions plot and line in MATLAB? Are they doing
I'm a newbie in Generic and my question is: what difference between two functions:
What the difference between jQuery's functions val() and text() ? Where would you use
What is the difference between the JavaScript functions decodeURIComponent and decodeURI ?
What is the difference between the two functions? Any performance difference? Thanks..
What is the difference between these two functions? 1: $(document).ready(function myfunc() { function dosomething()
What's the difference between RANK() and DENSE_RANK() functions? How to find out nth salary
What is the difference between the map and flatMap functions of Iterable ?
What is difference between page_load and onLoad functions in ASP.NET codebehind?
What is the difference between JavaScript's window.location.href = window.location.href and window.location.reload() functions?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.