[FAST-1] DecimalValue precision Created: 04/Mar/08 Updated: 24/Oct/08 Resolved: 24/Oct/08 |
|
Status: | Resolved |
Project: | OpenFAST |
Component/s: | Message Object Model |
Affects Version/s: | 0.9.6 |
Fix Version/s: | 0.9.7 |
Type: | Bug | Priority: | Default |
Reporter: | James Beilby | Assignee: | Jacob Northey |
Resolution: | Fixed | Votes: | 0 |
Labels: | None |
Description |
While the mantissa and exponent are maintained to full precision in transfer encoding, this precision is lost on the receiver when a DecimalValue is converted to a BigDecimal via a double: public BigDecimal toBigDecimal() { return new BigDecimal(value); }I believe this needs to be changed to: public BigDecimal toBigDecimal() { return BigDecimal.valueOf(mantissa, -exponent); } |