lldiv
- Updated2023-02-21
- 1 minute(s) read
lldiv
lldiv_t lldiv (long long numerator, long long denominator);
Purpose
Computes the integral quotient and remainder of the division of numerator by denominator. In the case of inexact division, the resulting quotient is rounded down the nearest integer. If the result cannot be represented, the behavior is undefined. This is how the quotient and remainder are computed, relative to the numerator and denominator:
quotient * denominator + remainder = numerator
Parameters
Input | ||
Name | Type | Description |
numerator | long long | Contains the numerator that is divided by denominator to compute the corresponding quotient and remainder. |
denominator | long long | Contains the denominator that divides numerator to compute the corresponding quotient and remainder. |
Return Value
Name | Type | Description |
result | lldiv_t |
Contains the result, a struct comprising of the quotient and the remainder. If the
result cannot be represented, the behavior is undefined; otherwise, the returned values are related as follows:
quotient * denominator + remainder = numerator |
Additional Information
Library: ANSI C Library
Include file: ansi_c.h
LabWindows/CVI compatibility: LabWindows/CVI 8.5 and later