Time:09-29
CodePudding user response:
financial related digital operation must use BigDecimal class
Quote: refer to 1st floor sotondolphin response: Financial related digital operations must use BigDecimal class Someone said that the online can use int receiving, but the unit is
Financial related digital operations must use BigDecimal class
Quote: refer to the second floor through the snow missing reply: Quote: refer to 1st floor sotondolphin response: Financial related digital operations must use BigDecimal class Someone said that the online can use int receiving, but the unit is Well, this is a textbook example of practical application won't do that
these are the two problems, one is the interface definition, one is the internal operation Interface, the string is the most common, by using the interface between interconnected, one does not use the amount of less than, (the most simple, look at the exchange rate), after don't want to change the interface, use the string valueInternal calculation, must use BigDecimal, single precision floating point number can only guarantee the accuracy of 6-7, the level of about 10 w, will appear between 0.01 can't continuous said, BigDecimal using can look at: https://juejin.im/post/5d81e96b51882507ba2269d8
Page link:https//www.codepudding.com/Backend/40109.html