Numeric data types

cpik supports the following numeric data types:

cpik type representable values constant suffix
char [-128..+127] none
unsigned char [0..255] none
int [-128..+127] none
unsigned int [0..255] none
long [-32768..32767] L or l
unsigned long [0..65535] UL or ul
long long [-2147483648..2147483647] LL or ll
unsigned long long [0..4294967295] ULL or ull
float [ $ -3.402823\times 10^{38}$.. $ +3.402823\times 10^{38}$] optional F or f
unsigned bit field depends on field size none
signed bit field depends on field size none

Signed integers are represented in 2's complement. Floating point support (float) is compliant with the IEEE 754 standard. As stated by the standard, the precision is 6 or 7 decimal digit, depending on the situation. The floating point library is fully written in assembly language, so it is likely to be fast.

AG 2013-04-10