[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); }
Generated at Sat Nov 23 17:21:16 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.