Recent content by chesschi

  1. C

    C/C++ Solving Modular Multiplication with C/C++

    a, b and c both are 64 bit integers, c is arbitary number, may not be in power of 2. but a * b will generate a 128 bit intermediate integers which will overflow. So I believe there is an algorithm to deal with such problem I'm not sure if this is correct...I just read some websites talking...
  2. C

    C/C++ Solving Modular Multiplication with C/C++

    I want to write a C/C++ program and encounter a problem.If I have three 64 bit numbers and need to manipulate "a * b mod c" Is there any well-known, efficient and simple algorithm to implement it? I only know it can be calculated sth. like this.. __int64 a, b, c a = x1 * 2^32 + x0 b =...
  3. C

    Modular Multiplication: How to Efficiently Calculate (a * b) mod c in C/C++?

    I want to write a C/C++ program and encounter a problem.If I have three 64 bit numbers and need to manipulate "a * b mod c" Is there any well-known, efficient and simple algorithm to implement it? I only know it can be calculated sth. like this.. __int64 a, b, c a = x1 * 2^32 + x0 b =...
Back
Top