tag:blogger.com,1999:blog-342571010165648433.post6800444145407933481..comments2023-05-22T13:23:25.346+05:30Comments on BiGYaN's Random Thoughts: Modulus Operator on negative numbers in CAnonymoushttp://www.blogger.com/profile/08220053167514404524noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-342571010165648433.post-86006087470681315922012-01-10T09:41:36.038+05:302012-01-10T09:41:36.038+05:30@raghuramkalyanam: You are right about the definit...@raghuramkalyanam: You are right about the definition of modulus operator in general. However this is about the interpretation of modulus operator as implemented in C language.Anonymoushttps://www.blogger.com/profile/08220053167514404524noreply@blogger.comtag:blogger.com,1999:blog-342571010165648433.post-51263663971690796552012-01-09T20:56:46.943+05:302012-01-09T20:56:46.943+05:30-1%6 should not be -1 but it should be 5 as per th...-1%6 should not be -1 but it should be 5 as per the definition of modulus.check this link<br />http://mathforum.org/library/drmath/view/52343.htmlraghuramkalyanamhttps://www.blogger.com/profile/11870597256916204383noreply@blogger.com