If x mod y equals a. I know that a = the remainder of x divided by y.
I've got a mental block and I can't figure out how I'd program mod without the utilization of the mod ("%") function. I have some variables in a program I'm using that I cannot use the mod function directly upon, without it disrupting the equation.
Anyone mind typing out some quick code of how I could substitute the mod function? My numbers are anywhere from 1 to 512 bit numbers I'm trying to mod.
I was not aware of the command "floor", thank you for that. Though, I'm still in need of help; boost::multiprecision (for the 512bit integers) doesn't have a matching function to call for "floor" 8(
I've got to do it with fractions that cannot be simplified until after the modulus is completed. The only way I've found to do that is to do each numerator/denominator individually. Peter87, that's what I'm asking for, what the arithmetic operations would be, though I may have found them.