+/* --- @mp_bits@ --- *
+ *
+ * Arguments: @const mp *m@ = a multiprecision integer
+ *
+ * Returns: The number of bits required to represent @m@.
+ *
+ * Use: Calculates the external storage required for a multiprecision
+ * integer.
+ */
+
+unsigned long mp_bits(const mp *m)
+{
+ unsigned long bits;
+ MPX_BITS(bits, m->v, m->vl);
+ return (bits);
+}
+