
XPeRiPheRaLMoDuLes8(CaLC):CaLCuLationMoDuLe
X-1-2
ePson
s1C33L17teChniCaLManuaL
X.1.3DetailedFunctionDescriptions
X.1.3.1numericalFormats
This module can handle numbers in the following numerical formats. The numerical format to be used is specified
when the module is opened. Since each calculation function defines numbers as long integers, apply the appropriate
form conversion before actual use.
32-bitunsignedinteger(CaLC_uint32)
The module can handle 32-bit unsigned integers as ordinary unsigned long integers. However, since it does not
perform saturation processing, if values during calculations or calculation results fall outside the range of 0 to
4294967295, the result will be incorrect. Use numerical values that do not exceed this range.
32-bitsignedinteger(CaLC_sint32)
The module can handle 32-bit signed integers as ordinary signed long integers. However, since it does not
perform saturation processing, if the value falls outside the range of
2415919104 to 2415919103 during
calculations, the result will be incorrect. Use numerical values that do not exceed this range.
Q13notation16-bitsignedfixedpoint(CaLC_FiXeD16_Q13)
The module can handle Q13 notation 16-bit signed fixed-point numbers with 3-bit integer parts and 13-bit
decimal parts. The two’s complement representation is used to express the sign.
LSB
MSB
0 1 1 0 0 1 0 0 1 0 0 0 1 0 0 0
15
13
0
Integer part
(3-bit)
Decimal part
(13-bit)
The Q13 notation signed fixed-point number is obtained by multiplying the original number by 8192 and rounding.
(Examples)
3.1416015625
→ 0x00006488
- 2.71826171875
→ 0xFFFFA904
Since the saturation processing involves numbers in this numeric format, values greater than 3.9998779296875
(0x7fff) will be clipped to 3.9998779296875 (0x7fff). Values smaller than
4 (0x8000) will be clipped to
4
(0x8000).
The module always handles numbers as 32-bit data. Note that the upper 16 bits are used to express the sign.
Q14notation16-bitsignedfixedpoint(CaLC_FiXeD16_Q14)
The module can handle Q14 notation 16-bit signed fixed-point numbers with 2-bit integer parts and 14-bit decimal
parts. The two’s complement representation is used to express the sign.
LSB
MSB
0 1 1 0 0 1 0 0 1 0 0 0 1 0 0 0
15
0
14
Integer part
(2-bit)
Decimal part
(14-bit)