Annotation of OpenXM_contrib/pari/src/headers/paritype.h, Revision 1.1
1.1 ! maekawa 1: /* $Id: paritype.h,v 1.1.1.1 1999/09/16 13:47:45 karim Exp $ */
! 2:
! 3: /* DO NOT REORDER THESE
! 4: * actual values can be changed, but don't forget to adapt
! 5: * - lontyp/lontyp2 in gen2.c
! 6: * - the assembly file mp.s...
! 7: */
! 8: #define t_SMALL 0
! 9: #define t_INT 1
! 10: #define t_REAL 2
! 11: #define t_INTMOD 3
! 12: #define t_FRAC 4
! 13: #define t_FRACN 5
! 14: #define t_COMPLEX 6
! 15: #define t_PADIC 7
! 16: #define t_QUAD 8
! 17: #define t_POLMOD 9
! 18: #define t_POL 10
! 19: #define t_SER 11
! 20: #define t_RFRAC 13
! 21: #define t_RFRACN 14
! 22: #define t_QFR 15
! 23: #define t_QFI 16
! 24: #define t_VEC 17
! 25: #define t_COL 18
! 26: #define t_MAT 19
! 27: #define t_LIST 20
! 28: #define t_STR 21
! 29: #define t_VECSMALL 22
! 30:
! 31: #define is_recursive_t(t) (lontyp[t])
! 32:
! 33: /* #define is_intreal_t(t) ( (t) == t_REAL || (t) == t_INT ) */
! 34: #define is_intreal_t(t) ( (t) <= t_REAL )
! 35:
! 36: #define is_frac_t(t) ( (t) == t_FRAC || (t) == t_FRACN )
! 37: #define is_rfrac_t(t) ( (t) == t_RFRAC || (t) == t_RFRACN )
! 38: #define is_polser_t(t) ( (t) == t_SER || (t) == t_POL )
! 39: #define is_vec_t(t) ( (t) == t_VEC || (t) == t_COL )
! 40: #define is_matvec_t(t) ( (t) >= t_VEC && (t) <= t_MAT )
! 41: #define is_scalar_t(tx) ((tx) < t_POL)
! 42: #define is_extscalar_t(tx) ((tx) <= t_POL)
! 43: #define is_const_t(tx) ((tx) < t_POLMOD)
! 44: /* pas terrible celui-la: pour deriv */
! 45:
! 46: #define is_qf_t(t) ( (t) == t_QFR || (t) == t_QFI )
! 47: #define is_mod_t(t) ( (t) == t_POLMOD || (t) == t_INTMOD )
! 48: #define has_lgef_t(t) ((t) == t_INT || (t) == t_POL)
! 49:
! 50: /* #define is_graphicvec_t(t) ( is_matvec_t(t) || is_qf_t(t) ) */
! 51: #define is_graphicvec_t(t) ( (t) >= t_QFR && (t) <= t_MAT )
! 52:
! 53: #define needsnewline(tx) (is_matvec(tx))
! 54: #define isscalar(x) (is_scalar_t(typ(x)) || (typ(x)==t_POL && lgef(x)<=3))
! 55: #define isnonscalar(x) (typ(x) == t_POL && lgef(x) > 3)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>