Stream: fhirpath
Topic: Division test
Paul Lynch (Oct 09 2018 at 18:34):
There is a r4 fhirpath test for division which says, "1.2 / 1.8 = 0.67". For the ~ operator, the spec says, " values must be equal, comparison is done on values rounded to the precision of the least precise operand." However, this is the = operator, for which the spec says nothing about rounding (at least not that I can see). There is a mention of supporting at least a 10^-8 step-size, but it permits smaller step sizes, so it hard to say definitely at what point the number should be rounded (how many 6's before that 7).
I think this the test (and others like it) should be changed from = to ~.
Grahame Grieve (Oct 09 2018 at 18:35):
2 significant figures all the way through
Paul Lynch (Oct 09 2018 at 18:38):
Yes, I agree. Does the spec mention significant digits somewhere? I couldn't find it.
Grahame Grieve (Oct 09 2018 at 18:38):
I'm not sure about that
Paul Lynch (Oct 09 2018 at 22:23):
Last updated: Apr 12 2022 at 19:14 UTC