Implement efficient reduction for pleasant-looking primes.
[u/mdw/catacomb] / tests / mpreduce
diff --git a/tests/mpreduce b/tests/mpreduce
new file mode 100644 (file)
index 0000000..2816b29
--- /dev/null
@@ -0,0 +1,21 @@
+# $Id: mpreduce,v 1.1 2004/03/27 00:04:46 mdw Exp $
+#
+# Tests for efficient reduction
+
+reduce {
+  0x72e2c37447f8bca34c4a39b130ea8e5c9a7d8b54564aa88ea773
+  0x367aa8f5ba9ac4e8e2ea198b8af2c3b3081deab392ffc05715783b245a62a6fa
+  0x08e8c03ebf398c63d71d8fd7ca4ece12367a8dde180ca650afb6;
+
+  0xfffffffdffffffffffffffffffffffff
+  0x7fb838a8a0a95046b9d9d9fb4440f7bbc1a7bd3b
+  0xa019c198b9d9d9fb4440f7bc415ff5e4;
+}
+
+modexp {
+  0xfffffffdffffffffffffffffffffffff 2 
+    0xfffffffdfffffffffffffffffffffffe 1;
+  0xfffffffdffffffffffffffffffffffff 2 
+    0xfffffffdfffffffffffffffffffffffd 
+    0x7fffffff000000000000000000000000;
+}