From 4a2da2d1d9ff4ffb94e24b24c8c2036e9c5e48d4 Mon Sep 17 00:00:00 2001 From: mdw Date: Sat, 17 Jun 2000 10:33:10 +0000 Subject: [PATCH] Miscellaneous fixes. --- README.mp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.mp b/README.mp index bc75817..24c0588 100644 --- a/README.mp +++ b/README.mp @@ -129,7 +129,7 @@ The high-level interface happens is that a reference is lost to whatever the destination used to refer to, and a reference to the new result is gained. The address might be different, and then again it might not. - Destinations acn be the same as sources -- that works fine. + Destinations can be the same as sources -- that works fine. Finally, there's the magic value `MP_NEW'. MP_NEW is a special constant which, as a destination, means `create a new place and put the answer there'. @@ -163,10 +163,10 @@ The high-level interface Multiply y by z, putting the result in x, but making y no longer useful. - Here's some examples of how to do it wrong: + Here are some examples of how to do it wrong: mp_mul(y, y, z); - mp_mul might choose somewhere other than b's storage to + mp_mul might choose somewhere other than y's storage to write its result. (In fact, the current version certainly will.) So y is trashed because there are no references to it any more, and the result of the @@ -263,8 +263,8 @@ Modular multiplication and exponentiation mpmont mm; mp *ar, *br, *p; mpmont_create(&mm, m); - ar = mp_mul(MP_NEW, a, m.r2); /* aR mod m */ - br = mp_mul(MP_NEW, b, m.r2); /* bR mod m */ + ar = mpmont_mul(MP_NEW, a, m.r2); /* aR mod m */ + br = mpmont_mul(MP_NEW, b, m.r2); /* bR mod m */ p = mpmont_mul(&mm, MP_NEW, ar, br); /* abR mod m */ p = mpmont_reduce(&mm, p, p); /* ab mod m */ mpmont_destroy(&mm); @@ -319,16 +319,16 @@ Modular multiplication and exponentiation Finding prime numbers Prime numbers are important too. Finding them is not ever-so - easy. THere's a huge variety of useful properties which are + easy. There's a huge variety of useful properties which are needed, and it's basically impossible to cover everything. Catacomb has two useful facilities. There's a fast sequential- - search filtering system called `pfilt, and a good (but + search filtering system called `pfilt', and a good (but probabilistic) primality tester which implements the Rabin- Miller test. - Over the top of this is a confgurable plug-in-appropriate-bits - system called `pgen' which tied everything together. You're + Over the top of this is a configurable plug-in-appropriate-bits + system called `pgen' which ties everything together. You're much better off using `pgen' than grovelling about with the filter and Rabin-Miller tests by hand. The low-level details are much better used to create new `pgen' components. -- 2.11.0