[
Lists Home |
Date Index |
Thread Index
]
- From: "Arnold, Curt" <Curt.Arnold@hyprotech.com>
- To: "'xml-dev@lists.xml.org'" <xml-dev@lists.xml.org>
- Date: Tue, 19 Dec 2000 14:16:53 -0700
There was apparently extensive inter-WG debate on numeric data types. A long time ago there was a proposal so that you could customized the datatypes to match a specific machine architecture. So
that you could say that you want a minExclusive constraint interpreted with OS/390 floating point rounding behavior, for example.
I personally thought that that was repugnant since you really don't want make your XML file platform specific. My personal preference was to make all the numeric datatypes defined in arbitrary
precision lexical terms since you can readily do all the operations necessary for XML schema (that is >= > < <=) lexically (and typically substantially faster than conversion). The working group
decided that they would enforce IEEE range and rounding semantics for all implementations instead.
Unfortunately, that means that you have to roll your own datatype with no support for min/max constraints or any operability with the other numeric types for quad IEEE or arbitrary range and precision
numerics (unless you are willing to tolerate decimals with thousands of digits).
If you can tolerate the range and precision limitations of double (which I would assume would be true 99.99% of the time), then use it.
If you need greater precision and/or range than IEEE double (that is your app uses IEEE quad or arbitrary precision numerics), you probably should write your own datatype since you probably will still
want to use exponential notation for large numbers (and if you can be INF, then you probably also can be 1E3045) and you can't do that within decimal.
For more info, search the XML Schema Comments mailing list for IEEE
http://search.w3.org/Public/cgi-bin/query?mss=simple&pg=q&what=web&filter=lists&fmt=.&q=%2Bwww-xml-schema-comments+%2BIEEE&search=Search
Which will show you a lot of the public discussion prior to the current approach.
|