search for: check_remainder

Displaying 1 result from an estimated 1 matches for "check_remainder".

2019 Feb 20
2
proposal for optimization method
Hello everyone, I discovered a way to perform optimization on the following code (I gave an example that uses 32bit integer, but it works with any size.): const uint32 d,r;//d is an odd number //d is the divisor, r is the remainder bool check_remainder(uint32 x) { return x%d==r; } if we know d and r at compile time, and d is an odd integer, we can use modular multiplicative inverse to bypass the division operation. I wrote the following code to calculate the M.M.I of a number over 2^b. I give anyone the permission to use it (unlicensed). uint64...