Results 1 to 4 of 4

Math Help - Function to find the ratio of a reference value given a low and high limit

  1. #1
    Newbie
    Joined
    Jan 2010
    Posts
    4

    Function to find the ratio of a reference value given a low and high limit

    Hi all, I am just looking for the generic name of a mathematical function that will return the ratio of a reference value between a supplied low and high limit. This is probably best illustrated by example:

    1st value is reference, second value is low, and third value is high
    SomeFunction(5, 0, 10) = 0.5
    SomeFunction(12, 10, 20) = 0.2
    SomeFunction(40, 20, 40) = 1

    Make sense?

    Thanks!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Junior Member allsmiles's Avatar
    Joined
    May 2010
    From
    Altlanta GA
    Posts
    53
    hmm i don't know what you want to me to?
    any help?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor

    Joined
    Apr 2005
    Posts
    15,596
    Thanks
    1421
    Well, it's not terribly clear! You seem to be saying that 5 is half way between 10 and 20, 12 is 0.2= 1/5 of the way between 10 and 20, and that 40 is all the way (1= 100%) between 20 and 40.

    If that is correct then your "some function" is f(x, y, z)= \frac{x- y}{z- y}.

    f(5, 0, 10)= \frac{5- 0}{10- 0}= \frac{5}{10}= 0.5
    f(12, 10, 20)= \frac{12- 10}{20-10}= \frac{2}{10}= 0.2
    f(40, 20, 40)= \frac{40- 20}{40- 20}= \frac{20}{20}= 1
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Jan 2010
    Posts
    4
    Thanks for the replies. Yes, HallsofIvy, you have pinpointed the function I am referring to. Sorry, I don't know math well enough to make it that clear (I could post my C++ code, but didn't know if that would confuse things further). I actually have the math behind the function figured out, but I don't know what to name it. I just assumed, with how much I use it, that there would be a proper mathematical name for it as I am sure many others have developed such a function.

    In my use of it, I have named it RatioInRange(), but if there is an official name, I would prefer to use it so that others who make use of my library will recognize the function by name, assuming there is a proper name for it.

    I also have a Blend() that reverses this by taking a ratio, a low and high, and converting it to a value in between the limits. I would like a proper name for this function too if there is one.

    e.g. Blend(0.5, 0, 10) = 5
    Last edited by gtzpower; August 20th 2010 at 09:41 AM. Reason: clarify
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Find point of deviation from reference
    Posted in the Math Topics Forum
    Replies: 12
    Last Post: March 11th 2011, 04:39 AM
  2. [SOLVED] solve limit with high powers
    Posted in the Calculus Forum
    Replies: 5
    Last Post: November 6th 2010, 05:16 AM
  3. Replies: 12
    Last Post: August 26th 2010, 10:59 AM
  4. find likelihood ratio test and the power function
    Posted in the Advanced Statistics Forum
    Replies: 4
    Last Post: February 24th 2009, 07:11 AM
  5. how do you find the reference angle of csc, sec, cot
    Posted in the Trigonometry Forum
    Replies: 3
    Last Post: February 4th 2008, 02:27 PM

Search Tags


/mathhelpforum @mathhelpforum