Release calc version 2.11.0t4

This commit is contained in:
Landon Curt Noll
1999-09-30 02:01:00 -07:00
parent 1ce630ac19
commit 97e9429000
23 changed files with 225 additions and 106 deletions

View File

@@ -702,6 +702,8 @@ define test_functions()
{
local a, b;
local pi;
local h, n, r, m, v;
local n2, m2, v2;
print '700: Beginning test_functions';
@@ -1163,7 +1165,31 @@ define test_functions()
vrfy(popcnt(pi(1e-20),0) == 69, '1101: popcnt(pi(1e-20),0) == 69');
vrfy(popcnt(17^777) == 1593, '1102: popcnt(17^777) == 1593');
print '1103: Ending test_functions';
/*
* more hnrmod testing
*/
vrfy(hnrmod(21<<100+5,3,100,1) == (21<<100+5)%(3<<100+1),
'1103: hnrmod(21<<100+5,3,100,1) == (21<<100+5)%(3<<100+1)');
vrfy(hnrmod(21<<500+7,3,500,1) == (21<<500+7)%(3<<500+1),
'1104: hnrmod(21<<500+7,3,500,1) == (21<<500+7)%(3<<500+1)');
vrfy(hnrmod(-767256,84,1,0) == (-767256)%(84<<1+0),
'1105: hnrmod(-767256,84,1,0) == (-767256)%(84<<1+0)');
vrfy(hnrmod(-831150,75,1,0) == (-831150)%(75<<1+0),
'1106: hnrmod(-831150,75,1,0) == (-831150)%(75<<1+0)');
vrfy(hnrmod(-767256,84,1,1) == (-767256)%(84<<1+1),
'1107: hnrmod(-767256,84,1,1) == (-767256)%(84<<1+1)');
vrfy(hnrmod(-831150,75,1,1) == (-831150)%(75<<1+1),
'1108: hnrmod(-831150,75,1,1) == (-831150)%(75<<1+1)');
vrfy(hnrmod(-767256,84,1,-1) == (-767256)%(84<<1-1),
'1109: hnrmod(-767256,84,1,-1) == (-767256)%(84<<1-1)');
vrfy(hnrmod(-831150,75,1,-1) == (-831150)%(75<<1-1),
'1110: hnrmod(-831150,75,1,-1) == (-831150)%(75<<1-1)');
vrfy(hnrmod(21<<100+5,3,100,0) == (21<<100+5)%(3<<100+0),
'1111: hnrmod(21<<100+5,3,100,0) == (21<<100+5)%(3<<100+0)');
vrfy(hnrmod(21<<500+7,3,500,-1) == (21<<500+7)%(3<<500-1),
'1112: hnrmod(21<<500+7,3,500,-1) == (21<<500+7)%(3<<500-1)');
print '1113: Ending test_functions';
}
print '017: parsed test_functions()';