summaryrefslogtreecommitdiffstats
path: root/man3/div.3
blob: 58abb0fba2c81cf7f20872e716654c905677d494 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
.\" May be distributed under the GNU General Public License
.\" References consulted:
.\"     Linux libc source code
.\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\"     386BSD man pages
.\" Modified Mon Mar 29 22:44:02 1993, David Metcalfe
.\" Modified Sat Jul 24 19:47:44 1993, Rik Faith (faith@cs.unc.edu)
.TH DIV 3  "June 6, 1993" "" "Linux Programmer's Manual"
.SH NAME
div \- computes the quotient and remainder of integer division
.SH SYNOPSIS
.nf
.B #include <stdlib.h>
.sp
.BI "div_t div(int " numer ", int " denom );
.fi
.SH DESCRIPTION
The \fBdiv()\fP function computes the value \fInumer\fP/\fIdenom\fP and
returns the quotient and remainder in a structure named \fIdiv_t\fP that
contains two integer members named \fIquot\fP and \fIrem\fP.
.SH "RETURN VALUE"
The \fIdiv_t\fP structure.
.SH "CONFORMING TO"
SVID 3, BSD 4.3, ISO 9899
.SH SEE ALSO
.BR ldiv (3)