Commit graph

12 commits

Author SHA1 Message Date
Legrandin
6f6bfe785a Add or operator to Integer 2014-12-06 12:04:11 +01:00
Legrandin
2e40ae0f14 Change Math.Numbers.Natural into Integer 2014-12-06 12:04:10 +01:00
Legrandin
81e9b240a0 Added more methods to Natural.
Methods and operators added are:
* jacobi_symbol()
* multiplication
* simple exponentiation
* right shift
2014-12-06 12:04:10 +01:00
Legrandin
63c5588cf9 Simplify GMP code with _as_parameter_ 2014-12-06 12:04:10 +01:00
Legrandin
8847d4b700 Add is_perfect_square method to Natural 2014-12-06 12:04:10 +01:00
Legrandin
36bec9d410 Added more methods to Natural
Methods and operators added:
* random()
* and
* comparison
* bool
* in-place right shift
* size_in_bits()
* str
* is_even()
* is_odd()
2014-12-06 12:04:10 +01:00
Legrandin
4969bd2b66 Unit test will cover both Natural implementations 2014-12-06 12:04:10 +01:00
Legrandin
1b6ad42925 Added exponentiation to Natural 2014-12-06 12:04:10 +01:00
Legrandin
70f68f8b96 Stricter definitions for parameters to C calls 2014-12-06 12:04:10 +01:00
Legrandin
0e7e98d887 Fix problem with 64-bit machines and ctypes (long) 2014-12-06 12:04:10 +01:00
Legrandin
87e2f82965 Initial support for GMP 2014-12-06 12:04:10 +01:00
Legrandin
4121bdaa5b Added file for GMP backend 2014-12-06 12:04:10 +01:00