From b9b1c853917df1504dba8930834525f30b820076 Mon Sep 17 00:00:00 2001 From: mdw Date: Thu, 11 Nov 1999 17:47:55 +0000 Subject: [PATCH] Minor changes for different `mptypes.h' format. --- mpx.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/mpx.h b/mpx.h index edaea71..0f1a91d 100644 --- a/mpx.h +++ b/mpx.h @@ -1,6 +1,6 @@ /* -*-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 * @@ -30,6 +30,9 @@ /*----- 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. * @@ -63,6 +66,28 @@ # 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@ --- * -- 2.11.0