Div_BN

Divides one integer big number by another.

Syntax

IppStatus ippsDiv_BN(IppsBigNumState *a, IppsBigNumState *b, IppsBigNumState * q, IppsBigNumState *r);

Parameters

a

Dividend of IppsBigNumState.

b

Divisor of IppsBigNumState.

q

Quotient of IppsBigNumState.

r

Remainder of IppsBigNumState.

Description

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 .

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 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.

Note iconNote

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.


Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.