next up previous
Next: Rounding Errors Up: Floating Point Arithmetic Previous: Multiplication

Division

Floating point division may be performed either by iterative approximation procedures or by true division. Iterative procedures first approximate the reciprocal of the divisor and then multiply the dividend by this reciprocal.

True division, as specified by the IEEE FPS, is very similar to division using scientific notation. The steps to perform floating point true division are:

  1. Perform unsigned integer division of the dividend mantissa by the divisor mantissa.
  2. Subtract the exponent of the divisor from the exponent of the dividend.
  3. Normalize the result.
  4. Set the sign of the result.

In the first step, the dividend mantissa is extended to 48 bits by adding 0's to the right of the least significant bit. When divided by a 24 bit divisor, a 24 bit quotient is produced.

The exponent arithmetic is performed by negating the exponent of the divisor and then adding, as in floating point multiplication. The negative of a bias-127 number is formed by complementing the bits and adding -1 (1111 1111) in 2's complement.

As in floating point multiplication, overflow and underflow occur when the difference of the exponents is outside the range of the bias-127 exponent representation. Special representations are employed for these cases: E = 255 and M = 0 for overflow and E = 0 for underflow.

Floating point division by zero is undefined and has a special representation in which E = 255 and M is nonzero. This value is called Not A Number, or NaN.



CS 301 Class Account
Mon Sep 13 11:15:41 ADT 1999