numberFormat
Element ¶numberFormat :minimumIntegerDigits=int? :maximumFractionDigits=int? :minimumFractionDigits=int? :useGrouping=bool? :scientific=(onlyForSmall | whenNeeded | true | false)? :small=real? :prefix? :suffix? => affix*
Specifies a format for displaying a number. The available options are
a superset of those available from PSPP print formats. PSPP chooses a
print format type for a numberFormat
as follows:
scientific
is true
, uses E
format.
prefix
is $
, uses DOLLAR
format.
suffix
is %
, uses PCT
format.
useGrouping
is true
, uses COMMA
format.
F
format.
For translating to a print format, PSPP uses
maximumFractionDigits
as the number of decimals, unless that
attribute is missing or out of the range [0,15], in which case it uses
2 decimals.
Minimum number of digits to display before the decimal point. Always
observed as 0
.
Maximum or minimum, respectively, number of digits to display after the decimal point. The observed values of each attribute range from 0 to 9.
Whether to use the grouping character to group digits in large numbers.
This attribute controls when and whether the number is formatted in scientific notation. It takes the following values:
onlyForSmall
Use scientific notation only when the number’s magnitude is smaller
than the value of the small
attribute.
whenNeeded
Use scientific notation when the number will not otherwise fit in the available space.
true
Always use scientific notation. Not observed in the corpus.
false
Never use scientific notation. A number that won’t otherwise fit will
be replaced by an error indication (see the errorCharacter
attribute). Not observed in the corpus.
Only present when the scientific
attribute is
onlyForSmall
, this is a numeric magnitude below which the
number will be formatted in scientific notation. The values 0
and 0.0001
have been observed. The value 0
seems like a
pathological choice, since no real number has a magnitude less than 0;
perhaps in practice such a choice is equivalent to setting
scientific
to false
.