Release calc version 2.10.3t5.45

This commit is contained in:
Landon Curt Noll
1997-10-04 20:06:29 -07:00
parent 4618313a82
commit 6e10e97592
300 changed files with 38279 additions and 8584 deletions

View File

@@ -1,7 +1,7 @@
/*
* randmprime - generate a random prime of the form h*2^n-1
*
* Copyright (c) 1995 by Landon Curt Noll. All Rights Reserved.
* Copyright (c) 1997 by Landon Curt Noll. All Rights Reserved.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
@@ -25,7 +25,6 @@
*/
/* obtain our required libs */
read -once "cryrand.cal"
read -once "lucas.cal"
/*
@@ -33,7 +32,7 @@ read -once "lucas.cal"
*
* given:
* bits minimum bits in prime to return
* seed random seed for scryrand()
* seed random seed for srandom()
* [dbg] if given, enable debugging
*
* returns:
@@ -66,11 +65,11 @@ randmprime(bits, seed, dbg)
}
/* seed generator */
tmp = scryrand(seed);
tmp = srandom(seed, 13);
/* determine initial h and n values */
n = random(bits>>1, highbit(bits)+bits>>1+1);
h = cryrand(n);
h = randombit(n);
h += iseven(h);
while (highbit(h) >= n) {
++n;
@@ -131,7 +130,6 @@ randmprime(bits, seed, dbg)
return ret;
}
global lib_debug;
if (lib_debug >= 0) {
if (config("lib_debug") >= 0) {
print "randmprime(bits, seed [,dbg]) defined";
}