LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

fmod not calculating remainder correctly

Hello Robin,

You cannot step into the fmod function, but here is what I suggest to verify the fmod function results.  Run the following code on your machine and check your results.

double MM = 19;
double result;
result = fmod(MM, 10);
//print MM and result,

If you are getting the wrong result from this function and can verify that you have the correct inputs, then I will file a Corrective Action Request for this function, but I am guessing that your "MM" parameter is being changed before fmod is called.  You can post your code if you like and I'll verify it on my machine.
Regards,


Marty H.
National Instruments
0 Kudos
Message 11 of 11
(912 Views)