这不是四舍五入,因为四舍五入是不公平的,入的机会比舍的机会多25%;所以现在改为四舍六入,如果是5,那么前面是偶数则舍,奇数则入,例如:517687.6850  => 517687.68428295.3550  => 428295.36

解决方案 »

  1.   

    it is called "banker's rounding", if you read the documentation, it sayshttp://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemmathclassroundtopic1.asp?frame=trueReturn Value
    The whole number nearest parameter d. If d is halfway between two whole numbers, one of which by definition is even and the other odd, then the even number is returned.Res
    The behavior of this method follows IEEE Standard 754, section 4. This kind of rounding is sometimes called rounding to nearest, or banker's rounding.
    if you want to control the rounding, try something likeMath.Round(3.44 + 0.05,  1);  
    Math.Round(3.45 + 0.05,  1);  
    Math.Round(3.46 + 0.05,  1);   
      

  2.   

    sorry, the following is wrong, :-)Math.Round(3.44 + 0.05,  1);  
    Math.Round(3.45 + 0.05,  1);  
    Math.Round(3.46 + 0.05,  1); basically, you should add 0....05 and do a floor to the specific decimal points
      

  3.   

    但为什么在MSSQL又是四舍五入,这样微软不是自己打自己嘴吧吗?
    这样不是使我们做程序的处于困惑之中