imaxdiv(3)

imaxdiv3

Returns quotient and remainder

Usage

#include <inttypes.h>

imaxdiv_t

imaxdiv(intmax_t numer, intmax_t denom);

Library

Standard C Library (libc, -lc)

Overview

The imaxdiv() function computes the value of numer, divided by denom. The stored result is returned in the form of the imaxdiv_t type.

The imaxdiv_t type is defined as:

typedef struct {
	intmax_t quot; /* Quotient.  */
	intmax_t rem;  /* Remainder. */
} imaxdiv_t;

Releases

145 releases since Mac OS X 10.3; the text changed 1 time.

  1. 10.3–10.4.11
  2. 10.5–26.5

Standards

The imaxdiv() function conforms to ISO/IEC 9899:1999 (“ISO C99”).

History

The imaxdiv() function first appeared in FreeBSD 5.0.

From Libc 1752.120.2 in macOS 26.5. Parsed by carta from the page's mdoc source.