C/C++ Programmer's Guide (G06.27+, H06.08+, J06.03+)

The C locale is used to convert multibyte characters into corresponding wide character codes.
The value of the wide character is equal to the value of the first byte in the multibyte sequence
(whose value is taken as an unsigned value).
A plain char has the same range of values as unsigned char.
G.3.5 Integers
Converting an integer to a shorter signed integer causes a representation change by discarding
the high order bits. Converting an unsigned integer to a signed integer of equal length does not
cause a representation change; however, the converted value may be negative. The unsigned
long long data type is supported for both TNS/R and TNS/E-targeted compilations.
Bitwise operations on signed integers produce signed results, represented in two's complement.
How the value is interpreted depends on whether the sign bit is on or off after the operation. The
operation is performed on the data as though the values were unsigned.
When the operator is % (remainder on integer division) these are true:
If the dividend is negative and the divisor is positive, the result is negative.
If the dividend is positive and the divisor is negative, the result is negative.
If both are negative the result is negative.
A right shift of a negative signed integral type causes the sign bit to be replicated. (The shift is an
arithmetic shift instead of a logical shift.)
G.3.6 Floating Point
Native C and C++ support two floating-point formats (IEEE and Tandem), beginning at the G06.06
release. Tandem floating-point is further described in G.3.6 Floating Point (page 409).
The conversion behavior for IEEE floating-point types is:
Table 61 Conversion Behavior for IEEE Floating-Point Format
IEEE Floating-PointConversion
Rounds to the nearest value according to the current IEEE
floating-point rounding mode
From fixed-point to floating-point
Truncates to the nearest representable valueFrom floating-point to fixed-point
Rounds to the nearest value according to the current IEEE
floating-point rounding mode
From a floating-point number to a narrower floating-point
number
The default IEEE rounding mode is to round to the nearest representable value. Where two values
are equally close, the even value (the one with a zero in the least significant fraction bit) is chosen.
For more details about the FP_IEEE_ROUND_GET_ and FP_IEEE_ROUND_SET_ routines, see the
Guardian Procedure Calls Reference Manual.
Tandem floating-point format and IEEE floating-point format have different ranges and precision.
Therefore, a value that might convert exactly if one format is used might not convert exactly if the
other format is used. For more details about ranges and precision of each format, see IEEE
Floating-Point Arithmetic (page 75) and pragma IEEE_FLOAT (page 203).
G.3.7 Arrays and Pointers
size_t is defined in stddef.h to be unsigned long.
Converting a pointer to a signed integer of equal length does not cause a representation change.
Converting an integer to a shorter signed integer causes a representation change by discarding
the high order bits.
ptrdiff_t is defined in stddef.h to be long.
Implementation-Defined Behavior of Native C 397