ldiv(3)

ldiv3

Return quotient and remainder from division

Usage

#include <stdlib.h>

ldiv_t

ldiv(long numer, long denom);

Library

Standard C Library (libc, -lc)

Overview

The ldiv() function computes the value numer/denom (numerator/denominator). Ir returns the quotient and remainder in a structure named ldiv_t that contains two long members named quot and rem.

Releases

163 releases since Mac OS X 10.0; the text changed 4 times.

  1. 10.0–10.1.5
  2. 10.2–10.2.8
  3. 10.3–10.4.11
  4. 10.5–10.6.8
  5. 10.7–26.5

Standards

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

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