source:
CIVL/mods/dev.civl.com/examples/arithmetic/division.cvl@
cb4d4f4
| Last change on this file since cb4d4f4 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 276 bytes | |
| Line | |
|---|---|
| 1 | /* division.cvl: simple real division, whose correctness |
| 2 | * depends on real arithmetic. |
| 3 | * |
| 4 | * Commandline execution: |
| 5 | * civl verify division.cvl |
| 6 | */ |
| 7 | #include<civlc.cvh> |
| 8 | $input double x; |
| 9 | $input double y; |
| 10 | $assume(y!=0); |
| 11 | |
| 12 | void main() { |
| 13 | double z = x/y; |
| 14 | |
| 15 | $assert(y*z==x); |
| 16 | } |
Note:
See TracBrowser
for help on using the repository browser.
