Top "Modulo" questions

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

How to make a modulo operation in objective-c / cocoa touch?

I have two CGFloat values, and want to calculate the modulo result. Or in other words: I want to know …

iphone modulo
JavaScript % (modulo) gives a negative result for negative numbers

According to Google Calculator (-13) % 64 is 51. According to Javascript (see this JSBin) it is -13. How do I fix this?

javascript math modulo
Rounding time in Python

What would be an elegant, efficient and Pythonic way to perform a h/m/s rounding operation on time related …

python datetime time modulo rounding
The modulo operation on negative numbers in Python

I've found some strange behaviour in Python regarding negative numbers: >>> -5 % 4 3 Could anyone explain what's going on?

python modulo negative-number
Division ( / ) not giving my answer in postgresql

I have a table software and columns in it as dev_cost, sell_cost. If dev_cost is 16000 and sell_…

sql postgresql division modulo
Lua replacement for the % operator

I want to check, if a number is divisible by another number: for i = 1, 100 do if i % 2 == 0 then print( i .. " …

math lua modulo
% (mod) explanation

Today I was writing a program in C#, and I used % to calculate some index... My program didn't work, so …

c# math operators modulo
What does the percent sign mean in PHP?

What exactly does this mean? $number = ( 3 - 2 + 7 ) % 7;

php operators modulo
Ruby: divisible by 4

This works fine, but I want to make it prettier - and accommodate all values that are divisible by 4: if …

ruby modulo
Can't Mod Zero?

Why is X % 0 an invalid expression? I always thought X % 0 should equal X. Since you can't divide by zero, shouldn't …

c++ modulo divide-by-zero