user/lib/libc/src/stdlib/lldiv.c
/* See comments in div.c for implementation details. */
See comments in div.c for implementation details.
See comments in div . c for implementation details .
lldiv_t
lldiv(long long numer, long long denom)
{
	lldiv_t retval;
	retval.quot = numer / denom;
	retval.rem = numer % denom;
#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
	if (numer >= 0 && retval.rem < 0) {
		retval.quot++;
		retval.rem -= denom;
	}
#endif
	return (retval);
}
lldiv_t lldiv ( long long numer , long long denom ) { lldiv_t retval ; retval . quot = numer / denom ; retval . rem = numer % denom ; #if ! defined ( __STDC_VERSION__ ) || ( __STDC_VERSION__ < 199901L ) if ( numer >= 0 && retval . rem < 0 ) { retval . quot ++ ; retval . rem -= denom ; } #endif return ( retval ) ; }
See comments in div.c for implementation details.
See comments in div . c for implementation details .