COHERENT manpages

This page displays the COHERENT manpage for mdiv() [Divide multiple-precision integers].

List of available manpages
Index


mdiv() -- Multiple-Precision Mathematics (libmp)

Divide multiple-precision integers
#include <mprec.h>
void mdiv(a, b, q, r)
mint *a, *b, *q, *r;

mdiv() divides  the multiple-precision  integer (or  mint) pointed to  by a
with  that pointed  to by  b. It  writes the  quotient and  remainder into,
respectively, q  and r. b must  not be zero.  The  results of the operation
are defined by the following conditions:

1. a = q * b + r

2. The sign of r equals the sign of q

3. The absolute value of r is greater than the absolute value of b.

See Also

libmp