-/*
- * To handle arbitrary floating point precision, the buffer has to hold the
- * number, a decimal point, and N precision digits. We can't just truncate
- * at some point is that the lower-level math routines may very well be
- * repeatedly returning some small fraction. A 128 bit fraction can be
- * represented in 39 decimal digits. Guess a max of 40 digits of precision,
- * and add one for the decimal point.
- */
-#define MAXFRAC 39
-#define MAXPREC 40
-#define MAXDIGIT (MAXFRAC + MAXPREC + 1)
+/* 11-bit exponent (VAX G floating point) is 308 decimal digits */
+#define MAXEXP 308
+/* 128 bit fraction takes up 39 decimal digits; max reasonable precision */
+#define MAXFRACT 39
+
+#define BUF (MAXEXP+MAXFRACT+1) /* + decimal point */