Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: PowerPC Numerics / Part 1 - The PowerPC Numerics Environment
Chapter 6 - Numeric Operations and Functions


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
OperationC symbol
Add+
Subtract-
Multiply*
Divide/
Square rootsqrt
Remainderremainder
Round-to-integerrint

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 type double.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996