几种Rounding的区别【wiki】

y round
down
(towards −∞)
round
up
(towards +∞)
round
towards
zero
round
away from
zero
round
to
nearest
+23.67 +23 +24 +23 +24 +24
+23.50 +23 +24 +23 +24 +23 or +24
+23.35 +23 +24 +23 +24 +23
+23.00 +23 +23 +23 +23 +23
0 0 0 0 0 0
−23.00 −23 −23 −23 −23 −23
−23.35 −24 −23 −23 −24 −23
−23.50 −24 −23 −23 −24 −23 or −24
−23.67 −24 −23 −23 −24 −24

你可能感兴趣的:(round)