shithub: riscv

ref: 855cf4326f5a07d7142c2d8918f5fa856d912b85
dir: /sys/src/ape/lib/ap/gen/ldiv.c/

View raw version
#include <stdlib.h>

ldiv_t ldiv(long int numer, long int denom)
{
	ldiv_t ans;
	ans.quot=numer/denom;
	ans.rem=numer-ans.quot*denom;
	return ans;
}