Important: The information in this document is obsolete and should not be used for new development.
Arithmetic Operations
PowerPC Numerics provides the seven arithmetic operations required by the IEEE standard for its three data types, as shown for the C language in Table 6-2 and described in the sections that follow.
Table 6-2 Arithmetic operations in C Operation C symbol Add + Subtract - Multiply * Divide / Square root sqrt Remainder remainder Round-to-integer rint The language processors for the PowerPC automatically use their chosen expression evaluation methods for the normal inline operators (
+
,-
,*
,/
). All the arithmetic operations produce the best possible result: the mathematically exact result, coerced to the precision and range of the evaluation format. The coercions honor the user-selectable rounding direction and handle all exceptions according to the requirements of the IEEE standard (see Chapter 4, "Environmental Controls").Some of the arithmetic operations are implemented in software. These operations are declared to be type
double_t
, which is defined to be typedouble
.