lldiv(3)

lldiv3

Returns quotient and remainder

Usage

#include <stdlib.h>

lldiv_t

lldiv(long long numer, long long denom);

Library

Standard C Library (libc, -lc)

Overview

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;

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 lldiv() function conforms to ISO/IEC 9899:1999 (“ISO C99”).

History

The lldiv() 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.