- Inside Macintosh: PowerPC Numerics / Part 1 - The PowerPC Numerics Environment
- Chapter 6 - Numeric Operations and Functions / Arithmetic Operations
/
You can use the / symbol to divide one real number by another.
x / y
x
- Any floating-point number.
y
- Any floating-point number.
DESCRIPTION
The / operator performs the standard division of two floating-point numbers.
EXCEPTIONS
When x and y are both finite and nonzero, either the result of
is exact or it raises one of the following exceptions:
- inexact (if the result must be rounded or if an overflow or underflow occurs)
- overflow (if the result is outside the range of the data type)
- underflow (if the result is inexact and must be represented as a denormalized number or 0)
SPECIAL CASES
Table 6-6 shows the results when one of the operands of the division operation is a zero, a NaN, or an Infinity. In this table, x is any floating-point number.
Table 6-6 Special cases for floating-point division
| Operation | Result | Exceptions raised |
|
| �0 | None |
|
| � | Divide-by-zero |
|
| �0 | None |
|
| � | Divide-by-zero |
|
| NaN | Invalid |
|
| NaN | None[8] |
|
| NaN | None[8] |
|
| �0 | None |
| |
|
| � | None |
| x /
| �0 | None |
|
| � | None |
|
| NaN | Invalid |
[8] If the NaN is a signaling NaN, the invalid exception is raised.
© Apple Computer, Inc.
13 JUL 1996