-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Domain Model
-
Labels:None
-
Proposal:
"Decimal cmisVersionSupported: A string that indicates..." How do you fit a string into a Decimal type? Since it is decimal, what precision is required? That is, if cmisVersionSupported is 0.63000000000000000444089209850062616169452667236328125, can you say that you support 0.63? This is significant as most decimal numbers can not be represented exactly in floating point representation. This is also why most products represent version numbers as strings.
- Note - that long number is the result of Java running System.out.println(new BigDecimal(0.63));
We could argue that the version is specified as something like x.y but not all values of x.y are representable exactly as floating point numbers in binary.
0.63, for example, can not be represented exactly in single-presision (32 bit) IEEE-754 floating point. It has to be converted to a binary fraction, and it just can't be done with only 32 bits.
If the TC is going to guarantee that it will always generate specification numbers that are exactly representable in some precision floating point representation, then it should specify the precision is it using, so clients and repositories and future bindings can do the appropriate thing.
–
It seems easier to just use a String.