问题
I am formating numbers in locale US
. The problem i am facing is that it's not displaying the exact number user gives rather it's displaying upto 8 digit number.
In the childview it shows the user input but when i try to display it i n the groupview it's displaying only 8 digits

NumberFormat numberFormat= NumberFormat.getNumberInstance(locale);
numberFormat.format(double);// double is the user given input
回答1:
The problem is that double
cannot hold so many significant digits (mantissa). You should use BigDecimal
here otherwise you can always lose precision.
来源:https://stackoverflow.com/questions/29986358/not-getting-the-proper-output-in-number-format