SIGforum
Looking for the name of a mathematical function
August 26, 2025, 10:58 PM
Pipe SmokerLooking for the name of a mathematical function
Specifically (new - old) / |old|
I created that function and named it rchng (relative change). But I suspect that there’s a common name for it. Does anyone know?
Serious about crackers. August 26, 2025, 11:29 PM
12131What happened to
(a - b) / |b|?
Anyway, Grok says “normalized difference” or “relative difference”.
Q
August 26, 2025, 11:56 PM
konata88Depends on context? Looks like percentage gain or percentage change to me.
Relative change works for me.
"Wrong does not cease to be wrong because the majority share in it." L.Tolstoy
"A government is just a body of people, usually, notably, ungoverned." Shepherd Book August 27, 2025, 07:48 AM
Pipe Smokerquote:
Originally posted by 12131:
What happened to (a - b) / |b|?
Anyway, Grok says “normalized difference” or “relative difference”.
Thanks Q. My name guess, “relative change”, was pretty close.
And I decided to revise the argument names for clarity of purpose.
Serious about crackers. August 27, 2025, 08:30 AM
KeystonerI've always called that 'percent difference' but the form of the equation in the OP will give a decimal answer. I don't see the need to include the absolute value in the denominator. The signs work themselves out and if you're trying to force non-negative answers, that won't work.
The danger of baobabs is so little recognized. August 27, 2025, 08:35 AM
Sig2340Why the absolute value in the denominator?
Nice is overrated
"It's every freedom-loving individual's duty to lie to the government."
Airsoftguy, June 29, 2018
August 27, 2025, 10:50 AM
Pipe Smokerquote:
Originally posted by Keystoner:
I've always called that 'percent difference' but the form of the equation in the OP will give a decimal answer.
Me: it’s definitely not percent. I have another function, percentify, that I sometimes use in tandem with rchng. E.g.:
percentify(rchng(old, new), 2)
will multiply the rchng result by 100, round it to two decimal places, then append a ”%” character.
I don't see the need to include the absolute value in the denominator. The signs work themselves out
Me: because I want to know the direction of the change as well as its magnitude. I think I’m doing that correctly.
and if you're trying to force non-negative answers, that won't work.
Me: I’m not.
Serious about crackers. August 27, 2025, 11:57 AM
Rey HRHquote:
Originally posted by Pipe Smoker:
Specifically (new - old) / |old|
I created that function and named it rchng (relative change). But I suspect that there’s a common name for it. Does anyone know?
It’s all in the context. It really is as you call it - relative change or relative delta.
"It did not really matter what we expected from life, but rather what life expected from us. We needed to stop asking about the meaning of life, and instead to think of ourselves as those who were being questioned by life – daily and hourly. Our answer must consist not in talk and meditation, but in right action and in right conduct. Life ultimately means taking the responsibility to find the right answer to its problems and to fulfill the tasks which it constantly sets for each individual." Viktor Frankl, Man's Search for Meaning, 1946.
August 28, 2025, 05:53 AM
4MUL8RAll I know is that Excel needs this function in its library. I am so tired of creating it in spreadsheets.
-------
Trying to simplify my life...
August 28, 2025, 07:56 AM
Pipe Smokerquote:
Originally posted by 12131:
<snip>
Anyway, Grok says “normalized difference” or “relative difference”.
Thanks (again) for the reply. And for the idea of using AI to find answers for such questions. I don’t have Grok, but when I posed this question:
“What is the name of this function:
(new - old) / |old|”
to ChatGPT (free version) just now, I got this result:
“This measure is the signed relative change (commonly called the relative change or fractional change); when multiplied by 100 it is the percent change. The absolute value in the denominator ensures the change is scaled by the magnitude of the original value regardless of its sign. …”
So my name choice was spot on, and my function implementation is correct.
Serious about crackers. August 28, 2025, 10:58 AM
V-Tailquote:
Originally posted by 4MUL8R:
All I know is that Excel needs this function in its library. I am so tired of creating it in spreadsheets.
I never thought about this before. I don't use Excel, I use LibreOffice, but a general thought re this type of spreadsheet -- they should have the ability to host a library of user-defined functions, so that a function can be used just like a built-in one, and does not have to be re-defined when a new spreadsheet is created.
הרחפת שלי מלאה בצלופחים August 28, 2025, 11:33 AM
bordethKonata is correct if we are speaking in a engineering / statistical manner. Percent difference is correct.
August 28, 2025, 12:39 PM
TRIOIn machining, we use this function to find the adjusted feed rate depending on use. The adjusted feed rate is due to Radial Depth of Cut due to chip thickness changes.
Example: cutting inside a bore with an end mill, it would be ((part size-tool size)/part size)× linear feed rate.
See
linkIf external feature, like a boss, then the tool is added instead.
August 28, 2025, 01:15 PM
Pipe Smokerquote:
Originally posted by bordeth:
Konata is correct if we are speaking in a engineering / statistical manner. Percent difference is correct.
Apparently you didn’t read the thread. In particular, my post four above this post. Percent difference is certainly not correct. The return value would have to be multiplied by 100 in order to produce percent difference.
Serious about crackers. August 29, 2025, 05:22 AM
dan03833quote:
Originally posted by Pipe Smoker:
Specifically (new - old) / |old|
I created that function and named it rchng (relative change). But I suspect that there’s a common name for it. Does anyone know?
% change
August 29, 2025, 07:37 AM
Pipe Smokerquote:
Originally posted by dan03833:
quote:
Originally posted by Pipe Smoker:
Specifically (new - old) / |old|
I created that function and named it rchng (relative change). But I suspect that there’s a common name for it. Does anyone know?
% change
No, no, and no.
Serious about crackers. August 30, 2025, 07:58 AM
snideraquote:
Originally posted by Pipe Smoker:
quote:
Originally posted by dan03833:
quote:
Originally posted by Pipe Smoker:
Specifically (new - old) / |old|
I created that function and named it rchng (relative change). But I suspect that there’s a common name for it. Does anyone know?
% change
No, no, and no.
I've also always called it %change even when I don't convert the decimal to a %, can you explain the difference?
The calculation is the same, the result is a fraction of the 'old'. You can express that fraction as a decimal, percentage or if you want to be really weird, an actual fraction.
Old > New
1 > 2 = 'relative Change of +1' or 'relative change of +100%'
1 > 1.5 = rC of +0.5 or +50%
1 > 0.5 = rC of -0.5 or -50%
August 30, 2025, 08:11 AM
Pipe Smoker^^^^^
The function that I presented in the OP is:
(new - old) / |old|
A percent change function would be:
100 * (new - old) / |old|
The ChatGPT description, 8 posts above, states the same:
“This measure is the signed relative change (commonly called the relative change or fractional change);
when multiplied by 100 it is the percent change.“
Serious about crackers. August 30, 2025, 08:32 AM
Rey HRHquote:
Originally posted by Pipe Smoker:
^^^^^
The function that I presented in the OP is:
(new - old) / |old|
A percent difference function would be:
100 * (new - old) / |old|
The ChatGPT description, 8 posts above, states the same:
“This measure is the signed relative change (commonly called the relative change or fractional change); when multiplied by 100 it is the percent change.“
I think you’re playing semantics now or you’re not understanding the math correctly. You’re free to call it whatever you want but you’re not multiplying anything with 100 to get a percent.
You’re multiplying the result with a conversion factor, specifically 100%/1. 100%/1 equals 1; you multiply or divide anything by 1 and you still get the same answer. That’s how you get the % symbol in the answer. Putting it in terms of percentages doesn’t change the mathematical result; it only appends the percent symbol so people can understand the context.
And I can prove this by you entering your formula into an excel spreadsheet to get a number and then using ctrl+i to change the cell format from number to percent. Excel is not adding anything to the formula; it’s converting how the number is displayed for humans. It isn’t multiplying or dividing anything by 100 to get the percent.
"It did not really matter what we expected from life, but rather what life expected from us. We needed to stop asking about the meaning of life, and instead to think of ourselves as those who were being questioned by life – daily and hourly. Our answer must consist not in talk and meditation, but in right action and in right conduct. Life ultimately means taking the responsibility to find the right answer to its problems and to fulfill the tasks which it constantly sets for each individual." Viktor Frankl, Man's Search for Meaning, 1946.
August 30, 2025, 08:53 AM
Pipe Smokerquote:
Originally posted by Rey HRH:
<snip>
I think you’re playing semantics now.
<snip>
If so it’s the same semantics that ChatGPT is playing:
“This measure is the signed relative change (commonly called the relative change or fractional change); when multiplied by 100 it is the percent change.“
Relative change function:
(new - old) / |old|
Percent change function:
100 * (new - old) / |old|
Serious about crackers.