ultrix man page for div

Query: div

OS: ultrix

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

div(3)							     Library Functions Manual							    div(3)

Name
       div, ldiv - integer division

Syntax
       #include <stdlib.h>

       div_t div(numer, denom)
       int numer;
       int denom;

       ldiv_t ldiv(numer, denom)
       long numer;
       long denom;

Description
       The and functions return the quotient and remainder of the division of the numerator numer by the denominator denom.

       The return types div_t and ldiv_t are defined, in stdlib.h, as follows:

       typedef struct {
		 int  quot;	/* quotient */
		 int  rem; /* remainder */
	    }	 div_t; 	/* result of div() */

       typedef struct {
		 long quot;	/* quotient */
		 long rem; /* remainder */
	    }	 ldiv_t;	/* result of ldiv() */

Restrictions
       If division by zero is attempted, the behavior of and is undefined.

																	    div(3)
Related Man Pages
ldiv(3c) - opensolaris
div(3) - netbsd
imaxdiv(3) - netbsd
ldiv(3c) - hpux
abs(3) - osf1
Similar Topics in the Unix Linux Community
fun with tar
Round with division command
Port VPM Decompression Algorithm to PHP and then to Dive Computer
Concatenate text between patterns in individual strings
Posts Converted to Divs - Overflow Works - Now Testing