The Avail Programming Language

number

type lattice focused on numbers

A number is an immutable mathematical object. Uses of numbers include counting, annotating entities to distinguish them, and measuring the magnitudes of quantities. Avail natively supports integers and two distinct precisions of floating-point approximations of real numbers. Integers are discrete, and thus excel at counting and labeling. Real numbers form a continuum, and are therefore suitable for taking measurements.

The method "_→double" converts an of instance of number into the best fit instance of double, which is the appropriate infinity if the argument is an integer that exceeds the representational limits of double. The method "_→float converts a number into the best fit float, which is the appropriate infinity if the argument is an integer that exceeds the representational limits of float. The method "_→extended integer" converts a number into an extended integer by rounding it toward zero.

character | Return to Type System | double