Created
May 19, 2011 12:50
-
-
Save pmhsfelix/980675 to your computer and use it in GitHub Desktop.
Using DbC preconditions: useful both as documentation and as integration checks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void epz_addMod(epz_ptr res, cepz_ptr op1, cepz_ptr op2, cepz_ptr mod){ | |
ZREQUIRE1(STANDARD_RESIDUE(op1, mod) && STANDARD_RESIDUE(op2, mod)); | |
ZREQUIRE0(POSITIVE(mod)); | |
ZREQUIRE0(res != mod); | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment