div man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



DIV(3C)								       DIV(3C)

NAME
     div, ldiv - perform integer division

SYNOPSIS
     #include <stdlib.h>

     div_t div (int numer, int denom);

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

DESCRIPTION
     div and ldiv compute the quotient and remainder resulting from the
     division of the integer dividend numer by the integer divisor denom.  If
     the division is inexact, the quotient will be the nearest integer with
     less magnitude than the algebraic quotient (e.g., div(5/2) yields 2, and
     div(-5/2) yields -2).

     div operates on and returns int quantities. ldiv operates on and returns
     long int quantities.

     Unless the result cannot be represented, div and ldiv return the result
     in a structure (div_t for div, ldiv_t for ldiv) which has two integer
     members: the quotient, quot, and the remainder, rem.  These members are
     of type int for div, and long int for ldiv.

DIAGNOSTICS
     If div or ldiv is invoked with a zero denom, the same integer divide-by-
     zero trap occurs as if the integer division had occurred in-line.

									Page 1

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net