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

number

Type lattice: focus on number. any any ⊤--any nontype nontype any--nontype number number nontype--number double double number--double extended integer extended integer number--extended integer float float number--float double--⊥ extended integer--⊥ float--⊥

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