4.13 Numeric Format
Columns that provide numeric values conforming to specified rules and formatting requirements ensure clarity, accuracy, and ease of interpretation for humans and systems. The FOCUS specification does not require a specific level of precision for numeric values. The level of precision required for a given column is determined by the provider and should be part of a data definition published by the provider.
4.13.1 Requirements
Column conforming to NumericFormat attribute MUST adhere to the following requirements:
- FOCUS dataset column MUST contain a single numeric value.
- FOCUS dataset column MUST have values of type integer, decimal, or scientific notation.
- FOCUS dataset column MUST contain values that, when not null, conform to one of the allowed Data Types defined in the table below.
- FOCUS dataset column MUST contain values that, when not null, conform to one of the allowed precision levels (and scale, where applicable) defined in the table below.
- FOCUS dataset column MUST NOT use mathematical symbols, functions, or operators, except for a negative sign (-) to indicate a negative value or a negative exponent in scientific notation.
- FOCUS dataset column MUST NOT include additional characters or qualifiers (e.g., currency symbols, units of measure).
- FOCUS dataset column MUST NOT contain commas or punctuation marks, except for a single decimal point when required for a decimal value.
- FOCUS dataset column MUST use a negative sign (-) to indicate a negative value.
- FOCUS dataset column MUST NOT include a positive sign (+) for a positive value.
- When FOCUS dataset column contains numeric values expressed in scientific notation, it MUST adhere to the following requirements:
- FOCUS dataset column MUST use E notation "mEn", where m is a real number and n is an integer exponent.
- FOCUS dataset column MUST use a negative sign (-) to indicate a negative exponent.
- FOCUS dataset column MUST NOT include a positive sign (+) for a positive exponent.
4.13.1.1 Allowed Data Types
| Data Type | Type Description |
|---|---|
| Integer | Specifies a numeric value represented by a whole number or by zero. Integer number formats correspond to standard data types defined by ISO/IEC 9899:2018 |
| Decimal | Specifies a numeric value represented by a decimal number. Decimal formats correspond to ISO/IEC/IEEE 60559:2011 and IEEE 754-2008 definitions. |
4.13.1.2 Allowed Precisions
| Data Type | Precision | Definition | Range / Significant Digits |
|---|---|---|---|
| Integer | Short | 16-bit signed short int ISO/IEC 9899:2018 | -32,767 to +32,767 |
| Integer | Long | 32-bit signed long int ISO/IEC 9899:2018 | -2,147,483,647 to +2,147,483,647 |
| Integer | Extended | 64-bit signed two's complement integer or higher | -(2^63 - 1) to (2^63 - 1) |
| Decimal | Single | 32-bit binary format IEEE 754-2008 floating-point (decimal32) | 9 |
| Decimal | Double | 64-bit binary format IEEE 754-2008 floating-point (decimal64) | 16 |
| Decimal | Extended | 128-bit binary format IEEE 754-2008 floating-point (decimal128) or higher | 36+ |
4.13.2 Examples
This format requires that single numeric values be represented using an integer or decimal format without additional characters or qualifiers. The following lists provide examples of values that meet the requirements and those that do not.
-
Values Meeting Numeric Requirements:
- -100.2
- -3
- 4
- 35.2E-7
- 1.234
-
Values NOT Meeting Numeric Requirements
- 1 1/2 - contains fractional notation
- 35.2E+7 - contains a positive exponent with a sign
- 35.24 x 10^7 - contains an invalid format for scientific notation
- [3,5,8] - contains an array
- [4:5] - contains a range
- 5i + 4 - contains a complex number
- sqrt(2) - contains a mathematical symbol or operation
- 2.3^3 - contains an exponent
- 32 GiB - contains a unit of measure
- $32 - contains a currency symbol
- 3,432,342 - contains a comma
- +333 - contains a positive sign
4.13.5 Description
Rules and formatting requirements for numeric columns appearing in a FOCUS dataset.