VOUnits RFC
Rob Seaman
seaman at noao.edu
Mon Jul 29 06:39:06 PDT 2013
On Jul 29, 2013, at 5:27 AM, Markus Demleitner <msdemlei at ari.uni-heidelberg.de> wrote:
> Well, in that case: Unless someone dislikes them very heavily, let's
> just allow arbitrary floats as prefixes, preferably in the standard
> floating-point literal form basically every programming language out
> there uses, shan't we? Simple, quick, does the job, not network
> access required to parse units, and a very happy me. Perfect!
"Perfect" may be a bit strong. If you actually mean floating-point, is it required of applications to support single or double precision or do they all have to handle arbitrary precision? If some narrowed subset of scientific notation, does IVOA attempt to support both "e" and "d" exponents? (And/or "**" or "^" or even "x"?) Capitalization? Is one style preferred, but others accepted? Ought an application to standardize on output? Might then inputs differ from outputs? What about non-ASCII? How do we truncate if a user supplies more digits than fit in the required precision? FP equality test? (Is this then a special case of a general units equality test?) Can exponents have decimal points? (How about exponents denoting dimensionality?) In that case can they themselves be expressed recursively as a FP literal? How might a special value be denoted or recognized, e.g., pi or a mole (which is a fundamental SI unit)? Does it have to be spelled-out in that case? Are there routines to recognize and convert? How about converting exponents back and forth to SI prefixes? Can there be multiple prefixes? Can prefixes occur in the denominator? Or must they use a negative exponent? Must prefixes actually be prefixed or can they be embedded later in a string? When parsing a units string should an application prefer lumping or splitting to distinguish a units-prefix from a number expressing a value in those units? Every quantity would otherwise become 1.0 units-with-a-prefix ;-)
I'm not saying they shouldn't be there, but including numeric prefixes raises many additional questions and those questions have implications for the pure units issues.
Rob
More information about the semantics
mailing list