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

# lldiv(3)

returns quotient and remainder

## NAME

**lldiv** – returns quotient and remainder

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

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

*lldiv\_t*\

**lldiv**(*long long numer*, *long long denom*);

## DESCRIPTION

The **lldiv**() function computes the value of *numer*, divided by *denom*. It returns the stored result in the form of the *lldiv\_t* type.

The *lldiv\_t* type is defined as:

```
typedef struct {
	long long quot; /* Quotient.  */
	long long rem;  /* Remainder. */
} lldiv_t;
```

## SEE ALSO

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

## STANDARDS

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

## HISTORY

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