Semantics
An expression [integer s t]
describes an integer with t
bits of precision of format s.
If s is
signed, then the type
may hold values in the range
[-pow(2, t), pow(2, t) - 1].
If s is
unsigned, then the type
may hold values in the range
[0, pow(2, 32) - 1].
If s is
signed-normalized,
then the type is considered to hold
signed normalized fixed-point
values. A signed normalized fixed-point
type maps real numbers in the range
[-1, 1] such that
-1 maps to
-(pow(2, b - 1)) + 1, and
1 maps to
pow(2, t - 1) - 1.
If s is
unsigned-normalized,
then the type is considered to hold
unsigned normalized fixed-point
values. A unsigned normalized fixed-point
type maps real numbers in the range
[0, 1] such that
0 maps to
0, and
1 maps to
pow(2, t) - 1.
If s <= 0, the type
is rejected as invalid.
The integer type is considered
to be a scalar type when considered
as an element of a vector or
matrix type.