1 | /**************************************************************** |
---|
2 | * |
---|
3 | * HEADER FILE: MP_PariBigInt.h |
---|
4 | * Authors: O. Bachmann, T. Metzner, H. Schoenemann, A. Sorgatz |
---|
5 | * Date: February 97 |
---|
6 | * |
---|
7 | ***************************************************************/ |
---|
8 | |
---|
9 | #ifndef _MP_PariBigInt_h |
---|
10 | #define _MP_PariBigInt_h |
---|
11 | |
---|
12 | #include "MP.h" |
---|
13 | #ifdef MP_HAVE_PARI |
---|
14 | |
---|
15 | /* Dirty hack with honors to andi: pari defines "overflow" identifier |
---|
16 | which conflicts with the definition in some libraries (e.g. in |
---|
17 | iostream -- hence, we overshadow this defitnition before includeing |
---|
18 | genpari */ |
---|
19 | #ifndef overflow |
---|
20 | #define overflow muff |
---|
21 | #include "genpari.h" |
---|
22 | #undef overflow |
---|
23 | #endif |
---|
24 | |
---|
25 | |
---|
26 | EXTERN MP_BigIntOps_t imp_pari_bigint_ops; |
---|
27 | |
---|
28 | EXTERN MP_Status_t IMP_GetPariBigInt _ANSI_ARGS_((MP_Link_pt link, |
---|
29 | MP_ApInt_t *pari_number)); |
---|
30 | EXTERN MP_Status_t IMP_PutPariBigInt _ANSI_ARGS_((MP_Link_pt link, |
---|
31 | MP_ApInt_t pari_number)); |
---|
32 | EXTERN char* IMP_PariBigIntToStr _ANSI_ARGS_((MP_ApInt_t pari_number, |
---|
33 | char *buffer)); |
---|
34 | EXTERN long IMP_PariBigIntAsciiSize _ANSI_ARGS_((MP_ApInt_t mp_number)); |
---|
35 | |
---|
36 | /* Memory mamagment for Pari BigInts: |
---|
37 | By default, the following functions are simple cgeti and empty; |
---|
38 | You can reset this at run-time to whatever fits your needs |
---|
39 | */ |
---|
40 | EXTERN GEN (*IMP_AllocCgeti) _ANSI_ARGS_((long)); |
---|
41 | EXTERN void (*IMP_FreeCgeti) _ANSI_ARGS_((GEN)); |
---|
42 | |
---|
43 | #ifdef HAVE_GMP_PARI_CONVERSIONS |
---|
44 | #include "mp_gmp.h" |
---|
45 | EXTERN mpz_ptr _pari_to_gmp(GEN pnum, mpz_ptr *gnum_ptr); |
---|
46 | EXTERN GEN _gmp_to_pari(mpz_ptr gnum); |
---|
47 | #endif |
---|
48 | |
---|
49 | #endif /* MP_HAVE_PARI */ |
---|
50 | |
---|
51 | #endif /* _MP_PariBigInt_h */ |
---|