mod(X,Y)=X - n.*Y,n= floor(X./Y).
floor(A):向左取整,例如:floor(-0.2)=-1.0000 floor(5.6)=5.0000.
rem(X,Y)=X - n.*Y, n= fix(X./Y).
fix(A):当A>0,向左取整;当A<0,向右取整.例如:fix(-0.2)=0,fix(5.6)=5.0000.即X,Y符号相同时,二者结果相同;X,Y异号时,二者结果不同.且Y不为0.
mod(X,Y)=X - n.*Y,n= floor(X./Y).
floor(A):向左取整,例如:floor(-0.2)=-1.0000 floor(5.6)=5.0000.
rem(X,Y)=X - n.*Y, n= fix(X./Y).
fix(A):当A>0,向左取整;当A<0,向右取整.例如:fix(-0.2)=0,fix(5.6)=5.0000.即X,Y符号相同时,二者结果相同;X,Y异号时,二者结果不同.且Y不为0.