mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user