50 likes | 167 Views
W3C XML Schema WG The precisionDecimal Datatype. Noah Mendelsohn W3C XML Schema Workgroup June 22, 2005. Why a new type?. The original xsd:decimal type is not compatible with emerging IEEE754r decimal arithmetic During development of Schema 1.0:
E N D
W3C XML Schema WGThe precisionDecimalDatatype Noah Mendelsohn W3C XML Schema Workgroup June 22, 2005
Why a new type? • The original xsd:decimal type is not compatible with emerging IEEE754r decimal arithmetic • During development of Schema 1.0: • IBM filed objection requesting that xsd:decimal be IEEE754r-compatible • Response: will be considered in XML Schema 1.1 • Latest working draft of Schema 1.1 includes pDecimal (will be renamed precisionDecimal in next draft) Info on the IEEE effort: http://754r.ucbtest.org/
Technical Information • IEEE Decimal and Binary Floating point unified in a single standard with similar semantics • Operations defined • Significant digits count: “4.0 != 4.00” • Storage Formats: • IEEE suggests formats • schema type does not suggest or require representations • Compatible with • java.Math.BigDecimal, .Net System.Decimal • Supported in many other languages • Like IEEE Binary, IEEE Decimal will be supported in hardware
References • Info on the IEEE effort (http://754r.ucbtest.org/) • Mike Cowlishaw paper: (http://www2.hursley.ibm.com/decimal/IEEE-cowlishaw-arith16.pdf) • Schema working draft: (http://www.w3.org/TR/2005/WD-xmlschema11-2/datatypes.html#pDecimal)