The Avail Programming Language
Mobile Users: Click here to view our text rendering warning.

double

A double — that is, an IEEE 754 double-precision floating point number — is an approximation of a real number. The representation uses 64 binary digits, hereinafter bits, organized as 1 sign bit, 52 bits of mantissa, and 11 bits of exponent. The sign bit distinguishes positive (sign bit = 0) and negative (sign bit = 1) values. The mantissa encodes the significant binary digits of the number. The exponent scales the mantissa by a particular power of 2. Finite double values range from -1.79769313486231570e+308 to 1.79769313486231570e+308. The closest to zero nonzero double values are ±4.94065645841246544e-324. Positive zero (0.0) and negative zero (-0.0) are considered distinct. Infinities are supported, but indicate an overflow of representational limits (rather than ±∞). Some encodings do not represent real values; such a value is a not-a-number (NaN). No two differing NaN encodings are considered equal. This is a departure from a strict interpretation of IEEE 754.

In Avail, a literal double comprises one or more decimal digits, then a full stop . (U+002E) and fractional part, and then optional exponential notation — an E (U+0045)or e (U+0065)followed by one or more decimal digits. Examples include 1.0, 0.1, 0.0025, 2.5E-3, 2500.0, 2.5E3, and 3.141592653589793. Literal doubles are defined by the macros "…#.…#«f»?", "…#.…#…", and "…#.…#e|E«+|-»!…#«f»?".

Though double numerically subsumes float, they are considered siblings because their values differ by internal representation. double is not a supertype of float. No float value is also a double value, and no double value is also a float value.

number | Return to Type System | float