xref: /original-bsd/lib/libc/stdlib/ldiv.3 (revision 80855e64)
1.\" Copyright (c) 1990, 1991 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.\" %sccs.include.redist.man%
7.\"
8.\"     @(#)ldiv.3	5.2 (Berkeley) 04/19/91
9.\"
10.Dd
11.Dt LDIV 3
12.Os
13.Sh NAME
14.Nm ldiv
15.Nd return quotient and remainder from division
16.Sh SYNOPSIS
17.Fd #include <stdlib.h>
18.Ft ldiv_t
19.Fn ldiv "int num" "int denom"
20.Sh DESCRIPTION
21The
22.Fn ldiv
23function
24computes the value
25.Ar num/denom
26and returns the quotient and remainder in a structure named
27.Ar ldiv_t
28that contains two
29.Em long integer
30members named
31.Ar quot
32and
33.Ar rem .
34.Sh SEE ALSO
35.Xr div 3 ,
36.Xr math 3
37.Sh STANDARDS
38The
39.Fn ldiv
40function
41conforms to
42.St -ansiC .
43