Reputation: 913
XML and RDF data has certain data types like decimal, double and integer (http://www.w3.org/TR/1999/WD-xmlschema-2-19991217/#decimal). What are the range of these data types.
I know that the range of decimal, double, integer in C++ is as given at https://msdn.microsoft.com/en-us/library/s3f49ktz.aspx. Do XML and RDF data types have the same range or are their ranges. If their ranges are different then what are their actual ranges?
Upvotes: 0
Views: 1724
Reputation: 163418
xs:double and xs:float are defined by IEEE rules. See
3.3.5 double
The ·value space· of double contains the non-zero numbers m × 2e , where m is an integer whose absolute value is less than 253, and e is an integer between −1074 and 971, inclusive.
By contrast, the limits for xs:integer and xs:decimal are implementation-defined.
Section 3.3.3: [Definition:] decimal represents a subset of the real numbers, which can be represented by decimal numerals. The ·value space· of decimal is the set of numbers that can be obtained by dividing an integer by a non-negative power of ten, i.e., expressible as i / 10n where i and n are integers and n ≥ 0.
Section 5.4: All ·minimally conforming· processors must support decimal values whose absolute value can be expressed as i / 10^k, where i and k are nonnegative integers such that i < 1016 and k ≤ 16 (i.e., those expressible with sixteen total digits).
Upvotes: 3