Commit | Line | Data |
---|---|---|
ae59e04c | 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
ee8e6c33 KB |
2 | .\" All rights reserved. |
3 | .\" | |
4 | .\" This code is derived from software contributed to Berkeley by | |
5 | .\" Chris Torek. | |
ee8e6c33 KB |
6 | .\" %sccs.include.redist.man% |
7 | .\" | |
ae59e04c | 8 | .\" @(#)div.3 5.2 (Berkeley) %G% |
ee8e6c33 | 9 | .\" |
ae59e04c CL |
10 | .Dd |
11 | .Dt DIV 3 | |
12 | .Os | |
13 | .Sh NAME | |
14 | .Nm div | |
15 | .Nd return quotient and remainder from division | |
16 | .Sh SYNOPSIS | |
17 | .Fd #include <stdlib.h> | |
18 | .Ft div_t | |
19 | .Fn div "int num" "int denom" | |
20 | .Sh DESCRIPTION | |
21 | The | |
22 | .Fn div | |
23 | function | |
ee8e6c33 | 24 | computes the value |
ae59e04c | 25 | .Fa num/denom |
ee8e6c33 | 26 | and returns the quotient and remainder in a structure named |
ae59e04c | 27 | .Fa div_t |
ee8e6c33 | 28 | that contains two |
ae59e04c | 29 | .Em int |
ee8e6c33 | 30 | members named |
ae59e04c | 31 | .Fa quot |
ee8e6c33 | 32 | and |
ae59e04c CL |
33 | .Fa rem . |
34 | .Sh SEE ALSO | |
35 | .Xr ldiv 3 | |
36 | .Sh STANDARDS | |
37 | The | |
38 | .Fn div | |
39 | function | |
40 | conforms to | |
41 | .St -ansiC . |