Closed tquatmann closed 5 years ago
Yes, rounding towards infinity is the expected behavior. We should clarify this in the documentation. Round is implemented either via java.lang.Math#round
or via some variant of round(x) = floor(x + 1/2)
Thank you for the clarification :)
Thanks @tquatmann. Now documented at http://www.prismmodelchecker.org/manual/ThePRISMLanguage/Expressions.
The documentation is not very explicit about rounding of halfway cases.
I think the rounding is always towards infinity, as the following model yields just one state:
Can you confirm this?
Notice that rounding of halfway cases in C/C++ is by default 'away from zero', while java.lang.Math.round() rounds towards infinity.