My Math Forum Simplify modulus expression

 Number Theory Number Theory Math Forum

 June 28th, 2019, 05:44 AM #1 Newbie   Joined: Jun 2019 From: Italy Posts: 7 Thanks: 0 Simplify modulus expression Can someone tell me how to simplify this expression with modulus: $\displaystyle (A/100) mod 10 + (A/10) mod 10 + A mod 10$ where $\displaystyle A$ is an integer, but it can also be not divisible by 100. I tried doing this, but it doesn't work... $\displaystyle (A/100+A/10+A)mod 10$ Thanks
 June 28th, 2019, 08:22 AM #2 Member   Joined: Jun 2019 From: USA Posts: 69 Thanks: 27 I thought 111 was the key, but it's not working out so far. Not sure if it makes a difference, but are we taking $\displaystyle a mod b$ to be an integer (truncated mod) or allowing real numbers?
 June 28th, 2019, 11:28 AM #3 Newbie   Joined: Jun 2019 From: Italy Posts: 7 Thanks: 0 In this case we are takig all real numbers, so that for example $\displaystyle 6.5987 mod 2$ is congruent to $\displaystyle 0.5987$. We aren't considering truncated mod. What's 111, you've mentioned?
 June 28th, 2019, 11:55 AM #4 Member   Joined: Jun 2019 From: USA Posts: 69 Thanks: 27 Well, $\displaystyle (A/100) mod 10$ is the hundreds digit (plus everything after right-shifted two decimal places), $\displaystyle (A/10) mod 10$ is the tens digit, and $\displaystyle (A) mod 10$ is the ones digit. $\displaystyle A=1325$ yields 3.25 + 2.5 + 5 = 10.75. I thought multiplying by 111 (i.e., 100*1 + 10*1 + 1*1) either before or after the modulo might achieve the same result, but so far it doesn't seem to be working.
 June 28th, 2019, 12:14 PM #5 Newbie   Joined: Jun 2019 From: Italy Posts: 7 Thanks: 0 Thanks for your answer. Can't we use the proprieties:$\displaystyle (a + b)mod c = (a mod c + b mod c) mod c$?
 June 28th, 2019, 03:20 PM #6 Member   Joined: Jun 2019 From: USA Posts: 69 Thanks: 27 Not that I can see, because there's no modulo on the whole thing. $\displaystyle (A*1.11) mod 10$, for example almost works, but it's usually going to be off by a multiple of ten. $\displaystyle (1325*1.11) mod 10 = 1470.75 mod 10 = 0.75$, not 10.75. $\displaystyle (1325 mod 1000)*1.11 = 325*1.11 = 360.75$, again not 10.75.
 June 28th, 2019, 11:20 PM #7 Newbie   Joined: Jun 2019 From: Italy Posts: 7 Thanks: 0 So, there is no solution, I can't do any gathtering of $\displaystyle A$ or $\displaystyle mod\,\,10$?
 June 29th, 2019, 12:56 AM #8 Member   Joined: Jun 2019 From: USA Posts: 69 Thanks: 27 I said I can't see one. To say there isn't one, you'd have to define a form of the simplification you expect and formulate a proof that it cannot equal the original expression. As the username says, I'm an engineer, not a mathematician.
 June 29th, 2019, 02:35 PM #9 Newbie   Joined: Jun 2019 From: Italy Posts: 7 Thanks: 0 Thanks DarnItJimImAnEngineer. Others?

simplify modulo expressions

Click on a term to search for related topics.
 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post bongcloud Elementary Math 11 April 24th, 2018 10:15 AM Help123 Algebra 6 January 8th, 2018 03:13 PM Help123 Calculus 3 January 8th, 2018 03:02 PM unistu Trigonometry 8 January 17th, 2015 03:23 PM jaredbeach Algebra 2 September 2nd, 2011 09:00 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top