Commit | Line | Data |
---|---|---|
ee8e6c33 KB |
1 | .\" Copyright (c) 1990 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" This code is derived from software contributed to Berkeley by | |
5 | .\" Chris Torek. | |
6 | .\" | |
7 | .\" %sccs.include.redist.man% | |
8 | .\" | |
9 | .\" @(#)div.3 5.1 (Berkeley) %G% | |
10 | .\" | |
11 | .TH DIV 3 "" | |
12 | .UC 7 | |
13 | .SH NAME | |
14 | div \- return quotient and remainder from division | |
15 | .SH SYNOPSIS | |
16 | .nf | |
17 | .ft B | |
18 | #include <stdlib.h> | |
19 | ||
20 | div_t | |
21 | div(int num, int denom); | |
22 | .ft R | |
23 | .fi | |
24 | .SH DESCRIPTION | |
25 | .I Div | |
26 | computes the value | |
27 | .I num/denom | |
28 | and returns the quotient and remainder in a structure named | |
29 | .B div_t | |
30 | that contains two | |
31 | .BR int | |
32 | members named | |
33 | .B quot | |
34 | and | |
35 | .BR rem . | |
36 | .SH SEE ALSO | |
37 | ldiv(3) | |
38 | .SH STANDARDS | |
39 | .B Div | |
40 | conforms to ANSI X3.159-1989 (``ANSI C''). |