1IMAXDIV(P)                 POSIX Programmer's Manual                IMAXDIV(P)
2
3
4

NAME

6       imaxdiv - return quotient and remainder
7

SYNOPSIS

9       #include <inttypes.h>
10
11       imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
12
13

DESCRIPTION

15       The imaxdiv() function shall compute numer / denom and numer % denom in
16       a single operation.
17

RETURN VALUE

19       The imaxdiv() function shall return a structure of type imaxdiv_t, com‐
20       prising  both the quotient and the remainder.  The structure shall con‐
21       tain (in either order) the members quot (the  quotient)  and  rem  (the
22       remainder), each of which has type intmax_t.
23
24       If  either  part  of  the result cannot be represented, the behavior is
25       undefined.
26

ERRORS

28       No errors are defined.
29
30       The following sections are informative.
31

EXAMPLES

33       None.
34

APPLICATION USAGE

36       None.
37

RATIONALE

39       None.
40

FUTURE DIRECTIONS

42       None.
43

SEE ALSO

45       imaxabs() , the Base Definitions volume of IEEE Std 1003.1-2001,  <int‐
46       types.h>
47
49       Portions  of  this text are reprinted and reproduced in electronic form
50       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
51       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
52       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
53       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
54       event of any discrepancy between this version and the original IEEE and
55       The  Open Group Standard, the original IEEE and The Open Group Standard
56       is the referee document. The original Standard can be  obtained  online
57       at http://www.opengroup.org/unix/online.html .
58
59
60
61IEEE/The Open Group                  2003                           IMAXDIV(P)
Impressum