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?

Replay

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

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.112 (s). 12 q(s)