losing precision converting from java BigDecimal to double
问题 I am working with an application that is based entirely on doubles, and am having trouble in one utility method that parses a string into a double. I've found a fix where using BigDecimal for the conversion solves the issue, but raises another problem when I go to convert the BigDecimal back to a double: I'm losing several places of precision. For example: import java.math.BigDecimal; import java.text.DecimalFormat; public class test { public static void main(String [] args){ String num =