.TH  mdiv() "" "" "Multiple-Precision Mathematics (libmp)"
.PC "Divide multiple-precision integers"
.B "#include <mprec.h>"
\fBvoid mdiv(\fIa, b, q, r\^\fB)\fR
\fBmint *\fIa, \fB*\fIb, \fB*\fIq, \fB*\fIr\^\fB;\fR
.PP
.B mdiv()
divides the multiple-precision integer (or \fBmint\fR)
pointed to by
.I a
with that pointed to by
.IR b .
It writes the quotient and remainder into, respectively,
.I q
and
.IR r .
.I b
must not be zero.
The results of the operation are defined by the
following conditions:
.IP \fB1.\fR 0.3i
\fIa\fR = \fIq\fR * \fIb\fR + \fIr\fR
.IP \fB2.\fR
The sign of
.I r
equals the sign of
.I q .
.IP \fB3.\fR
The absolute value of
.I r
is greater than the absolute value of
.IR b .
.SH "See Also"
.Xr "libmp" libmp
