clbst47 Posted August 30, 2005 Report Share Posted August 30, 2005 OK, I'm willing to admit extreme ignorance as to how one of the most basic functions in the programming world is supposed to work, but I'm a little confused at the output of the "Quotient & Remainder" function in LabVIEW 7.1.1. My assumption is that this function should compute and return the quotient and remainder of its two inputs, regardless of their sign. Therefore if the inputs are 100 and 90, I would expect a quotient of 1 and a remainder of 10. Similarly, if the inputs were -100 and 90, I would expect a quotient of -1 and a remainder of -10. However, for this latter case, this is not what you get (see attachment). ...So what am I missing? Quote Link to comment
clbst47 Posted August 30, 2005 Author Report Share Posted August 30, 2005 Well, as usually happens once you make a post, I figured it out. First of all, just what the correct answer should be varies from programming language to programming language (hence my confusion), and there is much debate on the topic among mathematicians (http://mathforum.org/library/drmath/view/52343.html). However, the key here is the "floor" function (at the output of the Q & R function), which helps to explain what LabVIEW behaves as it does. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.