fix rand pseudo-random number generator

Fixed more documentation and code comments that referred to the old
additive 55 (a55) shuffle pseudo-random number generator.  We have
been using the subtractive 100 shuffle pseudo-random number generator
in place of the additive 55 generator for a while now.
This commit is contained in:
Landon Curt Noll
2023-09-10 15:10:40 -07:00
parent 8caa8d8635
commit 78d536140f
6 changed files with 29 additions and 17 deletions

View File

@@ -1130,7 +1130,7 @@ randbitrun.cal
the number and length of identical bits runs match what is expected.
By default, run_cnt is to test the next 65536 random values.
This tests the a55 generator.
This tests the subtractive 100 shuffle pseudo-random number generator.
randmprime.cal
@@ -1177,7 +1177,7 @@ randrun.cal
64 bit values. By default, run_cnt is to test the next 65536
random values.
This tests the a55 generator.
This tests the subtractive 100 shuffle pseudo-random number generator.
repeat.cal

View File

@@ -1,7 +1,7 @@
/*
* randbitrun - check rand bit run lengths of the a55 generator
* randbitrun - check rand bit run lengths of the subtractive 100 shuffle generator
*
* Copyright (C) 1999 Landon Curt Noll
* Copyright (C) 1999,2023 Landon Curt Noll
*
* Calc is open software; you can redistribute it and/or modify it under
* the terms of the version 2.1 of the GNU Lesser General Public License

View File

@@ -1737,7 +1737,7 @@ print '024: parsed test_list()';
/*
* test 025: define test_rand for test 15dd
*
* This function tests the a55 shuffle pseudo-random number generator.
* This function tests the subtractive 100 shuffle pseudo-random number generator.
*/
define test_rand()
{
@@ -3547,6 +3547,12 @@ define test_trig()
vrfy(tnum++ == 3407, '3407: tnum == 3407');
pi = pi(1e-20);
/* test trigonometric sine */
vrfy(sin(0, 1e-10) == 0,
strcat(str(tnum++), ': sin(0, 1e-10) == 0'));
vrfy(sin(pi/6, 1e-10) == 0.5,
strcat(str(tnum++), ': sin(pi/6, 1e-10) == 0.5'));
/* test versed trigonometric sine */
vrfy(versin(0, 1e-10) == 0,
strcat(str(tnum++), ': versin(0, 1e-10) == 0'));
@@ -8297,7 +8303,7 @@ return test_list();
/*
* test 15dd: test the a55 shuffle pseudo-random number generator
* test 15dd: test the subtractive 100 shuffle pseudo-random number generator
*/
print;
return test_rand();