1*48349Scael.\" Copyright (c) 1990, 1991 The Regents of the University of California. 242134Sbostic.\" All rights reserved. 342134Sbostic.\" 442134Sbostic.\" This code is derived from software contributed to Berkeley by 542134Sbostic.\" Chris Torek. 642134Sbostic.\" %sccs.include.redist.man% 742134Sbostic.\" 8*48349Scael.\" @(#)ldiv.3 5.2 (Berkeley) 04/19/91 942134Sbostic.\" 10*48349Scael.Dd 11*48349Scael.Dt LDIV 3 12*48349Scael.Os 13*48349Scael.Sh NAME 14*48349Scael.Nm ldiv 15*48349Scael.Nd return quotient and remainder from division 16*48349Scael.Sh SYNOPSIS 17*48349Scael.Fd #include <stdlib.h> 18*48349Scael.Ft ldiv_t 19*48349Scael.Fn ldiv "int num" "int denom" 20*48349Scael.Sh DESCRIPTION 21*48349ScaelThe 22*48349Scael.Fn ldiv 23*48349Scaelfunction 2442134Sbosticcomputes the value 25*48349Scael.Ar num/denom 2642134Sbosticand returns the quotient and remainder in a structure named 27*48349Scael.Ar ldiv_t 2842134Sbosticthat contains two 29*48349Scael.Em long integer 3042134Sbosticmembers named 31*48349Scael.Ar quot 3242134Sbosticand 33*48349Scael.Ar rem . 34*48349Scael.Sh SEE ALSO 35*48349Scael.Xr div 3 , 36*48349Scael.Xr math 3 37*48349Scael.Sh STANDARDS 38*48349ScaelThe 39*48349Scael.Fn ldiv 40*48349Scaelfunction 41*48349Scaelconforms to 42*48349Scael.St -ansiC . 43