xref: /original-bsd/lib/libc/stdlib/ldiv.3 (revision c3e32dec)
1.\" Copyright (c) 1990, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Chris Torek and the American National Standards Committee X3,
6.\" on Information Processing Systems.
7.\"
8.\" %sccs.include.redist.man%
9.\"
10.\"     @(#)ldiv.3	8.1 (Berkeley) 06/04/93
11.\"
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
23The
24.Fn ldiv
25function
26computes the value
27.Ar num/denom
28and returns the quotient and remainder in a structure named
29.Ar ldiv_t
30that contains two
31.Em long integer
32members named
33.Ar quot
34and
35.Ar rem .
36.Sh SEE ALSO
37.Xr div 3 ,
38.Xr math 3
39.Sh STANDARDS
40The
41.Fn ldiv
42function
43conforms to
44.St -ansiC .
45