- From: Arnold, Curt <Curt.Arnold@hyprotech.com>
- Date: Fri, 11 Feb 2000 10:52:46 -0700
- To: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
- Cc: "'brandes@mintech.co.il'" <brandes@mintech.co.il>, "'connolly@w3.org'" <connolly@w3.org>
The elimination of real and the introduction of float and double types in the last draft do several very negative things: 1) they make it very, very difficult to write applications that generate valid XML on platforms whose native floating points are not IEEE when there are minExclusive or maxExclusive constraints. Basically, you have to try to mimic the rounding characteristics of IEEE to make sure that a value that is less than or greater than the bound on your platform is still less than or greater than after rounding on IEEE. 2) it makes it very difficult to write validating parsers in languages that do not impose IEEE numerics (i.e. C++) than will validate consistently on different platforms. Basically, it means that you have to write your own atof() and floating point comparision routines (on top of long or quadword types) since you cannot depend on the native float and double to behave consistently with IEEE. 3) it requires conversion from text to a float/double type for validation. With the abstract real type type, you could do constraint checking lexically which should be substantially faster than conversion to a floating point and then comparision. Numeric conversion can very easily dwarf both parsing and DOM creation in time. I've been meaning to develop and publish some benchmarks for this. 4) It doesn't support more precise numeric representations. There have been several threads on floating point issues on the schema comments list, the last significant thread was http://lists.w3.org/Archives/Public/www-xml-schema-comments/2000JanMar/0043.html The following messages consider the deleted minAbsoluteValue facet which was a the first move toward binding real to a specific implementation. http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999OctDec/0024.html http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999JulSep/0052.html
Received on Friday, 11 February 2000 12:55:30 UTC