SQL不支持对浮点数字使用取模运算符。
SQL does not support the modulus operator on floating-point Numbers.
原先是简单的使用取模运算符(%)的实现,它非常低效,它自己检查从 2 到目标数的每个数字,确定是否是因子。
The original naive implementation used the modulus (%) operator, which is wildly inefficient, to check every number from 2 up to the target number itself to determine if it is a factor.
练习4 - 3在有了基本框架后,对计算器程序进行扩充就比较简单了。在该程序中加入取模(%)运算符,并注意考虑负数的情况。
Exercise 4-3. Given the basic framework, it's straightforward to extend the calculator. Add the modulus (%) operator and provisions for negative Numbers.
应用推荐