Important: The information in this document is obsolete and should not be used for new development.
FractDivide
You can use theFractDivide
function to return the quotient of a dividend and divisor.
fract FractDivide (fract dividend, fract divisor);
dividend
- The number to be divided.
divisor
- The number by which the dividend is to be divided.
- function result
- The quotient of two numbers.
DESCRIPTION
TheFractDivide
function divides thedividend
parameter by thedivisor
parameter and returns the quotient. If thedividend
parameter is a and thedivisor
parameter is b, the quotient a / b is returned.The format of the number returned depends on the respective number formats of the dividend and divisor. The operation has a bias of 30 bits; in general, the bias of the resulting number is the difference between the biases of the input numbers, shifted left by 30 bits. Thus if the divisor is a
fract
, the result is the same format as the dividend. If thedivisor
and thedividend
parameters are the same format, the result is infract
format, as shown inTable 8-6. The dashed line indicates that the resulting bias is not equivalent to long, fixed, or fract. Use the rules of the operation to determine it.
FractDivide
result biasDenominator Numerator long fixed fract long fract --- --- fixed --- fract --- fract long fixed fixed SPECIAL CONSIDERATIONS
In the case of division of a large number by a very small number,theFractDivide
function pins its result to either thegxPositiveInfinity
or thegxNegativeInfinity
constant.