projects
/
u
/
mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
21a7c4b
)
GCD support for negative numbers and zero.
author
mdw
<mdw>
Fri, 10 Dec 1999 23:25:51 +0000
(23:25 +0000)
committer
mdw
<mdw>
Fri, 10 Dec 1999 23:25:51 +0000
(23:25 +0000)
tests/mp
patch
|
blob
|
blame
|
history
diff --git
a/tests/mp
b/tests/mp
index
910b89d
..
329c0ee
100644
(file)
--- a/
tests/mp
+++ b/
tests/mp
@@
-1,6
+1,6
@@
# Test vectors for MP functions
#
# Test vectors for MP functions
#
-# $Id: mp,v 1.
2 1999/11/22 20:51:09
mdw Exp $
+# $Id: mp,v 1.
3 1999/12/10 23:25:51
mdw Exp $
add {
5 4 9; 5 -4 1; -5 4 -1; -5 -4 -9;
add {
5 4 9; 5 -4 1; -5 4 -1; -5 -4 -9;
@@
-22,11
+22,33
@@
div {
}
gcd {
}
gcd {
+
+ # --- Simple tests ---
+
16 12 4 -2 3;
12 16 4 -1 1;
693 609 21 -181 206;
4398082908043 90980984098081324 1 -32483863573352089 1570292150447;
16 12 4 -2 3;
12 16 4 -1 1;
693 609 21 -181 206;
4398082908043 90980984098081324 1 -32483863573352089 1570292150447;
+ # --- Negative argument tests ---
+
+ 16 -12 4 -2 -3;
+ -16 12 4 2 3;
+ -12 -16 4 1 -1;
+ -12 16 4 1 1;
+ -693 609 21 181 206;
+ 693 -609 21 -181 -206;
+
+ # --- Zero argument tests ---
+
+ 15 0 15 1 0;
+ 0 15 15 0 1;
+ -5 0 5 -1 0;
+ 0 -5 5 0 -1;
+ 0 0 0 0 0;
+
+ # --- Random number tests ---
+
829561629303257626084392170900075 32498098450983560651904114638965
5 -22841190347053190672253237276815 583054885752979049202923618992482;
829561629303257626084392170900075 32498098450983560651904114638965
5 -22841190347053190672253237276815 583054885752979049202923618992482;