Index of Section 3 Manual Pages
| Interix / SUA | div.3 | Interix / SUA |
div(3) div(3)
div()
NAME
div() - return quotient and remainder from division
SYNOPSIS
#include
div_t div (int num, int denom)
DESCRIPTION
The div(3) function computes the value num and returns the quotient and
remainder in a structure named div_t that contains two int members named
quot and rem. If your application requires numbers to be rounded in the
same way on all systems, use
div(a,b).quot
instead of
a/b
To get the remainder, use
div(a,b).rem
SEE ALSO
ldiv(3)
USAGE NOTES
The div function is thread safe.
The div function is not async-signal safe.