sweet icon indicating copy to clipboard operation
sweet copied to clipboard

Use of xsd:decimal instead of xsd:double for conversion factors

Open jmkeil opened this issue 4 years ago • 2 comments

Using a comparison of unit ontologies with ABECTO I became aware that SWEET uses xsd:double to represent conversion factors and offsets. I think, instead xsd:decimal should be used, as binary floating point datatypes are not able to exactly represent many of the conversion values. Especially 0.1, 0.01, 0.001, … can not be represented. Only the lexical representation seems to be exact. However, the lexical to value mapping will map them to a slightly different value. This runs the risk of numerical problems in applications. I outlined this in detail in arXiv:2011.08077.

jmkeil avatar Dec 07 '20 13:12 jmkeil

+1 from me.

I just made related PR in QUDT - https://github.com/qudt/qudt-public-repo/pull/311 and OM is coming up behind https://github.com/HajoRijgersberg/OM/issues/42

dr-shorthair avatar Dec 23 '20 06:12 dr-shorthair

@jmkeil thanks for registering the issue. Are you able to provide a pull request? If not, one of us can get around to it.

lewismc avatar Jan 21 '21 21:01 lewismc