Open DavePearce opened 8 years ago
Here is a minimal example, but this fails correctly:
function giveChange(int cs) -> {int dollars, int cents} ensures ((dollars*100) + cents) == cs: // int d = cs / 100 int c = (d*100)-cs return { dollars: d, cents: 0 }
Likewise, this minimal WyAL example also fails:
assert "postcondition not satisfied": forall (int cs): (cs/100)*100 == cs
And, at this stage, I don't have time to investigate further.
The following example verifies, when it clearly shouldn't:
However, I can't seem to identify a minimal example which illustrates the rounding