5取双,我举个例子吧:round(1.5)=2
round(2.5)=2也就是说,如果整数部分是单数,进之,双数则弃之再看看 Delphi 帮助:Round returns an Int64 value that is the value of X rounded to the nearest 
whole number. If X is exactly halfway between two whole numbers, the result 
is always the even number. This method of rounding is often called 
揃anker抯 Rounding?

解决方案 »

  1.   

    4舍6入5取双的规则用在round上好像不太好,记得上高数时是这样用的:
    假设保留两位有效数字
    1.546 ---- 1.5 4舍
    1.567 ---- 1.6 6入
    1.554 ---- 1.5 5取双 4舍
    1.556 ---- 1.6 5取双 6入 
      

  2.   

    叫法应该是 4舍6入5留双 ,也叫 4舍6入5看前,就是看 5 前面的数是单数还是双数,双则留(舍),单则进, Trunc 也是这样,不过我认为大可不必如此麻烦,这种规定只在某些领域,如化分,测量