Scientific notation format
- Last Updated: February 11, 2026
- 5 minute read
- OpenEdge
- Version 13.0
- Documentation
Syntax
The value m is followed by the letter E (or
e), and the exponent (n), which can include
an optional plus (+) or minus (-) sign.
|
- m
- A real number. m is commonly represented as a decimal value.
- n
- The exponent which can have one or two digits.
Examples
Number representation using scientific notation format
The following examples show how to represent numbers in scientific notation format:
- 1,000,000 is 1 × 106, which is written as
1E6(or1e6,1E+6,1e+6,1.0E6). - 0.000123 is 1.23 × 10-4, which is written as
1.23e-4. - 123,123,123 is 1.23123123 × 108, which is written as
1.23e8(if only two decimal places are allowed).
Expressions in ABL using scientific notation format
The following code contains expressions that use scientific notation format in ABL.
|
How to read JSON containing numbers in scientific notation format
The following example code shows how to read a JSON document that contains a number in scientific notation format:
|
How to IMPORT data in scientific notation format
The following example code shows how to use the IMPORT statement to read a
CSV file containing numbers in scientific notation format.
| mydata.csv |
|---|
|
Code to read mydata.csv |
|---|
|
Notes
- The limits of existing INTEGER, INT64, or DECIMAL data types apply to numbers in scientific notation format. Decimal values have a limit of 50 digits including up to 10 digits to the right of the decimal point.
- The maximum and minimum exponent value for reading a number in scientific notation form is
+/-99, including 0. For example,0e0is a valid number in scientific notation format (resulting in a 0).Once the value is read, the value is converted to internal decimal format (if possible), and is limited to 50 digits. So the maximum possible exponent value for writing a value in scientific notation format is 49 since one digit is always reserved for the real number portion.
- The notation sign is optional. If not provided, the default is positive
(
+). - When the exponent is applied to a number, the result is rounded to fit the requested data type. For example, the limit of the DECIMAL data type is 10 digits to the right of the decimal, so any digits beyond that are rounded to fit within 10 decimal places.
- Not all locations in the ABL syntax where a number is expected, accept numbers in scientific
notation format. Some locations that accept only whole numbers do not accept
scientific notation values. For example, the
EXTENTsize, an array subscript, and column or row numbers orx/yvalues inDISPLAYstatements. - External sources that contain numbers in scientific notation format can be read
and parsed in ABL. Data can be imported using the
IMPORTstatement. JSON or XML documents can also be read and parsed. For XML, this includes theREAD-XML()method for temp-tables and datasets. For JSON, this includes theProgress.Json.ObjectModel.ObjectModelParserclass and theREAD-JSON()method. - The following general rules apply for the FORMAT
phrase when expressing numbers in scientific notation:
- The format may start with an optional sign place holder
(
+or-) in the first position. - The optional sign must be followed by a placeholder digit
(
9) for the digit to the left of the decimal point. Zero suppression (>) is not allowed. - The digit place holder is optionally followed by the decimal separator.
- The format may practically have up to 50 placeholders for digits of
precision to the right of decimal. The digit placeholder value(s) may
optionally be zero suppressed using one or more
<. - The number format is always followed by an exponential number indicator
Eore. - The exponential number indicator can optionally be followed by an
exponential sign place holder to indicate either a negative or positive
exponent is acceptable. If not provided, the default is positive
(
+). - The exponential sign place holder is a minus (
-) or plus (+) sign. If a negative sign is used, the sign is suppressed if the exponent is positive. If a positive exponent sign is used, the sign is always displayed if the exponent is positive or negative. - The
E(ore) notation must be followed by either one or two placeholder digits (9) to indicate the exponent.
When displayed, the value must be capable of being displayed with the format specified, including the precision and scale of the value to the left of the exponent, with the number of digits allowed for the exponent, otherwise you get an error and the data cannot be formatted. In other words, values are not rounded in order to display it with the format specified.
The following table shows examples of how a value is displayed given different formats. In general, the decimal is moved to the point where the whole number portion of the value is from 1 to 9. The decimal is moved either right or left as necessary to accomplish this. Any remaining values appear to the right of the decimal point with as many significant digits allowed by the format. The value may be rounded after coming up with the scientific notation format.
Example value Format Value displayed Comments 0.000003459.99E-93.45E-6The format defines a single digit to the left of the decimal point, two to the right, and a single digit for the exponent (and a negative exponent is allowed). 0.000003459.9E-93.5E-6There is only one digit to the right of the decimal point, so the value is rounded. 123459.99E91.23E4-10.00123459.99<<<<e-99ERROR The number is negative but the format does not allow for it. -.00012345-9.99<<<<e9ERROR The exponent is negative but the format does not allow for a negative exponent. 100293984839379849.9999999999E-991.0029398484E16The value is rounded to 10 significant decimal places. There is no exponent sign since the format is negative but exponent is positive, so the sign is suppressed. 10029300000000000-9.9<<<<<<<<E-991.00293E16The least significant digits are zero suppressed. 100293000000000009.999999999E-991.002930000E16100293000000000009.999E+991.003E+16100293000000000009.999e+991.003e+16The indicator ( Eore) will be displayed exactly as specified in the format phrase.For a field that is enabled for Dynamic Data Masking, the format setting of a field is not honored when displaying the masked value.
- The format may start with an optional sign place holder
(