summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1995-03-08 21:33:04 (GMT)
committerBarry Warsaw <barry@python.org>1995-03-08 21:33:04 (GMT)
commit7b0f5681d8a49303540b8df8571083cd54740c1c (patch)
treefd715f6a7ff46d84a6fc3ce1f9056ba966ee322b /Python/pythonrun.c
parent3b0a5cdb233c7b1ada69e39556b12c59ea389d1d (diff)
downloadcpython-7b0f5681d8a49303540b8df8571083cd54740c1c.zip
cpython-7b0f5681d8a49303540b8df8571083cd54740c1c.tar.gz
cpython-7b0f5681d8a49303540b8df8571083cd54740c1c.tar.bz2
#initial stylistic rewrite
Diffstat (limited to 'Python/pythonrun.c')
0 files changed, 0 insertions, 0 deletions
ption> Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
path: root/libtommath/bn_mp_reduce_setup.c
blob: d8cefd9f561c3932ed8fb8cb3b546afe50a901f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <tommath.h>
#ifdef BN_MP_REDUCE_SETUP_C
/* LibTomMath, multiple-precision integer library -- Tom St Denis
 *
 * LibTomMath is a library that provides multiple-precision
 * integer arithmetic as well as number theoretic functionality.
 *
 * The library was designed directly after the MPI library by
 * Michael Fromberger but has been written from scratch with
 * additional optimizations in place.
 *
 * The library is free for all purposes without any express
 * guarantee it works.
 *
 * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
 */

/* pre-calculate the value required for Barrett reduction
 * For a given modulus "b" it calulates the value required in "a"
 */
int mp_reduce_setup (mp_int * a, mp_int * b)
{
  int     res;
  
  if ((res = mp_2expt (a, b->used * 2 * DIGIT_BIT)) != MP_OKAY) {
    return res;
  }
  return mp_div (a, b, a, NULL);
}
#endif