div(3) ultrix man page | unix.com

Man Page: div

Operating Environment: ultrix

Section: 3

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
div(3c) - hpux
ldiv(3c) - hpux
lldiv(3c) - hpux
ldiv(3c) - sunos
lldiv(3c) - sunos
Similar Topics in the Unix Linux Community
Problem in division
Port VPM Decompression Algorithm to PHP and then to Dive Computer
Individual usernames for the same login account
Subtract coloumn3 with coloumn 4 &amp; divide it
Navbar Temple: Table To Div (Changes)