bigdecimal求绝对值
时间: 2023-10-18 13:25:48 浏览: 176
BigDecimal的计算
要使用BigDecimal类求绝对值,可以使用abs()方法。该方法返回一个新的BigDecimal对象,表示输入值的绝对值。例如,对于一个BigDecimal对象num,可以使用num.abs()来获取其绝对值。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [BigDecimal基本方法的使用](https://blog.csdn.net/qq_41171482/article/details/93595462)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [BigDecimal类型的数据如何做绝对值和相除求百分比](https://blog.csdn.net/weixin_50503886/article/details/130943603)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文