Name
xs:double
Synopsis
The xs:double
type is designed to represent eight-byte, binary
floating-point numbers in IEEE 754 format, such as is used by the
double
type in Java and many C
compilers. This includes the special values INF
for infinity and NaN
for not a number, used for the
results of unconventional operations like dividing by zero and
taking the square root of a negative number. Because not all
binary numbers can be precisely represented by decimal numbers, it
is possible that two different decimal representations in the
lexical space map to the same value (and vice versa). In this
case, the closest approximation IEEE-754 value is chosen. These
are all legal values of type xs:double
:
3.1415292
-03.1415292
6.022E23
127E-13
+2.998E+10
-128e12
0.0
INF
NaN
-INF
Constraining facets that apply to xs:double
are minInclusive
, maxInclusive
, minExclusive
, maxExclusive
, pattern
, enumeration
, and whiteSpace
.
Get XML in a Nutshell, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.