Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can anyone confirm to me what this function calculates?

Function m(t);
r = q/5;
Return r;
End function

Ok so inputting numbers from $0-9$ (in numerical order) the output is as follows: $$6.4, 8.2, 10, 11.8, 13.6, 15.4, 17.2, 19, 20.8, 22.6 $$ Ok so clearly each value is being incremented by $1.8$. But would it be correct to say that the function adds increments by $1.8$?

share|cite|improve this question
Please be consistent between lower and upper case. If you divide by 5 before adding 32 you get the conversion from Celsius to Fahrenheit. – Ross Millikan Nov 3 '12 at 23:43
Sorry about the format. Yes I get the conversion for Celsius into Fahrenheit. This is why i am confused when i am being asked what this code calculates. – Fendorio Nov 3 '12 at 23:47
When the 32 is divided by 5, it takes Celsius and returns Fahrenheit-25.6. I don't think there is a better characterization than Alexander Gruber has given. – Ross Millikan Nov 3 '12 at 23:49

$M(t)=\frac{9t+32}{5}$ is the equation of a line with slope $9/5=1.8$ and $y$-intercept $32/5=6.4$.

share|cite|improve this answer
As a result, the rate of change of $M(t)$ is constant and is $9/5=1.8$ – NoChance Nov 3 '12 at 23:39
Ok so would i be right in saying: "This code calculates a constant rate of change of M(t) by 9/5 (1.8)"? As an answer to "Confirm what the code calculates"? I have this written down but just doesn't seem right to me – Fendorio Nov 3 '12 at 23:44
@Fendorio No. This code calculates the height of the line with the equation I wrote above as a function of $t$. It's just a linear equation. – Alexander Gruber Nov 3 '12 at 23:46

r = q/5 $\rightarrow$ r = (p + 32)/5 $\rightarrow$ r = (9t + 32)/5

Hence r = 9/5t + 32/5

equation of line is y = mx + b, so as we can see this is just equation of line of slope 9/5 and y-intercept of 32/5.

share|cite|improve this answer

So, we simplify the calculation to one-line equation $$r=\frac{9t+32}{5}$$

to find the increment, we separate the division, and do the division, which is $$r = \frac{9}{5}t + \frac{32}{5}$$ $$r = 1.8t + 6.4$$

and with $1.8t$, we can prove that the answer was incremented 1.8 when t incremented by 1

EDIT: if we use "Equation of a Straight Line" formula where $y = mx + b$ (or $y = mx + c$ in UK), we can use this formula to form a graph $y = 1.8x + 6.4$, where $m=1.8$, $b=6.4$

share|cite|improve this answer

Just work through the formula:

$r = \frac{q}{5} = \frac{p+32}{5} = \frac{9t+32}{5}$. It multiplies by 9, adds 32 and divides by 5. Or it multiplies by 0.18 and adds 6.4.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.