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: QuickDraw GX Environment and Utilities /
Chapter 8 - QuickDraw GX Mathematics / QuickDraw GX Mathematics Reference
Mathematical Functions / Operations on wide Numbers


WideWideDivide

You can use the WideWideDivide function to calculate a wide quotient and long remainder for a wide dividend and a long divisor.

wide *WideWideDivide(wide *dividend, long divisor, 
      long *remainder);
dividend
A pointer to the wide number to be divided.
divisor
The number by which the dividend is to be divided.
remainder
A pointer to a location to store the remainder of the division.
function result
A pointer to the quotient (also to the dividend).
DESCRIPTION
The WideWideDivide function returns the quotient of the dividend and divisor as its function result and places the remainder in the remainder parameter. If the remainder parameter is nil, WideWideDivide returns the rounded quotient. The quotient replaces the dividend. The operation has a bias of 0 bits; the bias of the result is the difference between the biases of the dividend and the divisor. The bias of the remainder is the same as the bias of the dividend.

If the remainder parameter is nil, no remainder is returned and the WideDivide function returns a rounded quotient. Passing (long *)-1 in the remainder parameter is the same as passing nil.

Note that this function cannot result in overflow.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996