VBA的 Round采用的是银行家算法(rounds to the nearest even number) Round(1.5) = 2 Round(0.5) = 在Oracle中实现银行家算法 SQL> create or replace function bankers_round (val number, rnd_digit number := 0) return number is 2 v_rnd_digit number; 3 v_remainder number; 4 begin
英文文档: round(number[, ndigits]) Return the floating point value number rounded to ndigits digits after the decimal point. If ndigits is omitted, it returns the nearest integer to its input. Delegates to number.__round__(ndigits). For the built-in type
对于一些貌似很简单常见的函数,最好还是去读一下Python文档,否则当你被某个BUG折磨得死去活来时,还不知根源所在.尤其是Python这种不断更新的语言.(python 2.7 的round和3.3.2不一样) 3.3.2官方文档对round的定义 round(number[, ndigits]) Return the floating point value number rounded to ndigits digits after the decimal point. If ndigit
英文文档: round(number[, ndigits]) Return the floating point value number rounded to ndigits digits after the decimal point. If ndigits is omitted, it returns the nearest integer to its input. Delegates to number.__round__(ndigits). For the built-in type