ticketPriceInPence = 7360
percentageToRefund = 100
(int)(Math.Round((ticketPriceInPence * 0.01) * (percentageToRefund * 0.01), 2, MidpointRounding.AwayFromZero) * 100)
这导致:73.59获得不同的结果Math.Round
(int)(Math.Round((ticketPriceInPence * 0.01) * (percentageToRefund * 0.01) * 100, 2, MidpointRounding.AwayFromZero))
这导致:73.60
任何想法,为什么它会导致不同的2个不同的结果
请说明使用的语言和变量的类型。 – 2009-10-22 11:51:53