Number
The Number
Data Type is used to describe numbers, including both floating point numbers and integers.
Internally, Numbers are represented as double-precision 64-bit binary format IEEE 754 values. This is not relevant for the majority of use cases, but it is important to keep in mind, as certain numbers cannot be represented accurately. For example, the expression 0.1 + 0.2 will evaluate to 0.30000000000000004 rather than 0.3 exactly. To avoid these sorts of rounding errors when dealing with currency, use the Currency Data Type rather than a Number.
Structure
Numbers consist primarily of number characters. Negative numbers are proceeded with a negative sign. Very large or small numbers can be entered using scientific notation which multiplies a base Number by some multiple of ten. When applicable, periods are use to indicate decimal points.
Examples
The following example is of an integer Number value:
The following example is of a floating-point Number value:
The following example is of a negative Number value:
Large numbers, such as 299792458, can be expressed in scientific notation as follows. Note that 299792458 is 2.99792458 times 100000000, which has eight zeros.
Number can be used in Arithmetic Operators, Comparison Operators, and certain functions, such as ABS, SQRT, or COS.
Last updated