How can you rearrange a formula to make a specific number the subject?

  • Context: High School 
  • Thread starter Thread starter mtanti
  • Start date Start date
Click For Summary
SUMMARY

This discussion focuses on rearranging formulas to make a specific number the subject, specifically using integer division (DIV) and modulus (MOD) operations. The formula for DIV is expressed as a DIV b = c, which can be rearranged to a = b * c, exemplified by 18 = 5 * 3. Similarly, for the MOD operation, a MOD b = c can be rearranged to a = b * c + c, demonstrated with 18 = 5 * 3 + 3. Understanding these rearrangements is crucial for programming tasks involving division and remainder calculations.

PREREQUISITES
  • Understanding of integer division (DIV) in programming
  • Familiarity with the modulus operation (MOD)
  • Basic algebraic manipulation skills
  • Knowledge of programming concepts related to loops and conditionals
NEXT STEPS
  • Research integer division (DIV) implementation in Python or Java
  • Learn about the applications of the MOD function in algorithm design
  • Explore advanced algebraic techniques for rearranging equations
  • Study the role of remainder calculations in data validation and error checking
USEFUL FOR

This discussion is beneficial for programmers, software developers, and students learning mathematical concepts in programming, particularly those working with algorithms that involve division and remainder operations.

mtanti
Messages
172
Reaction score
0
DIV is an integer division in programming where you take only the whole number. EG 18 DIV 5 = 3. How do you make 18 subject of the formula? say you have this question:
a DIV b = c (a)

Also there is another function which is called MOD which returns the remainder of 2 numbers. EG 18 MOD 5 = 3. The previous question has to do with making *this* 18 subject of the formula (18 MOD 5 = 18-5[18 DIV 5]) so if you can answer this there's no need to answer the previous question.
a MOD b = c (a)

10x! :smile:
 
Physics news on Phys.org
hmm, 3 mod 5=3, and 18 mod 5 =3. So what makes you think you can invert the formula? Do you simply mean

x mod y = z is equivalent to y divides x-z, or if you prefer, there is a k such that x+ky=z.
 


Sure, I would be happy to help with balancing DIV and MOD in programming! To make 18 the subject of the formula in the first question, we can rearrange the formula to solve for a: a = b * c. So in this case, 18 = 5 * 3. This means that 5 is the divisor and 3 is the quotient.

In the second question, we can use a similar approach to make 18 the subject of the formula. We can rearrange the formula to solve for a: a = b * c + c. So in this case, 18 = 5 * 3 + 3. This means that 5 is the divisor, 3 is the quotient, and the remainder is also 3.

The MOD function can be useful in situations where we need to find the remainder of a division operation. In the example you provided, 18 MOD 5 = 3, we can see that the remainder of dividing 18 by 5 is 3. This can be helpful in various programming tasks such as checking for even or odd numbers, or finding the remainder of a division operation in a loop.

I hope this helps! Let me know if you have any further questions. Happy coding! :smile:
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
3
Views
3K
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 6 ·
Replies
6
Views
8K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 16 ·
Replies
16
Views
3K