Annotation of OpenXM/src/ox_pari/ox_pari.h, Revision 1.4
1.1 noro 1: #include <stdio.h>
2: #include <stdlib.h>
3: #include <string.h>
4: #include "pari/pari.h"
1.3 noro 5: #if 0
1.1 noro 6: #include "pari/paripriv.h"
1.3 noro 7: #endif
1.1 noro 8: #include "gmp.h"
1.2 noro 9: /* inconsistency between PARI and GMP */
10: #undef un
1.1 noro 11: #include "gmp-impl.h"
12: #include "mpfr.h"
13: #include "ox_toolkit.h"
14:
15: void init_pari(void);
16: cmo_error2 *make_error2(char *message);
17:
1.4 ! noro 18: int gmp_check(void);
1.1 noro 19: cmo *GEN_to_cmo(GEN z);
20: cmo_zz *GEN_to_cmo_zz(GEN z);
21: cmo_qq *GEN_to_cmo_qq(GEN z);
22: cmo_bf *GEN_to_cmo_bf(GEN z);
23: cmo_list *GEN_to_cmo_list(GEN z);
24: cmo_complex *GEN_to_cmo_cmo_complex(GEN z);
25: cmo_polynomial_in_one_variable *GEN_to_cmo_up(GEN z);
26: cmo_recursive_polynomial *GEN_to_cmo_rp(GEN z);
27:
28: GEN cmo_to_GEN(cmo *c);
29: GEN cmo_int32_to_GEN(cmo_int32 *c);
30: GEN cmo_zz_to_GEN(cmo_zz *c);
31: GEN cmo_qq_to_GEN(cmo_qq *c);
32: GEN cmo_bf_to_GEN(cmo_bf *c);
33: GEN cmo_list_to_GEN(cmo_list *c);
34: GEN cmo_rp_to_GEN(cmo_recursive_polynomial *c);
35: GEN cmo_up_to_GEN(cmo_polynomial_in_one_variable *c);
36: GEN cmo_complex_to_GEN(cmo_complex *c);
37:
38: struct parif *search_parif(char *name);
39:
40: #define PARI_MAX_AC 64
41: struct parif {
42: char *name;
43: GEN (*f)();
44: int type;
1.3 noro 45: int opt;
1.1 noro 46: };
47:
48: #define MPFR_PREC(x) ((x)->_mpfr_prec)
49: #define MPFR_EXP(x) ((x)->_mpfr_exp)
50: #define MPFR_MANT(x) ((x)->_mpfr_d)
51: #define MPFR_LAST_LIMB(x) ((MPFR_PREC (x) - 1) / GMP_NUMB_BITS)
52: #define MPFR_LIMB_SIZE(x) (MPFR_LAST_LIMB (x) + 1)
53:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>