Spotlight Computes Modulus of Negative Numbers Incorrectly

I'm an undergraduate math major. Occasionally I use spotlight to check my calculations. However, when computing the modulus (%) of negative numbers using spotlight, the calculator returns incorrect answers. I'm wondering if anyone else has noticed this, or why this might be (aside from bad coding)? For instance it returns,


-2%3 = -2, and -1%3 = -1.


However, if you were to Google "-2%3", or compute this in Wolfram Alpha, Python, R, C, etc you see:


-2%3 = 1, and -1%3=2.


These are indeed the correct answers as:

-2 = 3*(-1) + 1, and -1 = 3*(-1) + 2


I have submitted feedback through the official channel about this, but figured I would post here to bring attention to the problem. I hope Apple fixes this so the large number of students who use their products are not misled.


2011 Macbook Pro 13", OSX 10.11.3

MacBook Pro (13-inch Early 2011), OS X El Capitan (10.11.3)

Posted on Mar 27, 2016 2:42 AM

Reply
1 reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Spotlight Computes Modulus of Negative Numbers Incorrectly

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.