BigDecimal for Calculation with and Display of Stock Shares and Prices?

I'm receiving flat files with the stock price and number of held shares for an account. One file contains the price and shares to 6 decimal places. The other file contains the price and shares to 12 decimal places.

The system needs to persist and later display these values (preferably to the number of decimal places received in the flat file). The price and shares will need to be used in calculations for performance (based on price changes) and holding percentages (based on shares). The performance and holding percentages only need to be displayed to two decimal places.

Will double meet my needs here or is BigDecimal more appropriate?


Category: java Time: 2016-07-28 Views: 1

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 5.168 (s). 13 q(s)