Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

数字类型格式转换时精度丢失 #4129

@xdfu-nier

Description

@xdfu-nier

private String getFormattedNumberString(BigDecimal data, Short dataFormat, String dataFormatString) { Format numberFormat = getFormat(data.doubleValue(), dataFormat, dataFormatString); return E_NOTATION_PATTERN.matcher(numberFormat.format(data)).replaceFirst("E+$1"); }

data 参数是BigDecimal类型,在执行getFormat时,data.doubleValue() 会导致精度丢失。

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions