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