Notes on formatting
-------------------

We think of formatting as the composition of two operations: in the first operation
we round to a target Decimal format. In the second operation we present the value
from that format.

The first operation uses details of the target format. The target format contains
values of the form n x 10**e for integers n and e, where n < 10**p and e >= e_min.
It may optionally have signed zeros. The parameters of the target format are:

- max precision p >= 1, optional
- min exponent e_min, optional
- signed zero, boolean

For formatting to a fixed number of places after the point, we set e_min and allow
unbounded precision. For formatting to a fixed number of significant figures, we
fix p and allow e_min to be arbitrarily negative. But hybrid modes with bounds on
both e_min and p also make sense. And the mode with neither p nor e_min limited also
makes sense for values that can be exactly represented in decimal, but would be
an error for a fraction like 1/3.

Other parameters of the first step include the rounding mode: "how" we're converting
to the target format, along with choices about trailing zero management: if formatting
"2.75" to 6 places after the point, should the result be 2.75 or 2.750000?
