xref: /csrg-svn/lib/libc/stdlib/div.3 (revision 48349)
1*48349Scael.\" Copyright (c) 1990, 1991 The Regents of the University of California.
242132Sbostic.\" All rights reserved.
342132Sbostic.\"
442132Sbostic.\" This code is derived from software contributed to Berkeley by
542132Sbostic.\" Chris Torek.
642132Sbostic.\" %sccs.include.redist.man%
742132Sbostic.\"
8*48349Scael.\"     @(#)div.3	5.2 (Berkeley) 04/19/91
942132Sbostic.\"
10*48349Scael.Dd
11*48349Scael.Dt DIV 3
12*48349Scael.Os
13*48349Scael.Sh NAME
14*48349Scael.Nm div
15*48349Scael.Nd return quotient and remainder from division
16*48349Scael.Sh SYNOPSIS
17*48349Scael.Fd #include <stdlib.h>
18*48349Scael.Ft div_t
19*48349Scael.Fn div "int num" "int denom"
20*48349Scael.Sh DESCRIPTION
21*48349ScaelThe
22*48349Scael.Fn div
23*48349Scaelfunction
2442132Sbosticcomputes the value
25*48349Scael.Fa num/denom
2642132Sbosticand returns the quotient and remainder in a structure named
27*48349Scael.Fa div_t
2842132Sbosticthat contains two
29*48349Scael.Em int
3042132Sbosticmembers named
31*48349Scael.Fa quot
3242132Sbosticand
33*48349Scael.Fa rem .
34*48349Scael.Sh SEE ALSO
35*48349Scael.Xr ldiv 3
36*48349Scael.Sh STANDARDS
37*48349ScaelThe
38*48349Scael.Fn div
39*48349Scaelfunction
40*48349Scaelconforms to
41*48349Scael.St -ansiC .
42