I have a case to handle remainder is rounded number or not?

for example, if case1:

m=3, QR=5

QR/MOQ,5/3=1.6667… remainder is not rounded value

case2: QR=6,m=3

6/3=2, the remainder have rounded

what is the logic to do this

@THIRU_NANI @Palaniyappan @Gangadhar_Athili