xref: /plan9/sys/src/cmd/unix/drawterm/libmp/dat.h (revision ec59a3ddbfceee0efe34584c2c9981a5e5ff1ec4)
1 #define	mpdighi  (mpdigit)(1U<<(Dbits-1))
2 #define DIGITS(x) ((Dbits - 1 + (x))/Dbits)
3 
4 // for converting between int's and mpint's
5 #define MAXUINT ((uint)-1)
6 #define MAXINT (MAXUINT>>1)
7 #define MININT (MAXINT+1)
8 
9 // for converting between vlongs's and mpint's
10 // #define MAXUVLONG (~0ULL)
11 // #define MAXVLONG (MAXUVLONG>>1)
12 // #define MINVLONG (MAXVLONG+1ULL)
13 #define MAXUVLONG ((uvlong) ~0)
14 #define MAXVLONG (MAXUVLONG>>1)
15 #define MINVLONG (MAXVLONG+((uvlong) 1))
16