in the above (a/b) should be the fractional remainder of that division, not the division itself.
Main Topics
Browse All TopicsI am trying to figure out how to calculate MOD on a calculater and the following website seems to work well for large numbers;
http://forums.xkcd.com/vie
but what if I want to calculate 10MOD11 which I know is -1
I do as follows;
10/11=0.909
0.909-0=0.909
0.909*11=10 ??
Can someone clarify how to calculate this on a calculator?
thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: sdstuberPosted on 2008-11-13 at 08:23:04ID: 22951299
as was mentioned in your previous question, -1 and 10 are both "correct" answers to the MOD question. Which one you really want depends on exactly the question being asked.
So, what exactly is it you want to do?
If you want the -1 result, is that because 10 is smaller than 11?
If so, then for a < b
you can get your negative results like this .... b*(a/b) - b
for a>= b you will get your results like this... b*(a/b)