Thread: Odd math

  1. #1
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607

    Odd math

    What is it called when you take a value and perform an operation on it and return the identical value?

    The formula to convert Celsius to Fahrenheit is

    F=(9/5C)+32

    Vice versa is:

    C=(F-32)(5/9)

    If you use the value -40, you get the same result. 9/5 is 1.8 in decimal

    1.8*(-40)+32 = -40
    (-40-32)(1.8)=-40

    I dunno why this works out this way and would be interested for someone to explain how and why it does.

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    It's called an intersection, I think. You can see the result quite nicely in a graphing calculator. You enter in the two formulae; each will be a line of different slope. The point at which the lines intersect is the point where what you mentioned is true. (Sorry if you already know this, which I'm sure you do.)
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #3
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Well I know what an intersection is, but I guess it never dawned on me. It sure would have saved me at work where I thought people were not putting in enough antifreeze to reach -40C. After a bit of testing we realized that the two temps were the same.

    Oddly enough the formulas look to be in the form y=mx+b.

  4. #4
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Living in a country that's so close to the US but uses Celsius (ie Canada) means that you have to be familiar with those things.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  5. #5
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Quote Originally Posted by Bubba
    What is it called when you take a value and perform an operation on it and return the identical value?
    Are you referring to an identity?
    Though those aren't normally defined for a specific value, but instead all allowed values.

    The intersection would give you the point where it wouldn't matter which formula you used, not which value would return that same value.

    Oddly enough the formulas look to be in the form y=mx+b
    Yep the would be. The three major scales are all linear (kelvin and celsius are actually parallel)

  6. #6
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Yeah, I remember this from playing the trivia game MindTrap. When I had to do a programming assignment in university recently (I am learning Java as a first year university student, fortunately or unfortunately), one of the first things I did to test was to try out -40.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  7. #7
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    The intersection would give you the point where it wouldn't matter which formula you used, not which value would return that same value.
    It also gives the point at which the functions have the same value, because if it doesn't matter which one you use, they must be the same, must they not?
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  8. #8
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Yes the intersection would give you the same value regardless of the equation used, but thats not what I said.

    The intersection of two linear equations does not guartnee that f(x) = x, it only tells you that f(x) = y = g(x). I'd be willing to stipulate that for the majority of functions no such value exists, though I suppose that having the two functions be inverses of each other my play a part in it.

  9. #9
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Quote Originally Posted by dwks
    Living in a country that's so close to the US but uses Celsius (ie Canada) means that you have to be familiar with those things.
    US uses Fahrenheit? Wow, I didn't know it before...

  10. #10
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Yeah and inches, quarts, miles per hour, and pounds per foot (instead of newton meters).

  11. #11
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    What is it called when you take a value and perform an operation on it and return the identical value?
    Any function can have one or more values in its domination that is maped to the same value in its range. There is a special function that maps all values to themselves f(x)=x. It has a special name, but I don't know what it is in English.

    You know that
    F=(9/5C)+32 is as same as C=(F-32)(5/9), they are the same equations.
    And because it is a linear equation, one x is only maped to one F(x) so it can be inverted esily as we do.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  12. #12
    Fear the Reaper...
    Join Date
    Aug 2005
    Location
    Toronto, Ontario, Canada
    Posts
    625
    A value x such that f(x) = x for a function f is called a fixed point.
    In this sense, you could say -40 if a fixed point of the funtion F = (9/5)C + 32.

    That link gives a somewhat broad definition of a fixed point. Here's another one that's not too bad, but a little bit more clear :

    http://en.wikipedia.org/wiki/Fixed_p...mathematics%29
    Teacher: "You connect with Internet Explorer, but what is your browser? You know, Yahoo, Webcrawler...?" It's great to see the educational system moving in the right direction

  13. #13
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Geometrically, such a value exists if and only if the graphs of the two functions intersect.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  14. #14
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    You mean the graph and the line intersect, no?

    Because a fixed point is calculated from one function only.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  15. #15
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,273
    Here's a spreadsheet with a graph of stuff for ya.

    Attachment 6785

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Math
    By knightjp in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 04-01-2009, 05:36 PM
  2. Basic Math Problem. Undefined Math Functions
    By gsoft in forum C Programming
    Replies: 1
    Last Post: 12-28-2004, 03:14 AM
  3. Math Header?
    By Rune Hunter in forum C++ Programming
    Replies: 26
    Last Post: 09-17-2004, 06:39 AM
  4. toughest math course
    By axon in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 10-28-2003, 10:06 PM
  5. Homework help
    By Jigsaw in forum C++ Programming
    Replies: 2
    Last Post: 03-06-2002, 05:56 PM