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