Tag: modulo

727 Integer division with remainder in JavaScript? 2010-11-19T18:53:13.800

450 How does a hash table work? 2009-04-08T15:48:59.690

248 Why do people say there is modulo bias when using a random number generator? 2012-06-11T17:44:03.120

206 What's the syntax for mod in java 2008-09-18T05:17:15.797

197 JavaScript % (modulo) gives a negative result for negative numbers 2010-12-17T03:55:33.870

169 How does % work in Python? 2010-12-13T18:31:15.917

150 Mod of negative number is melting my brain 2009-07-04T20:22:43.960

149 Can't use modulus on doubles? 2012-02-04T06:02:38.923

145 Modulo operation with negative numbers 2012-07-30T11:31:22.290

138 Why does 2 mod 4 = 2? 2009-08-29T17:15:49.600

118 How to use mod operator in bash? 2011-04-16T18:21:47.413

104 How to get the separate digits of an int number? 2010-08-02T15:35:16.057

98 Find if variable is divisible by 2 2010-05-12T16:59:20.480

90 The modulo operator (%) gives a different result for different .NET versions in C# 2014-01-31T13:53:03.260

86 Best way to make Java's modulus behave like it should with negative numbers? 2010-12-10T18:43:56.203

85 How does java do modulus calculations with negative numbers? 2010-12-09T21:57:28.937

83 How Does Modulus Divison Work 2010-04-18T22:44:00.933

78 How to make a modulo operation in objective-c / cocoa touch? 2009-08-13T10:02:46.353

75 How to code a modulo (%) operator in C/C++/Obj-C that handles negative numbers 2010-10-23T09:10:09.003

63 How to calculate modulus of large numbers? 2010-02-01T15:33:18.703

61 C and Python - different behaviour of the modulo (%) operation 2009-12-15T13:46:07.003

52 Fastest way to calculate a 128-bit integer modulo a 64-bit integer 2010-04-02T09:54:09.110

52 Recognizing when to use the modulus operator 2010-04-09T16:54:38.020

52 The modulo operation on negative numbers in Python 2010-10-07T15:00:39.000

52 Can't Mod Zero? 2011-09-10T06:58:09.080

44 Why does C++ output negative numbers when using modulo? 2012-07-24T11:54:52.570

42 Weird Objective-C Mod Behavior for Negative Numbers 2009-06-13T04:05:36.783

42 Divide and Get Remainder at the same time? 2010-10-09T00:03:19.073

41 What does the percentage sign mean in Python 2009-06-07T06:47:03.097

40 How do you do modulo or remainder in Erlang? 2008-12-09T15:52:40.233

37 What does the percent sign mean in PHP? 2009-12-19T21:21:08.703

37 is it better to avoid using the mod operator when possible? 2013-03-24T07:54:43.683

35 Check if a number is divisible by 3 2010-08-06T06:55:39.960

32 How does a modulo operation work when the first number is smaller? 2009-10-08T04:39:10.343

32 Is there a modulus (not remainder) function / operation? 2015-07-03T15:39:32.103

31 Is there any alternative to using % (modulus) in C/C++? 2008-09-07T02:31:29.703

30 Assembly Language - How to Do Modulo? 2011-11-05T17:07:53.083

28 C: How to wrap a float to the interval [-pi, pi) 2011-01-08T08:54:54.573

27 Ruby: divisible by 4 2012-01-11T10:43:35.730

27 Testing oddity of an integer with the modulo operator 2013-05-17T12:44:26.773

26 Is & faster than % when checking for odd numbers? 2009-07-07T01:26:42.657

26 Lua replacement for the % operator 2012-03-14T03:54:59.257

26 Python modulo on floats 2013-02-08T00:29:05.320

26 Division ( / ) not giving my answer in postgresql 2015-12-29T04:38:28.420

25 Mathematical modulus in c# 2010-04-22T13:10:49.203

25 How can I modulo when my numbers start from 1, not zero? 2010-09-27T11:25:36.543

25 Maximum subarray sum modulo M 2015-06-29T11:01:39.007

24 Does INT_MIN % -1 produce undefined behavior? 2011-05-08T01:19:03.453

24 Rounding time in Python 2011-07-24T11:21:49.133

23 Python-style integer division & modulus in C 2009-05-06T05:02:42.167

23 Is arithmetic overflow equivalent to modulo operation? 2014-02-06T18:35:39.027

23 'MOD' is not a recognized built-in function name 2014-04-26T12:10:48.170

21 Why is modulus different in different programming languages? 2009-01-16T13:31:27.697

20 Modulus with negative numbers in C++ 2012-09-05T07:39:49.910

20 C++ operator % guarantees 2012-10-03T14:38:27.240

19 How can I get the quotient and the remainder in a single step? 2011-11-29T21:54:24.910

19 Why does CoffeeScript use %% for modulo instead of the standard javascript operator % 2014-04-17T06:52:08.923

18 Modulo of negative numbers 2010-08-05T17:00:49.433

18 Does either ANSI C or ISO C specify what -5 % 10 should be? 2010-08-31T13:44:04.677

18 Floating Point Modulo Operation 2012-02-29T19:38:13.100

18 Mod operator in ios 2012-04-27T13:14:12.587

17 Check if a number is divisible by 3 2009-05-10T07:22:00.477

16 Modulus operation with negatives values - weird thing? 2008-09-04T13:36:46.917

16 What's the idea of doing x mod 1000000007? 2012-09-25T07:43:46.807

16 How to calculate modulo of negative integers in JavaScript? 2013-09-04T15:37:42.030

16 Why is a modulo operation returning an unexpected value 2015-08-14T21:39:36.993

16 Is modulo slow in Java? 2016-03-04T00:09:55.260

15 nth-child with mod (or modulo) operator 2011-05-25T16:34:21.150

15 Computing x mod y where y is not representable as floating point 2011-06-25T04:02:18.657

15 Modulus/Remainder function for non-integers 2012-12-25T05:07:48.627

15 Sum divisible by n 2016-02-20T23:13:25.133

14 How to get the modulus of a number in XPath/XSLT? 2009-03-04T03:02:10.643

14 Modulo in JavaScript - large number 2009-05-30T15:15:38.610

14 Difference Between Modulus Implementation in Python Vs Java 2010-02-07T00:16:41.610

13 Implementing the modulo operator as a function in C 2010-04-18T03:19:37.227

13 Is there an expression using modulo to do backwards wrap-around ("reverse overflow")? 2013-02-09T05:59:26.487

12 Modular Exponentiation for high numbers in C++ 2010-02-05T12:04:10.053

12 "Nearly divisible" 2010-03-22T04:10:24.817

12 How can I do mod without a mod operator? 2010-05-03T23:54:19.680

12 Better ways to implement a modulo operation (algorithm question) 2010-05-05T13:33:53.607

12 C# ModInverse Function 2011-09-20T10:30:37.323

12 Fastest algorithm to compute (a^(2^N))%m? 2012-03-22T07:35:43.190

11 How do you calculate div and mod of floating point numbers? 2009-01-30T06:52:21.247

11 Fastest modular exponentiation in JavaScript 2009-09-20T08:48:24.243

11 What are the practical uses of modulus (%) in programming? 2010-08-28T08:01:53.253

11 Is it possible to rewrite modulo (2^n - 1) using bitwise and restricted operators 2011-10-10T07:24:18.763

11 Alternative to using % operator and / Operator in C++ 2011-11-15T06:09:37.703

11 Calculate modulo in sh script 2011-11-30T14:01:21.333

11 operator modulo change in c++ 11? 2012-10-27T13:46:12.850

11 Java - Is there a method for Euclidean or floored modulo 2013-02-08T09:58:17.680

11 Modulus division when first number is smaller than second number 2013-05-01T01:52:13.937

11 Do C/C++ compilers such as GCC generally optimize modulo by a constant power of 2? 2014-03-17T03:28:09.010

10 Efficient (cycles wise) algorithm to compute modulo 25? 2009-06-11T12:01:38.043

10 How can I achieve a modulus operation with System.TimeSpan values, without looping? 2009-08-18T18:45:52.773

10 What is the modulo operator for longs in Java? 2011-04-20T23:02:07.063

10 Using modulus operator to keep within indices of container 2011-07-20T16:12:39.477

10 Numpy matrix power/exponent with modulo? 2011-12-15T02:54:18.310

10 re implement modulo using bit shifts? 2012-06-18T01:59:59.730

10 why using negative int for mod operation in toString method of Integer class in java src 2012-10-26T04:19:31.760