Numbers

A number is either an integer or a floating-point number. A decimal integer is a sequence of decimal digits with an optional sign preceding it. The range of integers is from $-2^{27}+1 = -268435455$ to $2^{27}-1 = 268435455$, inclusive.

An integer can be in the radix notation with a base other than 10. In general, an integer in the radix notation takes the form base'digits where base is a decimal integer and digits is a sequence of digits. If the base is zero, then the notation represents the code of the character following the single quotation mark. The notation ``0b'' begins a binary integer; ``0o'' begins an octal integer; and ``0x'' begins a decimal integer.



Subsections

Neng-Fa Zhou 2012-01-03