/* -*-c-*-
*
- * $Id: mpx.h,v 1.1 1999/09/03 08:41:12 mdw Exp $
+ * $Id: mpx.h,v 1.2 1999/11/11 17:47:55 mdw Exp $
*
* Low level multiprecision arithmetic
*
/*----- Revision history --------------------------------------------------*
*
* $Log: mpx.h,v $
+ * Revision 1.2 1999/11/11 17:47:55 mdw
+ * Minor changes for different `mptypes.h' format.
+ *
* Revision 1.1 1999/09/03 08:41:12 mdw
* Initial import.
*
# include "mptypes.h"
#endif
+/*----- Basic macros ------------------------------------------------------*/
+
+/* --- @MPW@ --- *
+ *
+ * Arguments: @x@ = an unsigned value
+ *
+ * Use: Expands to the value of @x@ masked and typecast to a
+ * multiprecision integer word.
+ */
+
+#define MPW(x) ((mpw)((x) & MPW_MAX))
+
+/* --- @MPWS@ --- *
+ *
+ * Arguments: @n@ = number of words
+ *
+ * Use: Expands to the number of bytes occupied by a given number of
+ * words.
+ */
+
+#define MPWS(n) ((n) * sizeof(mpw))
+
/*----- General manipulation ----------------------------------------------*/
/* --- @MPX_SHRINK@ --- *