a,b均为整数:a%b=a-(a/b)*b;a,b中有浮点数:a%b=a-(b*q),这里q=int(a/b); 转载于:https://www.cnblogs.com/Junze/p/4727195.html