Div_BN
Div_BN
Divides one integer big number by another.
Syntax
IppStatus ippsDiv_BN(IppsBigNumState *
pA
, IppsBigNumState *
pB
, IppsBigNumState *
pQ
, IppsBigNumState *
pR
);
Include Files
ippcp.h
Parameters
- pA
- Pointer to the dividend ofIppsBigNumState.
- pB
- Pointer to the divisor ofIppsBigNumState.
- pQ
- Pointer to the quotient ofIppsBigNumState.
- pR
- Pointer to the remainder ofIppsBigNumState.
Description
The function divides an integer big number dividend by another integer big number regardless of their signs and sizes and returns the quotient of the division and the respective remainder.
The following pseudocode represents this function:
pQ
←
pA
/pB
pR
←
pA
- pB*pQ
.Return Values
- ippStsNoErr
- Indicates no error. Any other value indicates an error or warning.
- ippStsNullPtrErr
- Indicates an error condition if any of the specified pointers isNULL.
- ippStsOutOfRangeErr
- Indicates an error condition ifIppsBigNumState *pRis smaller than the length ofIppsBigNumState *pBor when the size ofIppsBigNumState *pQis smaller than the quotient result data length.
- ippStsDivByZeroErr
- Indicates an error condition if the zero divisor is attempted.
- ippStsContextMatchErr
- Indicates an error condition if any of the context parameters does not match the operation.
The size of
IppsBigNumState *
pQ
should not be less than (
length
of
*
pA
) - (
length of
*
pB
) + 1
, and the size of IppsBigNumState *
pR
should be not less than the length of IppsBigNumState *
pB
.