Divides one integer big number by another.
IppStatus ippsDiv_BN(IppsBigNumState *a, IppsBigNumState *b, IppsBigNumState * q, IppsBigNumState *r);
a |
Dividend of IppsBigNumState. |
b |
Divisor of IppsBigNumState. |
q |
Quotient of IppsBigNumState. |
r |
Remainder of IppsBigNumState. |
This function is declared in the ippcp.h file. 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:
q ← a/b
r ← a - b*q .
ippStsNoErr |
Indicates no error. Any other value indicates an error or warning. |
ippStsNullPtrErr |
Indicates an error condition if any of the specified pointers is NULL. |
ippStsOutOfRangeErr |
Indicates an error condition if IppsBigNumState *r is smaller than the length of IppsBigNumState *b or when the size of IppsBigNumState *q is smaller than the quotient result data length. |
ippStsDivByZeroErr |
Indicates an error condition if the zero divisor is attempted. |
The size of IppsBigNumState *q should not be less than ( length of *a) - ( length of * b ) + 1, and the size of IppsBigNumState *r should be no less than the length of IppsBigNumState *b.
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.