ESIPFed / sweet

Official repository for Semantic Web for Earth and Environmental Terminology (SWEET) Ontologies
Other
115 stars 33 forks source link

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

Closed jmkeil closed 1 year ago

jmkeil commented 3 years ago

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.

dr-shorthair commented 3 years ago

+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

lewismc commented 3 years ago

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