-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of xsd:decimal instead of xsd:float for conversion factors #42
Comments
Thanks again so much, Jan Martin, for all your effort, evaluating OM and the other unit ontologies! Also this issue, that you raise here, is very important. I'll read the paper you wrote about it! I'll keep you - again - updated! |
I agree that we should use xsd:decimal. I'll process that. But before I can do that I'll have to represent the many scientific notations in OM (with an e notation like in 3e4) to plain decimal numbers, which is required for xsd:decimal. This will take a long time. I'll keep you updated about this process! |
Maybe some RegEx might ease that?
|
Easier (and safer) to use SPARQL? I just did similar for QUDT - see qudt/qudt-public-repo#311 (comment) |
Thanks, Jan Martin and Simon, Problem is that I work with an organized ASCII file as source. So I should perform these actions with string manipulation in a text file. |
Doing #80 first might ease solving this issue. |
Once again, thanx for your suggestions Jan Martin and Simon. Apart from your suggestions, I have started to perform the conversions manually because of the urgency. Jan Martin and I had email contact about it (for me to fully understand the issue and what should be done, i.e., converting to decimals and integers), and I find the issue so important that I have immediately started. I think it will work out in a few weeks (doing in-between other activities). I have done more elaborate things in the past. ;) Wish me luck however. ;) |
@dr-shorthair How did you manage to not suffer from the rounding issues? A compliant engine should have create lexicals with tiny offset to the correct value (e.g. |
Solved by #89. |
Using a comparison of unit ontologies with ABECTO I became aware that OM uses
xsd:float
to represent conversion factors and offsets. I think, insteadxsd: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.The text was updated successfully, but these errors were encountered: