当前位置:网站首页>BigDecimal becomes negative
BigDecimal becomes negative
2022-07-26 06:20:00 【Ant HJK】
Call directly when it becomes negative negate() Method
If it is an integer
BigDecimal bd = new BigDecimal("12.1");
long l = bd.setScale( 0, BigDecimal.ROUND_UP ).longValue(); // Rounding up
long l = bd.setScale( 0, BigDecimal.ROUND_DOWN ).longValue(); // Rounding down
* For positive numbers ,ROUND_UP = ROUND_CEILING,ROUND_DOWN = ROUND_FLOOR
边栏推荐
- 【Day_05 0422】连续最大和
- 白盒测试的概念、目的是什么?及主要方法有哪些?
- Database SQL language practice
- Ganglia安装部署流程
- Print linked list in reverse order
- [pytorch] CNN practice - flower species identification
- Docking wechat payment (II) unified order API
- [day_060423] no two
- 【Day_05 0422】统计回文
- [Oracle SQL] calculate year-on-year and month on month (column to row offset)
猜你喜欢

【pytorch】图片增广

Introduction of four redis cluster schemes + comparison of advantages and disadvantages

Embedded sharing collection 15

PG vacuum auto vacuum

Solutions to the failure of copy and paste shortcut keys

Widget is everything, widget introduction

How can machinery manufacturing enterprises do well in production management with the help of ERP system?

【无标题】

Operating steps for uninstalling the mobile app

CV (1)- Introduction
随机推荐
MySQL multi table query introduction classic case
Understanding the mathematical essence of machine learning
【pytorch】CNN实战-花朵种类识别
分布式 | 实战:将业务从 MyCAT 平滑迁移到 dble
基于消防GIS系统的智慧消防应用
机械制造企业如何借助ERP系统,做好生产管理?
[day_030420] find the longest consecutive number string in the string
Operating steps for uninstalling the mobile app
Latex merges multiple rows and columns of a table at the same time
Leetcode:934. The shortest Bridge
【Day_04 0421】进制转换
Youwei low code: Brick life cycle component life cycle
How to divide the disks under the devices and drives in win10 new computer
[Hangzhou][15k-20k] medical diagnosis company recruits golang development engineers without overtime! No overtime! No overtime!
移动web
Mobile web
VS中使用动态库
Byte interview question - judge whether a tree is a balanced binary tree
【Day_07 0425】Fibonacci数列
[the most complete and detailed] ten thousand words explanation: activiti workflow engine