---
name: "imaxdiv"
section: "3"
platform: "macos"
package: "Libc"
version: "1752.120.2"
release: "macOS 26.5"
platforms: ["linux", "freebsd", "macos"]
url: "https://new.carta.tech/imaxdiv"
---

# imaxdiv(3)

returns quotient and remainder

## NAME

**imaxdiv** – returns quotient and remainder

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

**#include \<inttypes.h\>**

*imaxdiv\_t*\

**imaxdiv**(*intmax\_t numer*, *intmax\_t denom*);

## DESCRIPTION

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;
```

## SEE ALSO

[div(3)](/div/3.md), [ldiv(3)](/ldiv/3.md), [lldiv(3)](/lldiv/3.md), [math(3)](/math/3.md)

## STANDARDS

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

## HISTORY

The **imaxdiv**() function first appeared in FreeBSD 5.0.
