|
| 1 | +# distutils: libraries = flint |
| 2 | +# distutils: depends = flint/fmpz_mod.h |
| 3 | + |
| 4 | +# flint/fmpz_mod.h |
| 5 | +cdef extern from "flint_wrap.h": |
| 6 | + void fmpz_mod_ctx_init(fmpz_mod_ctx_t ctx, const fmpz_t n) |
| 7 | + void fmpz_mod_ctx_init_ui(fmpz_mod_ctx_t ctx, ulong n) |
| 8 | + void fmpz_mod_ctx_clear(fmpz_mod_ctx_t ctx) |
| 9 | + |
| 10 | + const fmpz * fmpz_mod_ctx_modulus(const fmpz_mod_ctx_t ctx) |
| 11 | + |
| 12 | + void fmpz_mod_ctx_set_modulus(fmpz_mod_ctx_t ctx, const fmpz_t n) |
| 13 | + void fmpz_mod_ctx_set_modulus_ui(fmpz_mod_ctx_t ctx, ulong n) |
| 14 | + |
| 15 | + int fmpz_mod_is_canonical(const fmpz_t a, const fmpz_mod_ctx_t ctx) |
| 16 | + void fmpz_mod_assert_canonical(const fmpz_t a, const fmpz_mod_ctx_t ctx) |
| 17 | + |
| 18 | + int fmpz_mod_is_one(const fmpz_t a, const fmpz_mod_ctx_t ctx) |
| 19 | + void fmpz_mod_add(fmpz_t a, const fmpz_t b, const fmpz_t c, const fmpz_mod_ctx_t ctx) |
| 20 | + void fmpz_mod_sub(fmpz_t a, const fmpz_t b, const fmpz_t c, const fmpz_mod_ctx_t ctx) |
| 21 | + void fmpz_mod_neg(fmpz_t a, const fmpz_t b, const fmpz_mod_ctx_t ctx) |
| 22 | + |
| 23 | + void fmpz_mod_mul(fmpz_t a, const fmpz_t b, const fmpz_t c, const fmpz_mod_ctx_t ctx) |
| 24 | + void fmpz_mod_inv(fmpz_t a, const fmpz_t b, const fmpz_mod_ctx_t ctx) |
| 25 | + |
| 26 | + int fmpz_mod_divides(fmpz_t a, const fmpz_t b, const fmpz_t c, const fmpz_mod_ctx_t ctx) |
| 27 | + void fmpz_mod_pow_ui(fmpz_t a, const fmpz_t b, ulong pow, const fmpz_mod_ctx_t ctx) |
| 28 | + int fmpz_mod_pow_fmpz(fmpz_t a, const fmpz_t b, const fmpz_t pow, const fmpz_mod_ctx_t ctx) |
| 29 | + |
| 30 | + void fmpz_mod_discrete_log_pohlig_hellman_init(fmpz_mod_discrete_log_pohlig_hellman_t L) |
| 31 | + |
| 32 | + void fmpz_mod_discrete_log_pohlig_hellman_clear(fmpz_mod_discrete_log_pohlig_hellman_t L) |
| 33 | + |
| 34 | + double fmpz_mod_discrete_log_pohlig_hellman_precompute_prime( |
| 35 | + fmpz_mod_discrete_log_pohlig_hellman_t L, |
| 36 | + const fmpz_t p) |
| 37 | + |
| 38 | + void fmpz_mod_discrete_log_pohlig_hellman_run( |
| 39 | + fmpz_t x, |
| 40 | + const fmpz_mod_discrete_log_pohlig_hellman_t L, |
| 41 | + const fmpz_t y) |
| 42 | + |
| 43 | + const fmpz * fmpz_mod_discrete_log_pohlig_hellman_primitive_root( |
| 44 | + fmpz_mod_discrete_log_pohlig_hellman_t L) |
| 45 | + |
| 46 | + int fmpz_next_smooth_prime(fmpz_t a, const fmpz_t b) |
0 commit comments