Questions tagged [mod]

For questions related with the *mod operation*, that can arise in Cryptography, Number Theory, Hashing, etc..

In computing, the modulo operation finds the remainder after division of one number by another (sometimes called modulus). Given two positive numbers, a (the dividend) and n (the divisor), a modulo n (abbreviated as a mod n) is the remainder of the Euclidean division of a by n.

437 questions
0
votes
1 answer

Fast floating point modpow

I am looking to compute a^b mod m where a & b are floating point numbers and m is an non-negative integer. The trivial solution is to do b multiplications which takes O(n) time, however my numbers a & b can be largish (~10 digits before the decimal…
will.fiset
  • 1,524
  • 1
  • 19
  • 29
0
votes
3 answers

Is worth to use mod to replace if statement for circle index

I need a variable to point the array index, and like circle to return 0 when it arrive the end of array. I know that I can use if statement to judge, but I'm not sure it's will more quickly or not to use mod to achieve same function, can anyone give…
aaa SA
  • 321
  • 1
  • 8
  • 16
0
votes
1 answer

mod_zeropush stopped working in ejabberd 16.03

I am using mod_zeropush to send push to offline users that are offline in xmpp/ejabberd it was working fine with ejabberd version 15.07 but when i updated my version it stopped working and not hitting this given url. 2016-05-12 14:07:57.107…
0
votes
1 answer

mod_zeropush not working with ejabberd 16.03

I am working with mod_zeropush and i was working fine with 15.07 until i switched to the ejabberd version 16.03. I am using Ubuntu OS 14.04 Copied all beam files again to ebin directory it iis last error === 2016-05-12 15:40:08.706 [error]…
0
votes
1 answer

Add a digit into a double

I'm trying to make a complex division calculator. I have a double[] and I want to add the mod of the previous array position to the start of the next number. For example, if I were to divide 1951 with 2, I split 19 and 51 into the double[], (meaning…
dotstream
  • 11
  • 2
0
votes
2 answers

apache 2.4 disk cache not writing to cahce root

I did the setup of apache 2.4 with the below configurations ProxyPass / "http://localhost:9081/" ProxyPassReverse / "http://localhost:9081/"
0
votes
0 answers

Isolating first command line arg assembly and modding it

I'm currently working with a nasm program in Assembly and I'm trying to write a program to determine if the first command line arg given is a leap year or not. I've successfully processed argument handling and the proper message displays when a user…
David Parks
  • 77
  • 1
  • 11
0
votes
1 answer

Redirect domain based on regular expression

I need to change domains when i have a certain path on the url request. More specifically i need to identify first if a certain path (/path) exists on the url request. If exists then show the website with the domain www.mynewdomain.com/path/. If…
Labrosb
  • 69
  • 1
  • 8
0
votes
2 answers

Issue setting article newsflash into a table

Hi I am trying to turn article newsflash into a list of links in a table. I remove intro text by commenting it out so that it will only show the article title, and alter the tmpl files. This is a php file called links. I duplicated vertical.php …
-1
votes
1 answer

I am trying to install bcml library but it errors

I am trying to install something but it keeps giving me errors, this is the command: pip3 install bcml I have tried to upgrade my pip, setuptools, but it keeps giving me errors. This is what shows up when I try and execute: C:\Program Files…
-1
votes
1 answer

what will be the value of (a*b*c )%k?

i have searched it everywhere, i only find the solution for (ab)%k which is ((a%k)(b%k))%k. i want to write the code for it . suppose i have been given an array of numbers a1 ,a2 , a3 , a4 ... , an. i have to find whether product of numbers any…
Sarraayush
  • 49
  • 5
-1
votes
2 answers

How to detect if an integer is two-digit or not in pascal. (no functions

How can I use mod, or div, to detect if a given positive integer is a two-tigit one? For instance, if the given number is 23 it will shows a message saying 'Two-digit number' But if the number is 230 it will show 'Not a two-digit number' NOTE: I…
-1
votes
1 answer

C# gives me different result of ModPow from Java & Python. Is this a bug?

all I am Joshua. Currently I am developing some kind of calculation logic in C#, .NET 4.7. And I am stuck for a couple of days when using ModPow from BigInteger class. Finally I compared with some other languages like Javascript and Python. Here are…
Joshua Son
  • 1,839
  • 6
  • 31
  • 51
-1
votes
1 answer

I encountered the 10^9+7 problem but I can't understand the relation between the distributive properties of mod and my problem

Given 3 numbers a b c get a^b , b^a , c^x where x is abs diff between b and a cout each one but mod 10^9+7 in ascending order. well I searched web for how to use the distributive property but didn't understand it since I am beginner, I use very…
-1
votes
1 answer

Can we solve this using dynamic programming?

Find the number of subsequences of size n, with sum such that after taking modulo m, the sum became greater or equal to x. Where: 1 <= n <= 42 1 <= m <= 10^9 0 <= x < m How to solve this?