-mdoc (version 3)
[unix-history] / usr / src / lib / libc / stdlib / div.3
CommitLineData
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
21The
22.Fn div
23function
ee8e6c33 24computes the value
ae59e04c 25.Fa num/denom
ee8e6c33 26and returns the quotient and remainder in a structure named
ae59e04c 27.Fa div_t
ee8e6c33 28that contains two
ae59e04c 29.Em int
ee8e6c33 30members named
ae59e04c 31.Fa quot
ee8e6c33 32and
ae59e04c
CL
33.Fa rem .
34.Sh SEE ALSO
35.Xr ldiv 3
36.Sh STANDARDS
37The
38.Fn div
39function
40conforms to
41.St -ansiC .