[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [unitsml] "Float64" in UnitsML
Quoting "Peter J. Linstrom" <peter.linstrom@nist.gov>: > All, > > This message is intended to be part of the > asynchronous portion of the September 2008 UnitsML > TC meeting. Same here. > I would like to note that in the current draft > of the UnitsML schema the "Float64ConversionFrom" > element contains attributes to reflect the precision > of the numbers used in the conversion. For example > the "multiplicandDigits" attribute will indicate the > number of meaningful digits in the conversion factor. > Because of this 0.3048 or (0.3048 minus some small > number) will result in the same value. That's true if you somehow use a decimal number and not a IEEE-754 double. There's simply no way to express this concept in doubles. When the string describing the number has been parsed into a double, you've lost your precision already. And even when you're just printing out the first few significant digits again, what you're doing is rounding all of the existing digits and print out the result. So basically what you're describing is an xsd:decimal, and not a xsd:double ... > > The rather awkward name of "Float64ConversionFrom" > was chosen to discriminate from other possible > representations of numbers for conversions. Since > the overwhelming number of conversions are linear, > I believe this is a more appropriate convention for > discriminating among conversion type rather than > linear vs. non-linear. Of course other committee > members may have other (better) ideas. What is bothering me is that we'd duplicate all info from the "Float64"Conversion to a, say, Float32 or Float128Conversion, or a BigDecimalConversion, or, ... you get the picture. Regards, -Martin Weber
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]