with {@code UP} rounding77*5.5678*2.5379*1.6280*1.1281*1.0182*-1.0 -183*-1.1 -284*-1.6 -285*-2.5 -386*-5.5 -687*88*/89UP(BigDecimal.ROUND_UP),90 91/**92* Rounding mode to round towards zero.Never increments the digit93* prior to a discarded fraction (i.e., truncates).Note that this94* rounding mode never increases the magnitude of the calculated value.95*96*Example:97*98*Input Number99*Input rounded to one digit
with {@code DOWN} rounding100*5.55101*2.52102*1.61103*1.11104*1.01105*-1.0 -1106*-1.1 -1107*-1.6 -1108*-2.5 -2109*-5.5 -5110*111*/112DOWN(BigDecimal.ROUND_DOWN),113 114/**115* Rounding mode to round towards positive infinity.If the116* result is positive, behaves as for {@code RoundingMode.UP};117* if negative, behaves as for {@code RoundingMode.DOWN}.Note118* that this rounding mode never decreases the calculated value.119*120*Example:121*122*Input Number123*Input rounded to one digit
with {@code CEILING} rounding124*5.56125*2.53126*1.62127*1.12128*1.01129*-1.0 -1130*-1.1 -1131*-1.6 -1132*-2.5 -2133*-5.5 -5134*135*/136CEILING(BigDecimal.ROUND_CEILING),137 138/**139* Rounding mode to round towards negative infinity.If the140* result is positive, behave as for {@code RoundingMode.DOWN};141* if negative, behave as for {@code RoundingMode.UP}.Note that142* this rounding mode never increases the calculated value.143*144*Example:145*146*Input Number147*Input rounded to one digit
with {@code FLOOR} rounding148*5.55149*2.52150*1.61151*1.11152*1.01153*-1.0 -1154*-1.1 -2155*-1.6 -2156*-2.5 -3157*-5.5 -6158*159*/160FLOOR(BigDecimal.ROUND_FLOOR),161 162/**163* Rounding mode to round towards {@literal "nearest neighbor"}164* unless both neighbors are equidistant, in which case round up.165* Behaves as for {@code RoundingMode.UP} if the discarded166* fraction is ≥ 0.5; otherwise, behaves as for167* {@code RoundingMode.DOWN}.Note that this is the rounding168* mode commonly taught at school.169*170*Example:171*172*Input Number173*Input rounded to one digit
with {@code HALF_UP} rounding174*5.56175*2.53176*1.62177*1.11178*1.01179*-1.0 -1180*-1.1 -1181*-1.6 -2182*-2.5 -3183*-5.5 -6184*185*/186HALF_UP(BigDecimal.ROUND_HALF_UP),187 188/**189* Rounding mode to round towards {@literal "nearest neighbor"}190* unless both neighbors are equidistant, in which case round191* down.Behaves as for {@code RoundingMode.UP} if the discarded192* fraction is > 0.5; otherwise, behaves as for193* {@code RoundingMode.DOWN}.194*195*Example:196*197*Input Number198*Input rounded to one digit
with {@code HALF_DOWN} rounding199*5.55200*2.52201*1.62202*1.11203*1.01204*-1.0 -1205*-1.1 -1206*-1.6 -2207*-2.5 -2208*-5.5 -5209*210*/211HALF_DOWN(BigDecimal.ROUND_HALF_DOWN),212 213/**214* Rounding mode to round towards the {@literal "nearest neighbor"}215* unless both neighbors are equidistant, in which case, round216* towards the even neighbor.Behaves as for217* {@code RoundingMode.HALF_UP} if the digit to the left of the218* discarded fraction is odd; behaves as for219* {@code RoundingMode.HALF_DOWN} if it's even.Note that this220* is the rounding mode that statistically minimizes cumulative221* error when applied repeatedly over a sequence of calculations.222* It is sometimes known as {@literal "Banker's rounding,"} and is223* chiefly used in the USA.This rounding mode is analogous to224* the rounding policy used for {@code float} and {@code double}225* arithmetic in Java.226*227*Example:228*229*Input Number230*Input rounded to one digit
- 开发者必看!探秘阿里云Hi购季开发者分会场:海量学习资源0元起!...
- 开发者干货合集!阿里开源,移动开发,机器学习等海量资源限时开放!...
- 个人开发app可以上架吗
- 中天城投河东开发公司,中天城投集团遵义有限公司介绍?
- 精鼎医药研究开发有限公司,中国CRO公司都由哪些
- 中啡咖啡怎么样,java中咖啡标志怎么设置大小
- 如何开发合成物品功能?
- web前端技术:学习HTML、CSS、JavaScript
- 个人起诉开发商很难,多人联名起诉开发商,法院怎么收费
- CycleGAN生成车牌记录