- 论坛徽章:
- 0
|
都是四舍五入的意思,但有什么区别呢?
看了半天,单词都认识了,就是没弄明白,大侠们能不能用我们可爱的汉语表述一下?
ROUND_HALF_UP
Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round up. Behaves as for ROUND_UP if the discarded fraction is >;= .5; otherwise, behaves as for ROUND_DOWN. Note that this is the rounding mode that most of us were taught in grade school
ROUND_HALF_DOWN
Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round down. Behaves as for ROUND_UP if the discarded fraction is >; .5; otherwise, behaves as for ROUND_DOWN. |
|