当前位置:网站首页>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
边栏推荐
- Matlab vector and matrix
- 逆序打印链表
- CV (1)- Introduction
- C语言进阶——可存档通讯录(文件)
- Interview difficulties: difficulties in implementing distributed session, this is enough!
- Ganglia installation and deployment process
- [day_030420] numbers that appear more than half of the time in the array
- The number of weeks of Oracle last year and this year, with the start time and end time
- Taobao JD pinduoduo Tiktok taote 1688 and other multi platform commodity app details API interfaces (commodity details page data interface, commodity sales interface, keyword search commodity sales in
- Distributed | practice: smoothly migrate business from MYCAT to dble
猜你喜欢

PG Vacuum 杂谈之 auto vacuum

Leetcode:934. The shortest Bridge

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

基于消防GIS系统的智慧消防应用

Acquisition of bidding information

【Day04_0421】C语言选择题

What is spark serialization for?

VRRP principle and basic commands

将一个正整数分解质因数,要求分解成尽可能小的多个的因数。

redis 哨兵集群搭建
随机推荐
Cdga | how to build data asset catalogue?
Understanding the mathematical essence of machine learning
[day_040421] binary conversion
Leetcode:940. How many subsequences have different literal values
Workflow activiti5.13 learning notes (I)
Servlet cannot directly obtain JSON format data in request request
VS中使用动态库
【pytorch】CNN实战-花朵种类识别
Map collection inheritance structure
【Day_03 0420】数组中出现次数超过一半的数字
CCTV dialogue ZTE: why must the database be in your own hands?
Latex同时合并表格的多行多列
Alibaba cloud OSS binding custom domain name
【Day_01 0418】删除公共字符串
[day06_0423] C language multiple choice questions
WebAPI整理
Meiker Studio - Huawei 14 day Hongmeng equipment development practical notes 4
L. Link with Level Editor I dp
Matlab 向量与矩阵
Calling mode and execution sequence of JS