Top "Modulo" questions

The modulo (sometimes called modulus) operation finds the remainder of division of one number by another.

How do you do modulo or remainder in Erlang?

I'm brand new to Erlang. How do you do modulo (get the remainder of a division)? It's % in most C-like …

erlang modulo
How to get the modulus of a number in XPath/XSLT?

I want to calculate the modulus of a number in the XPath, but this is not working: <xsl:if …

xslt xpath modulo
Weird Objective-C Mod Behavior for Negative Numbers

So I thought that negative numbers, when mod'ed should be put into positive space... I cant get this to happen …

objective-c modulo
In Scala, why could remainder (%) operator return a negative number?

For example, (-3) % 2 will return -1 instead of 1. What is the preferred way to get the positive remainder in Scala? …

java scala modulo
Better ways to implement a modulo operation (algorithm question)

I've been trying to implement a modular exponentiator recently. I'm writing the code in VHDL, but I'm looking for advice …

algorithm modulo vhdl
What is the modulo operator for longs in Java?

How do I find the modulo (%) of two long values in Java? My code says 'Integer number too large' followed …

java long-integer modulo modulus
Is & faster than % when checking for odd numbers?

To check for odd and even integer, is the lowest bit checking more efficient than using the modulo? >>&…

python performance bit-manipulation modulo
Recognizing when to use the modulus operator

I know the modulus (%) operator calculates the remainder of a division. How can I identify a situation where I would …

operators modulo
Mod operator in ios

have been searching for a mod operator in ios, just like the % in c, but no luck in finding it. …

ios iphone objective-c c modulo
Modular Exponentiation for high numbers in C++

So I've been working recently on an implementation of the Miller-Rabin primality test. I am limiting it to a scope …

c++ modulo integer-overflow exponentiation