About Function: MathMod(val,val2);

 

MathMod

The function returns the real remainder of division of two numbers.

double  MathMod(
   double  value,      // dividend value
   double  value2      // divisor value
   );

Parameters

value

[in]  Dividend value.

value2

[in]  Divisor value.

Return Value

The MathMod function calculates the real remainder f from expression val/y so that val = i * y + f , where i is an integer, f has the same sign as val, and the absolute value of f is less than the absolute value of y.

Note

Instead of MathMod() you can use fmod().

===================================================

above description :

 I use two double value to test .example:   MathMod(0.1,0.01)  it should be return (0.00), In fact it give me return (0.0099999999).What's happened ?  

Who can help me ? Thinks.

 

If you have used the search here (top right the lens) and entered there "MathMod" you might have found this.

It's a lot faster than waiting here for someone to answer!

 
Carl Schreiber:

If you have used the search here (top right the lens) and entered there "MathMod" you might have found this.

It's a lot faster than waiting here for someone to answer!

Great ,think you very much.