| 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 | .\" @(#)ldiv.3 5.1 (Berkeley) %G% |
| 10 | .\" |
| 11 | .TH LDIV 3 "" |
| 12 | .UC 7 |
| 13 | .SH NAME |
| 14 | ldiv \- return quotient and remainder from division |
| 15 | .SH SYNOPSIS |
| 16 | .nf |
| 17 | .ft B |
| 18 | #include <stdlib.h> |
| 19 | |
| 20 | ldiv_t |
| 21 | ldiv(int num, int denom) |
| 22 | .ft R |
| 23 | .fi |
| 24 | .SH DESCRIPTION |
| 25 | .B Ldiv |
| 26 | computes the value |
| 27 | .I num/denom |
| 28 | and returns the quotient and remainder in a structure named |
| 29 | .B ldiv_t |
| 30 | that contains two |
| 31 | .B "long integer" |
| 32 | members named |
| 33 | .B quot |
| 34 | and |
| 35 | .BR rem . |
| 36 | .SH SEE ALSO |
| 37 | div(3) |
| 38 | .SH STANDARDS |
| 39 | .B Ldiv |
| 40 | conforms to ANSI X3.159-1989 (``ANSI C''). |