
|
If you were logged in you would be able to see more operations.
|
|
Sesame
Created: 19/Jul/12 02:31 AM
Updated: 23/Jul/12 10:35 PM
|
|
| Component/s: |
SPARQL
|
| Affects Version/s: |
None
|
| Fix Version/s: |
2.6.9
|
|
Currently, in sparql, doing
select ?v where { bind( 1/3 as ?v) }
results in:
"0"^^xsd:decimal
This is caused by the fact that MathUtil uses the input scales as defining the scale of the output decimal. Since we are dividing integers, the scale is zero, by definition.
An improvement would be to explicitly set the scale on divisions that result in non-terminating decimal sequences. An arbitrary number that seems suitable is 24 digits.
|
|
Reclassified as a bug after all, since the xsd spec has this to say about xsd:decimal precision:
"All - minimally conforming- processors - must- support decimal numbers with a minimum of 18 decimal digits (i.e., with a - totalDigits- of 18). However, - minimally conforming- processors - may- set an application-defined limit on the maximum number of decimal digits they are prepared to support, in which case that application-defined maximum
number - must- be clearly documented. "
|
|