Sorry, I should have included a pointer to the context of this discussion:
http://www.w3.org/2015/07/28-hcls-minutes.html#item04
The question was not about Java in general, but about the FHIR reference
implementations that are written in Java (and in C#). The action was to
find out whether those implementations currently retain precision of
FHIR decimal numbers. The question arose because the FHIR documentation
says both (paraphrased): (a) that decimal numbers MUST retain precision
(so 2.100 must not be truncated to 2.1) and (b) that they match the
xsd:decimal datatype, which (in contradiction to the FHIR spec) says
that xsd:decimal values do *not* retain precision.
David Booth
On 08/04/2015 09:35 AM, Oliver Ruebenacker wrote:
Hello,
"Java uses BigDecimal"? You mean, it is available in Java. More
relevantly, it is supported by some libs like Sesame (e.g. through
Literal.decimalValue).
Best, Oliver
On Mon, Aug 3, 2015 at 11:55 PM, David Booth <da...@dbooth.org
<mailto:da...@dbooth.org>> wrote:
Regarding the above action, and last week's discussion of
xsd:decimal, Lloyd reports: "Java uses BigDecimal - so full
retention of precision. C# uses decimal, which also retains precision."
David Booth
--
Oliver Ruebenacker
Senior Software Engineer, Diabetes Portal
<http://www.type2diabetesgenetics.org/>, Broad Institute
<http://www.broadinstitute.org/>