Skip to content

Numeric ranges

Data values that fall outside of the range of the specified type will be reported in the System Summary as either Overflow or Underflow errors.

Numeric variable types

Type Minimum Value Maximum Value
Unsigned Byte 1 byte 0 254
Byte 1 byte -127 126
Short 2 bytes -32,767 32,766
Integer 4 bytes -2,147,483,647 2,147,483,646
Floating Point (single) 4 bytes, IEEE 754 Covers a range from 1.40129846432481707e-45 to 3.40282346638528860e+38 (positive or negative).
Floating Point (double) 8 bytes IEEE 754 Covers a range from 4.94065645841246544e-324 to 1.79769313486231570e+308 (positive or negative).
Fixed Point 4 bytes See below (1)
Fixed Point 8 bytes See below (2)

For floating point types the number of decimal places is for displaying purposes only it does not affect the value stored in the FastStats system.

The Fixed Point is an Integer value with a specified number of decimal places. The number of decimal places cannot be a negative number. Examples are:

(1) 32 bit Fixed Point type (up to 10 d.p.)

Decimal Places Minimum Value Maximum Value
0 -2,147,483,647 2,147,483,646
1 -214,748,364.7 214,748,364.6
2 -21,474,836.47 21,474,836.46
3 -2,147,483.647 2,147,483.646
... ... ...
10 -0.2147483647 0.2147483646

(2) 64 bit Fixed Point type (up to 19 d.p.)

Decimal Places Minimum Value Maximum Value
0 -9,223,372,036,854,775,807 9,223,372,036,854,775,806
1 -922,337,203,685,477,580.7 922,337,203,685,477,580.6
2 -92,233,720,368,547,758.07 92,233,720,368,547,758.06
3 -9,223,372,036,854,775.807 9,223,372,036,854,775.806
... ... ...
19 -0.9223372036854775807 0.9223372036854775806

Currency variable types

Type Minimum Value Maximum Value
£0 to £655.34 0 655.34
£-327.50 to £327.50 -327.67 327.66
Fixed (0 Decimal Places) -2,147,483,647 2,147,483,646
Fixed (2 Decimal Places) -21,474,836.47 21,474,836.46
Fixed (4 Decimal Places) -214,748.3647 214,748.3646
Fixed 64 bit (0 Decimal Places) -9,223,372,036,854,775,807 9,223,372,036,854,775,806
Fixed 64 bit (2 Decimal Places) -92,233,720,368,547,758.07 92,233,720,368,547,758.06
Fixed 64 bit (4 Decimal Places) -922,337,203,685,477.5807 922,337,203,685,477.5806

Reference variable type

The Numeric Reference type is a 4 byte Integer value.

Type Minimum Value Maximum Value
Numeric Reference -2,147,483,647 2,147,483,646

Elapsed time variable type

Elasped time is in HH:MM:SS.ddd format. The maximum number of decimal places is 3.

Decimal Places Minimum Value Maximum Value
0 -99999:59:59 99999:59:59
1 -9999:59:59.9 9999:59:59.9
2 -999:59:59.99 999:59:59.99
3 -99:59:59.999 99:59:59.999

A note on floating point types

The floating point types (float and double) can store both very large and very small numbers but they are known as 'approximate' types. They are only suitable for scientific values and not suitable for 'exact' values such as quantities or monetary values.

Currency values should always be stored in a Exact data type such as an Integer or fixed type.

If you store currency values in a float or double you will instead of storing the exact decimal value you will store a binary approximation to it. This is a general principle in computing and doesn't just apply to FastStats.