Release calc version 2.12.0.5

This commit is contained in:
Landon Curt Noll
2006-06-25 16:40:26 -07:00
parent afe37ec851
commit 87570b56fe
109 changed files with 1203 additions and 627 deletions

38
CHANGES
View File

@@ -332,6 +332,35 @@ The following are the changes from calc version 2.12.0 to date:
Change/restored the syntax rules for "for" and "while" loops to Change/restored the syntax rules for "for" and "while" loops to
recognize an unescaped newline in top-level command-level statements. recognize an unescaped newline in top-level command-level statements.
Updated help/avg, help/define, help/fprintf, help/gcd, help/hash,
help/hmean, help/lcm, help/max, help/min, help/null, help/poly,
help/printf, help/ssq, help/strcat, help/strprintf, help/sum,
help/xor.
Changed the definition of the function ssq() to enable list arguments
to be processed in the same way as in sum(). For example:
ssq(1,2, list(3,4,list(5,6)), list(), 7, 8)
returns the value of 1^2 + 2^2 + ... + 8^2 == 204.
Added the calc resource sumtimes.cal, to give the runtimes for
various ways of evaluating sums, sums of squares, etc, for large
lists and matrices. For example:
read sumtimes
doalltimes(1e6)
Calc now ignores carrage returns (\r), vertical tabs (\v), and
form feeds (\f) when token parsing. Thus users on Windoz systems
can write files using their \r\n format and users on non-Windoz
systems can read them without errors.
The quomod() builtin function now takes an optional 5th argument
which controls the rounding mode like config("quomod") does, but
only for that call. Now quomod() is in line with quo() and mod()
in that the final augument is an optional rounding mode.
The following are the changes from calc version 2.11.10.1 to 2.11.11: The following are the changes from calc version 2.11.10.1 to 2.11.11:
@@ -478,6 +507,9 @@ The following are the changes from calc version 2.11.10 to 2.11.10:
that was reported for the PowerMac G5 2GHz MacOS 10.3 by that was reported for the PowerMac G5 2GHz MacOS 10.3 by
Guillaume VERGNAUD <vergnaud at via dot ecp dot fr>. Guillaume VERGNAUD <vergnaud at via dot ecp dot fr>.
Fixed a number of pending issues with help files filling in
missing LIMITS, LINK LIBRARY, and SEE ALSO information,
The following are the changes from calc version 2.11.9 to 2.11.9.3: The following are the changes from calc version 2.11.9 to 2.11.9.3:
@@ -856,7 +888,7 @@ The following are the changes from calc version 2.11.5t4.1 to 2.11.5t4.4:
For example when forming the calc rpm, the Makefile is called with For example when forming the calc rpm, the Makefile is called with
T=$RPM_BUILD_ROOT. If $T is empty, calc is installed under /. T=$RPM_BUILD_ROOT. If $T is empty, calc is installed under /.
Removed all echo_XXX rules except for echo_inst_files from lower Removed all echo_XYZ rules except for echo_inst_files from lower
level makefile. The calc.spec will use a make install rule level makefile. The calc.spec will use a make install rule
with T=$RPM_BUILD_ROOT. with T=$RPM_BUILD_ROOT.
@@ -6149,8 +6181,8 @@ Following is a list of visible changes to calc from version 1.24.7 to 1.26.1:
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.82 $ ## @(#) $Revision: 29.83 $
## @(#) $Id: CHANGES,v 29.82 2006/06/20 10:26:41 chongo Exp $ ## @(#) $Id: CHANGES,v 29.83 2006/06/25 22:58:54 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/RCS/CHANGES,v $ ## @(#) $Source: /usr/local/src/cmd/calc/RCS/CHANGES,v $
## ##
## Under source code control: 1993/06/02 18:12:57 ## Under source code control: 1993/06/02 18:12:57

View File

@@ -18,8 +18,8 @@
# received a copy with calc; if not, write to Free Software Foundation, Inc. # received a copy with calc; if not, write to Free Software Foundation, Inc.
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
# #
# @(#) $Revision: 29.19 $ # @(#) $Revision: 29.20 $
# @(#) $Id: Makefile,v 29.19 2006/06/10 13:01:34 chongo Exp $ # @(#) $Id: Makefile,v 29.20 2006/06/23 00:34:55 chongo Exp $
# @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/Makefile,v $ # @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/Makefile,v $
# #
# Under source code control: 1991/07/21 05:00:54 # Under source code control: 1991/07/21 05:00:54
@@ -177,7 +177,7 @@ CALC_FILES= README bigprime.cal deg.cal ellip.cal lucas.cal lucas_chk.cal \
beer.cal hello.cal test5100.cal test5200.cal randombitrun.cal \ beer.cal hello.cal test5100.cal test5200.cal randombitrun.cal \
randomrun.cal repeat.cal xx_print.cal natnumset.cal qtime.cal \ randomrun.cal repeat.cal xx_print.cal natnumset.cal qtime.cal \
test8400.cal test8500.cal test8600.cal chi.cal intfile.cal screen.cal \ test8400.cal test8500.cal test8600.cal chi.cal intfile.cal screen.cal \
dotest.cal set8700.cal set8700.line alg_config.cal dotest.cal set8700.cal set8700.line alg_config.cal sumtimes.cal
# These files are found (but not built) in the distribution # These files are found (but not built) in the distribution
# #

View File

@@ -701,6 +701,27 @@ sumsq.cal
4N+1, and always impossible for primes of the form 4N-1. 4N+1, and always impossible for primes of the form 4N-1.
sumtimes.cal
timematsum(N)
timelistsum(N)
timematsort(N)
timelistsort(N)
timematreverse(N)
timelistreverse(N)
timematssq(N)
timelistssq(N)
timehmean(N,M)
doalltimes(N)
Give the runtimes for various ways of evaluating sums, sums of
squares, etc, for large lists and matrices. N is the size of
the list or matrix to use. The doalltimes() function will run
all fo the sumtimes tests. For example:
doalltimes(1e6);
surd.cal surd.cal
surd(a, b) surd(a, b)
@@ -993,8 +1014,8 @@ xx_print.cal
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.14 $ ## @(#) $Revision: 29.15 $
## @(#) $Id: README,v 29.14 2006/06/11 07:22:05 chongo Exp $ ## @(#) $Id: README,v 29.15 2006/06/23 00:34:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/README,v $ ## @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/README,v $
## ##
## Under source code control: 1990/02/15 01:50:32 ## Under source code control: 1990/02/15 01:50:32

View File

@@ -17,8 +17,8 @@
* received a copy with calc; if not, write to Free Software Foundation, Inc. * received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
* *
* @(#) $Revision: 29.31 $ * @(#) $Revision: 29.34 $
* @(#) $Id: regress.cal,v 29.31 2006/06/20 10:25:00 chongo Exp $ * @(#) $Id: regress.cal,v 29.34 2006/06/25 20:33:26 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/regress.cal,v $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/regress.cal,v $
* *
* Under source code control: 1990/02/15 01:50:36 * Under source code control: 1990/02/15 01:50:36
@@ -1316,7 +1316,65 @@ define test_functions()
*/ */
vrfy(isstr(calcpath()), '1155: isstr(calcpath())'); vrfy(isstr(calcpath()), '1155: isstr(calcpath())');
print '1156: Ending test_functions'; /*
* ssq use of lists
*/
vrfy(ssq(1,2, list(3,4,list(5,6)), list(), 7, 8) == 204,
'1156: ssq(1,2, list(3,4,list(5,6)), list(), 7, 8) == 204');
/*
* quomod 5th argument rounding tests
*/
vrfy(quomod(10,-3,a,b,0) == 1, '1157: vrfy(quomod(10,-3,a,b,0) == 1');
vrfy(a == -4, '1158: a == -4');
vrfy(b == -2, '1159: b == -2');
vrfy(quomod(-10,-3,a,b,1) == 1, '1160: vrfy(quomod(-10,-3,a,b,1) == 1');
vrfy(a == 4, '1161: a == 4');
vrfy(b == 2, '1162: b == 2');
vrfy(quomod(10,3,a,b,2) == 1, '1163: vrfy(quomod(10,3,a,b,2) == 1');
vrfy(a == 3, '1164: a == 3');
vrfy(b == 1, '1165: b == 1');
vrfy(quomod(-10,3,a,b,3) == 1, '1166: vrfy(quomod(-10,3,a,b,3) == 1');
vrfy(a == -4, '1167: a == -4');
vrfy(b == 2, '1168: b == 2');
vrfy(quomod(10,-3,a,b,4) == 1, '1169: vrfy(quomod(10,-3,a,b,4) == 1');
vrfy(a == -3, '1170: a == -3');
vrfy(b == 1, '1171: b == 1');
vrfy(quomod(-10,-3,a,b,5) == 1, '1172: vrfy(quomod(-10,-3,a,b,5) == 1');
vrfy(a == 3, '1173: a == 3');
vrfy(b == -1, '1174: b == -1');
vrfy(quomod(10,3,a,b,6) == 1, '1175: vrfy(quomod(10,3,a,b,6) == 1');
vrfy(a == 3, '1176: a == 3');
vrfy(b == 1, '1177: b == 1');
vrfy(quomod(-10,3,a,b,7) == 1, '1178: vrfy(quomod(-10,3,a,b,7) == 1');
vrfy(a == -4, '1179: a == -4');
vrfy(b == 2, '1180: b == 2');
vrfy(quomod(10,-3,a,b,8) == 1, '1181: vrfy(quomod(10,-3,a,b,8) == 1');
vrfy(a == -4, '1182: a == -4');
vrfy(b == -2, '1183: b == -2');
vrfy(quomod(-10,-3,a,b,9) == 1, '1184: vrfy(quomod(-10,-3,a,b,9) == 1');
vrfy(a == 3, '1185: a == 3');
vrfy(b == -1, '1186: b == -1');
vrfy(quomod(10,3,a,b,10) == 1, '1187: vrfy(quomod(10,3,a,b,10) == 1');
vrfy(a == 4, '1188: a == 4');
vrfy(b == -2, '1189: b == -2');
vrfy(quomod(-10,3,a,b,11) == 1, '1190: vrfy(quomod(-10,3,a,b,11) == 1');
vrfy(a == -4, '1191: a == -4');
vrfy(b == 2, '1192: b == 2');
vrfy(quomod(10,-3,a,b,12) == 1, '1193: vrfy(quomod(10,-3,a,b,12) == 1');
vrfy(a == -3, '1194: a == -3');
vrfy(b == 1, '1195: b == 1');
vrfy(quomod(-10,-3,a,b,13) == 1,'1196: vrfy(quomod(-10,-3,a,b,13) == 1');
vrfy(a == 4, '1197: a == 4');
vrfy(b == 2, '1198: b == 2');
vrfy(quomod(10,3,a,b,14) == 1, '1199: vrfy(quomod(10,3,a,b,14) == 1');
vrfy(a == 4, '1200: a == 4');
vrfy(b == -2, '1201: b == -2');
vrfy(quomod(-10,3,a,b,15) == 1, '1202: vrfy(quomod(-10,3,a,b,15) == 1');
vrfy(a == -4, '1203: a == -4');
vrfy(b == 2, '1204: b == 2');
print '1205: Ending test_functions';
} }
print '017: parsed test_functions()'; print '017: parsed test_functions()';
@@ -1333,14 +1391,14 @@ define _test_underscore()
local _a = 27; local _a = 27;
local __a = 23209; local __a = 23209;
print "1200: Beginning _test_underscore"; print "1290: Beginning _test_underscore";
vrfy(_a == 27, '1201: _a == 27'); vrfy(_a == 27, '1291: _a == 27');
vrfy(_ == 49, '1202: _ == 49'); vrfy(_ == 49, '1292: _ == 49');
vrfy(__ == 63, '1203: __ == 63'); vrfy(__ == 63, '1293: __ == 63');
vrfy(__a == 23209, '1204: __a == 23209'); vrfy(__a == 23209, '1294: __a == 23209');
print "1205: Ending _test_underscore"; print "1295: Ending _test_underscore";
} }
print '020: parsed _test_underscore'; print '020: parsed _test_underscore';
@@ -7947,7 +8005,9 @@ print '9836: read -once linear';
print '9837: skipping read -once beer.cal because it is an infinite loop'; print '9837: skipping read -once beer.cal because it is an infinite loop';
print '9838: skipping read -once hello.cal because it is an infinite loop'; print '9838: skipping read -once hello.cal because it is an infinite loop';
print '9839: skipping read -once xx_print.cal because it is a printing demo'; print '9839: skipping read -once xx_print.cal because it is a printing demo';
print '9840: Ending read of selected calc resource files'; read -once sumtimes;
print '9840: read -once sumtimes';
print '9841: Ending read of selected calc resource files';
/* /*

186
cal/sumtimes.cal Normal file
View File

@@ -0,0 +1,186 @@
/*
* sumtimes - runtimes evaluating sums & squares of large lists and mats
*
* Copyright (C) 2006 Ernest Bowen
*
* 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
* as published by the Free Software Foundation.
*
* Calc is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
* Public License for more details.
*
* A copy of version 2.1 of the GNU Lesser General Public License is
* distributed with calc under the filename COPYING-LGPL. You should have
* received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* @(#) $Revision: 29.1 $
* @(#) $Id: sumtimes.cal,v 29.1 2006/06/23 00:35:30 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/sumtimes.cal,v $
*
* Under source code control: 2006/06/22 17:29
* File existed as early as: 2006
*
* Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
*/
global sumtimes_t0, sumtimes_t1, sumtimes_t2, sumtimes_t3;
global sumtimes_A, sumtimes_B;
config("tilde", 0),;
define timematsum(N) {
local n, s, p, ptop;
sumtimes_A = mat[N];
for (n = 0; n < N; n++) sumtimes_A[n] = rand(N);
ptop = &sumtimes_A[n-1];
sumtimes_t0 = runtime();
for (s = n = 0; n < N; n++) s += sumtimes_A[n];
sumtimes_t1 = runtime();
for (s = 0, p = &sumtimes_A[0]; p <= ptop; p++) s += *p;
sumtimes_t2 = runtime();
s = matsum(sumtimes_A);
sumtimes_t3 = runtime();
print "Matrix sum runtimes";
printf('\tStandard "for" loop:\t\t%.4f\n', sumtimes_t1 - sumtimes_t0);
printf('\t"For" loop using pointers:\t\t%.4f\n', sumtimes_t2 - sumtimes_t1);
printf('\tUsing builtin "matsum":\t\t%.4f\n', sumtimes_t3 - sumtimes_t2);
}
define timelistsum(N) {
local n, s;
sumtimes_A = makelist(N);
for (n = 0; n < N; n++) sumtimes_A[n] = rand(N);
sumtimes_t0 = runtime();
for (s = n = 0; n < N; n++) s += sumtimes_A[n];
sumtimes_t1 = runtime();
s = sum(sumtimes_A);
sumtimes_t2 = runtime();
print "List sum runtimes";
printf('\tStandard "for" loop:\t\t%.4f\n', sumtimes_t1 - sumtimes_t0);
printf('\tUsing builtin "sum":\t\t%.4f\n', sumtimes_t2 - sumtimes_t1);
}
define timematsort(N) {
local n;
sumtimes_A = mat[N];
for (n = 0; n < N; n++) sumtimes_A[n] = rand(N);
sumtimes_t0 = runtime();
sort(sumtimes_A);
sumtimes_t1 = runtime();
printf('\tMatrix sort runtime:\t\t%.4f\n', sumtimes_t1 - sumtimes_t0);
}
define timelistsort(N) {
local n;
sumtimes_A = makelist(N);
for (n = 0; n < N; n++) sumtimes_A[n] = rand(N);
sumtimes_t0 = runtime();
sort(sumtimes_A);
sumtimes_t1 = runtime();
printf('\tList sort runtime:\t\t%.4f\n', sumtimes_t1 - sumtimes_t0);
}
define timematreverse(N) {
local n;
sumtimes_A = mat[N];
for (n = 0; n < N; n++) sumtimes_A[n] = rand(N);
sumtimes_t0 = runtime();
reverse(sumtimes_A);
sumtimes_t1 = runtime();
printf('\tMatrix reverse runtime %.4f\n', sumtimes_t1 - sumtimes_t0);
}
define timelistreverse(N) {
local n;
sumtimes_A = makelist(N);
for (n = 0; n < N; n++) sumtimes_A[n] = rand(N);
sumtimes_t0 = runtime();
reverse(sumtimes_A);
sumtimes_t1 = runtime();
printf('\tList reverse runtime:\t\t%.4f\n', sumtimes_t1 - sumtimes_t0);
}
define timematssq(N) {
local n, s, p, ptop;
sumtimes_A = mat[N];
for (n = 0; n < N; n++) sumtimes_A[n] = rand(N);
ptop = &sumtimes_A[n-1];
sumtimes_t0 = runtime();
for (s = n = 0; n < N; n++) s += sumtimes_A[n]^2;
sumtimes_t1 = runtime();
for (s = 0, p = &sumtimes_A[0]; p <= ptop; p++) s += (*p)^2;
sumtimes_t2 = runtime();
print "Matrix sum of squares runtimes";
printf('\tStandard "for" loop:\t\t%.4f\n', sumtimes_t1 - sumtimes_t0);
printf('\t"For" loop using pointers:\t\t%.4f\n', sumtimes_t2 - sumtimes_t1);
}
define timelistssq(N) {
local n, s;
sumtimes_A = makelist(N);
for (n = 0; n < N; n++) sumtimes_A[n] = rand(N);
sumtimes_t0 = runtime();
for (s = n = 0; n < N; n++) s += sumtimes_A[n]^2;
sumtimes_t1 = runtime();
s = ssq(sumtimes_A);
sumtimes_t2 = runtime();
print "List sum of squares runtimes";
printf('\tStandard "for" loop:\t\t%.4f\n', sumtimes_t1 - sumtimes_t0);
printf('\tUsing builtin "ssq":\t\t%.4f\n', sumtimes_t2 - sumtimes_t1);
}
define timehmean(N, M = 10) {
local n, s, v1, v2;
sumtimes_A = makelist(N);
for (n = 0; n < N; n++) sumtimes_A[n] = rand(1, M);
sumtimes_t0 = runtime();
for (s = n = 0; n < N; n++) s += 1/sumtimes_A[n];
v1 = N/s;
sumtimes_t1 = runtime();
v2 = hmean(sumtimes_A);
sumtimes_t2 = runtime();
print v1, v2;
print "List harmonic meanruntimes";
printf('\tStandard "for" loop:\t\t%.4f\n', sumtimes_t1 - sumtimes_t0);
printf('\tUsing builtin "hmean":\t\t%.4f\n', sumtimes_t2 - sumtimes_t1);
}
define doalltimes(N) {
timematsum(N);
print;
timelistsum(N);
print;
timematssq(N);
print;
timelistssq(N);
print;
timematsort(N);
timelistsort(N);
timematreverse(N);
timelistreverse(N);
print;
}

View File

@@ -19,8 +19,8 @@
* received a copy with calc; if not, write to Free Software Foundation, Inc. * received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
* *
* @(#) $Revision: 29.3 $ * @(#) $Revision: 29.4 $
* @(#) $Id: test2700.cal,v 29.3 2006/06/20 09:29:16 chongo Exp $ * @(#) $Id: test2700.cal,v 29.4 2006/06/25 22:06:23 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test2700.cal,v $ * @(#) $Source: /usr/local/src/cmd/calc/cal/RCS/test2700.cal,v $
* *
* Under source code control: 1995/11/01 22:52:25 * Under source code control: 1995/11/01 22:52:25
@@ -88,11 +88,11 @@ define mkfrac() = rand(2) ? mkposfrac() : -mkposfrac();
define mksquarereal() = mknonnegreal()^2; define mksquarereal() = mknonnegreal()^2;
/* /*
* XXX - Should be able to do better than the following. For nonsquare * We might be able to do better than the following. For nonsquare
* positive integer less than 1e6, could use * positive integer less than 1e6, could use:
* x = rand(1, 1000); * x = rand(1, 1000);
* return rand(x^2 + 1, (x + 1)^2); * return rand(x^2 + 1, (x + 1)^2);
* Maybe could do * Maybe could do:
* do * do
* x = mkreal_2700(); * x = mkreal_2700();
* while * while

View File

@@ -1,7 +1,7 @@
# #
# calcerr - error codes and messages # calcerr - error codes and messages
# #
# Copyright (C) 1999 Ernest Bowen # Copyright (C) 1999-2006 Ernest Bowen
# #
# Calc is open software; you can redistribute it and/or modify it under # 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 # the terms of the version 2.1 of the GNU Lesser General Public License
@@ -17,8 +17,8 @@
# received a copy with calc; if not, write to Free Software Foundation, Inc. # received a copy with calc; if not, write to Free Software Foundation, Inc.
# 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
# #
# @(#) $Revision: 29.8 $ # @(#) $Revision: 29.9 $
# @(#) $Id: calcerr.tbl,v 29.8 2006/05/19 15:12:57 chongo Exp $ # @(#) $Id: calcerr.tbl,v 29.9 2006/06/25 20:33:26 chongo Exp $
# @(#) $Source: /usr/local/src/cmd/calc/RCS/calcerr.tbl,v $ # @(#) $Source: /usr/local/src/cmd/calc/RCS/calcerr.tbl,v $
# #
# Under source code control: 1996/05/23 17:38:44 # Under source code control: 1996/05/23 17:38:44
@@ -404,9 +404,9 @@ E_ASSIGN8 No-type-change destination for assign
E_ASSIGN9 No-error-value destination for assign E_ASSIGN9 No-error-value destination for assign
E_SWAP1 No-copy argument for octet swap E_SWAP1 No-copy argument for octet swap
E_SWAP2 No-assign-to-or-from argument for swap E_SWAP2 No-assign-to-or-from argument for swap
E_SWAP3 Non-variable argument for swap E_SWAP3 Non-lvalue argument for swap
E_QUOMOD1 Non-variable argument 4 or 4 for quomod E_QUOMOD1 Non-lvalue argument 3 or 4 for quomod
E_QUOMOD2 Non-real-number argument 1 or 2 for quomod E_QUOMOD2 Non-real-number arg 1 or 2 or bad arg 5 for quomod
E_QUOMOD3 No-assign-to argument 3 or 4 for quomod E_QUOMOD3 No-assign-to argument 3 or 4 for quomod
E_PREINC1 No-copy-to or no-change argument for octet preinc E_PREINC1 No-copy-to or no-change argument for octet preinc
E_PREINC2 Non-variable argument for preinc E_PREINC2 Non-variable argument for preinc

View File

@@ -19,8 +19,8 @@
* received a copy with calc; if not, write to Free Software Foundation, Inc. * received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
* *
* @(#) $Revision: 29.21 $ * @(#) $Revision: 29.22 $
* @(#) $Id: config.c,v 29.21 2006/06/20 10:25:45 chongo Exp $ * @(#) $Id: config.c,v 29.22 2006/06/25 22:05:38 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/RCS/config.c,v $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/config.c,v $
* *
* Under source code control: 1991/07/20 00:21:56 * Under source code control: 1991/07/20 00:21:56
@@ -414,7 +414,8 @@ lookup_name(NAMETYPE *set, long val)
/* /*
* Check whether VALUE at vp is a LEN (32-bit signed integer) and if so, * Check whether VALUE at vp is a LEN (32-bit signed integer) and if so,
* copy that integer to lp. * copy that integer to lp.
* Return: 1, 2, 0, or -1 XXX *
* Return: 1 ==> not an integer, 2 ==> int > 2^31, 0 ==> OK, -1 ==> error
*/ */
static int static int

View File

@@ -19,8 +19,8 @@
* received a copy with calc; if not, write to Free Software Foundation, Inc. * received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
* *
* @(#) $Revision: 29.19 $ * @(#) $Revision: 29.20 $
* @(#) $Id: config.h,v 29.19 2006/06/20 10:25:45 chongo Exp $ * @(#) $Id: config.h,v 29.20 2006/06/25 22:05:38 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/RCS/config.h,v $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/config.h,v $
* *
* Under source code control: 1995/11/01 22:20:17 * Under source code control: 1995/11/01 22:20:17
@@ -153,8 +153,8 @@ struct config {
BOOL blkverbose; /* TRUE => print all lines if a block */ BOOL blkverbose; /* TRUE => print all lines if a block */
int blkbase; /* block output base */ int blkbase; /* block output base */
int blkfmt; /* block output style */ int blkfmt; /* block output style */
long calc_debug; /* internal debug, see CALC_DEBUG_XXX below */ long calc_debug; /* internal debug, see CALC_DEBUG_XYZ below */
long resource_debug; /* resource debug, see RSCDBG_XXX below */ long resource_debug; /* resource debug, see RSCDBG_XYZ below */
long user_debug; /* user defined debug value: 0 default */ long user_debug; /* user defined debug value: 0 default */
BOOL verbose_quit; /* TRUE => print Quit or abort executed msg */ BOOL verbose_quit; /* TRUE => print Quit or abort executed msg */
int ctrl_d; /* see CTRL_D_xyz below */ int ctrl_d; /* see CTRL_D_xyz below */

View File

@@ -17,8 +17,8 @@
* received a copy with calc; if not, write to Free Software Foundation, Inc. * received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
* *
* @(#) $Revision: 29.7 $ * @(#) $Revision: 29.8 $
* @(#) $Id: c_argv.c,v 29.7 2006/05/22 19:04:45 chongo Exp $ * @(#) $Id: c_argv.c,v 29.8 2006/06/25 22:06:23 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/c_argv.c,v $ * @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/c_argv.c,v $
* *
* Under source code control: 1997/03/09 20:27:37 * Under source code control: 1997/03/09 20:27:37
@@ -123,12 +123,9 @@ c_argv(char UNUSED *name, int count, VALUE **vals)
case V_BLOCK: /* memory block */ case V_BLOCK: /* memory block */
type = "octet_block"; type = "octet_block";
break; break;
#if 0
/* XXX - V_OCTET is subject to change */
case V_OCTET: /* octet (unsigned char) */ case V_OCTET: /* octet (unsigned char) */
type = "octet"; type = "octet";
break; break;
#endif
default: default:
type = "unknown"; type = "unknown";
break; break;

View File

@@ -17,8 +17,8 @@
* received a copy with calc; if not, write to Free Software Foundation, Inc. * received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
* *
* @(#) $Revision: 29.3 $ * @(#) $Revision: 29.5 $
* @(#) $Id: c_pmodm127.c,v 29.3 2004/07/29 09:48:31 chongo Exp $ * @(#) $Id: c_pmodm127.c,v 29.5 2006/06/25 22:08:42 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/c_pmodm127.c,v $ * @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/c_pmodm127.c,v $
* *
* Under source code control: 2004/07/28 22:12:25 * Under source code control: 2004/07/28 22:12:25
@@ -156,7 +156,11 @@ c_pmodm127(char UNUSED *name, int UNUSED count, VALUE **vals)
#else #else
zsquare(result.v_num->num, &temp); /* square */ zsquare(result.v_num->num, &temp); /* square */
#endif #endif
/* XXX - we could manually shift to speed up a tiny bit */ /*
* We could manually shift here, but this would o speed
* up the operation only a very tiny bit at the expense
* of a bunch of special code.
*/
zfree(result.v_num->num); zfree(result.v_num->num);
zshift(temp, 1, &result.v_num->num); /* times 2 */ zshift(temp, 1, &result.v_num->num); /* times 2 */
zfree(temp); zfree(temp);

161
func.c
View File

@@ -19,8 +19,8 @@
* received a copy with calc; if not, write to Free Software Foundation, Inc. * received a copy with calc; if not, write to Free Software Foundation, Inc.
* 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
* *
* @(#) $Revision: 29.26 $ * @(#) $Revision: 29.28 $
* @(#) $Id: func.c,v 29.26 2006/06/11 00:08:56 chongo Exp $ * @(#) $Id: func.c,v 29.28 2006/06/25 20:33:26 chongo Exp $
* @(#) $Source: /usr/local/src/cmd/calc/RCS/func.c,v $ * @(#) $Source: /usr/local/src/cmd/calc/RCS/func.c,v $
* *
* Under source code control: 1990/02/15 01:48:15 * Under source code control: 1990/02/15 01:48:15
@@ -1694,14 +1694,13 @@ sumlistitems(LIST *lp)
NULL_VALUE, NULL_VALUE); NULL_VALUE, NULL_VALUE);
break; break;
default: default:
copyvalue(vp, &term); addvalue(&sum, vp, &tmp);
freevalue(&sum);
if (tmp.v_type < 0)
return tmp;
sum = tmp;
continue;
} }
if (sum.v_type == V_NULL) {
sum = term;
continue;
}
if (term.v_type == V_NULL)
continue;
addvalue(&sum, &term, &tmp); addvalue(&sum, &term, &tmp);
freevalue(&sum); freevalue(&sum);
freevalue(&term); freevalue(&term);
@@ -1728,7 +1727,6 @@ f_sum(int count, VALUE **vals)
sum.v_subtype = V_NOSUBTYPE; sum.v_subtype = V_NOSUBTYPE;
term.v_type = V_NULL; term.v_type = V_NULL;
term.v_subtype = V_NOSUBTYPE; term.v_subtype = V_NOSUBTYPE;
while (count-- > 0) { while (count-- > 0) {
vp = *vals++; vp = *vals++;
switch(vp->v_type) { switch(vp->v_type) {
@@ -1740,24 +1738,19 @@ f_sum(int count, VALUE **vals)
NULL_VALUE, NULL_VALUE); NULL_VALUE, NULL_VALUE);
break; break;
default: default:
copyvalue(vp, &term); addvalue(&sum, vp, &tmp);
} freevalue(&sum);
if (sum.v_type == V_NULL) { if (tmp.v_type < 0)
sum = term; return tmp;
continue; sum = tmp;
} continue;
if (term.v_type == V_NULL)
continue;
if (term.v_type < 0) {
freevalue(&sum);
return term;
} }
addvalue(&sum, &term, &tmp); addvalue(&sum, &term, &tmp);
freevalue(&term); freevalue(&term);
freevalue(&sum); freevalue(&sum);
sum = tmp; sum = tmp;
if (sum.v_type < 0) if (sum.v_type < 0)
return sum; break;
} }
return sum; return sum;
} }
@@ -1904,26 +1897,70 @@ f_hnrmod(NUMBER *val1, NUMBER *val2, NUMBER *val3, NUMBER *val4)
return res; return res;
} }
VALUE
ssqlistitems(LIST *lp)
{
LISTELEM *ep;
VALUE *vp;
VALUE term;
VALUE tmp;
VALUE sum;
/* initialize VALUEs */
term.v_type = V_NULL;
term.v_subtype = V_NOSUBTYPE;
tmp.v_type = V_NULL;
tmp.v_subtype = V_NOSUBTYPE;
sum.v_type = V_NULL;
sum.v_subtype = V_NOSUBTYPE;
for (ep = lp->l_first; ep; ep = ep->e_next) {
vp = &ep->e_value;
if (vp->v_type == V_LIST) {
term = ssqlistitems(vp->v_list);
} else {
squarevalue(vp, &term);
}
addvalue(&sum, &term, &tmp);
freevalue(&sum);
freevalue(&term);
sum = tmp;
if (sum.v_type < 0)
break;
}
return sum;
}
static VALUE static VALUE
f_ssq(int count, VALUE **vals) f_ssq(int count, VALUE **vals)
{ {
VALUE result, tmp1, tmp2; VALUE tmp;
VALUE sum;
VALUE term;
VALUE *vp;
/* initialize VALUEs */ /* initialize VALUEs */
result.v_subtype = V_NOSUBTYPE; tmp.v_type = V_NULL;
tmp1.v_subtype = V_NOSUBTYPE; tmp.v_subtype = V_NOSUBTYPE;
tmp2.v_subtype = V_NOSUBTYPE; sum.v_type = V_NULL;
sum.v_subtype = V_NOSUBTYPE;
squarevalue(*vals++, &result); term.v_type = V_NULL;
while (--count > 0) { term.v_subtype = V_NOSUBTYPE;
squarevalue(*vals++, &tmp1); while (count-- > 0) {
addvalue(&tmp1, &result, &tmp2); vp = *vals++;
freevalue(&tmp1); if (vp->v_type == V_LIST) {
freevalue(&result); term = ssqlistitems(vp->v_list);
result = tmp2; } else {
squarevalue(vp, &term);
}
addvalue(&sum, &term, &tmp);
freevalue(&term);
freevalue(&sum);
sum = tmp;
if (sum.v_type < 0)
break;
} }
return result; return sum;
} }
@@ -3521,6 +3558,58 @@ f_mod(int count, VALUE **vals)
return res; return res;
} }
static VALUE
f_quomod(int count, VALUE **vals)
{
VALUE *v1, *v2, *v3, *v4, *v5;
VALUE result;
long rnd;
BOOL res;
short s3, s4; /* to preserve subtypes of v3, v4 */
v1 = vals[0];
v2 = vals[1];
v3 = vals[2];
v4 = vals[3];
if (v3->v_type != V_ADDR || v4->v_type != V_ADDR)
return error_value(E_QUOMOD1);
if (count == 5) {
v5 = vals[4];
if (v5->v_type == V_ADDR)
v5 = v5->v_addr;
if (v5->v_type != V_NUM || qisfrac(v5->v_num) ||
qisneg(v5->v_num)) return error_value(E_QUOMOD2);
rnd = qtoi(v5->v_num);
} else
rnd = conf->quomod;
if (v1->v_type == V_ADDR)
v1 = v1->v_addr;
if (v2->v_type == V_ADDR)
v2 = v2->v_addr;
if (v1->v_type != V_NUM || v2->v_type != V_NUM)
return error_value(E_QUOMOD2);
v3 = v3->v_addr;
v4 = v4->v_addr;
s3 = v3->v_subtype;
s4 = v4->v_subtype;
if ((s3 | s4) & V_NOASSIGNTO)
return error_value(E_QUOMOD3);
freevalue(v3);
freevalue(v4);
v3->v_type = V_NUM;
v4->v_type = V_NUM;
v3->v_subtype = s3;
v4->v_subtype = s4;
res = qquomod(v1->v_num, v2->v_num, &v3->v_num, &v4->v_num, rnd);
result.v_type = V_NUM;
result.v_subtype = V_NOSUBTYPE;
result.v_num = res ? qlink(&_qone_) : qlink(&_qzero_);
return result;
}
static VALUE static VALUE
f_mmin(VALUE *v1, VALUE *v2) f_mmin(VALUE *v1, VALUE *v2)
@@ -8374,7 +8463,7 @@ static CONST struct builtin builtins[] = {
"define an environment variable"}, "define an environment variable"},
{"quo", 2, 3, 0, OP_NOP, 0, f_quo, {"quo", 2, 3, 0, OP_NOP, 0, f_quo,
"integer quotient of a by b, rounding type c"}, "integer quotient of a by b, rounding type c"},
{"quomod", 4, 4, 0, OP_QUOMOD, 0, 0, {"quomod", 4, 5, FA, OP_NOP, 0, f_quomod,
"set c and d to quotient and remainder of a\n\t\t\tdivided by b"}, "set c and d to quotient and remainder of a\n\t\t\tdivided by b"},
{"rand", 0, 2, 0, OP_NOP, f_rand, 0, {"rand", 0, 2, 0, OP_NOP, f_rand, 0,
"additive 55 random number [0,2^64), [0,a), or [a,b)"}, "additive 55 random number [0,2^64), [0,a), or [a,b)"},

View File

@@ -57,9 +57,10 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
delete, insert, islist, list, pop, push, remove, rsearch, search, size delete, insert, islist, pop, push, remove, rsearch, search,
select, size
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -75,8 +76,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: append,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: append,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/append,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/append,v $
## ##
## Under source code control: 1994/03/19 03:13:17 ## Under source code control: 1994/03/19 03:13:17

View File

@@ -51,9 +51,9 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
param, usage param, system, usage
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -69,8 +69,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: argv,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: argv,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/argv,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/argv,v $
## ##
## Under source code control: 1999/11/23 19:45:05 ## Under source code control: 1999/11/23 19:45:05

View File

@@ -41,7 +41,7 @@ EXAMPLE
[1,1] = 6 [1,1] = 6
LIMITS LIMITS
The number of arguments is not to exceed 100. The number of arguments is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
none none
@@ -49,7 +49,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
hmean hmean
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -65,8 +65,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: avg,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: avg,v 29.4 2006/06/22 23:49:22 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/avg,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/avg,v $
## ##
## Under source code control: 1994/09/25 20:22:31 ## Under source code control: 1994/09/25 20:22:31

View File

@@ -213,12 +213,27 @@ LIMITS
1 <= chunk < 2^31 1 <= chunk < 2^31
LINK LIBRARY LINK LIBRARY
XXX BLOCK *blkalloc(int len, int chunk)
void blk_free(BLOCK *blk)
BLOCK *blkrealloc(BLOCK *blk, int newlen, int newchunk)
void blktrunc(BLOCK *blk)
BLOCK *blk_copy(BLOCK *blk)
int blk_cmp(BLOCK *a, BLOCK *b)
void blk_print(BLOCK *blk)
void nblock_print(NBLOCK *nblk)
NBLOCK *reallocnblock(int id, int len, int chunk)
NBLOCK *createnblock(char *name, int len, int chunk)
int findnblockid(char * name)
int removenblock(int id)
int countnblocks(void)
void shownblocks(void)
NBLOCK *findnblock(int id)
BLOCK *copyrealloc(BLOCK *blk, int newlen, int newchunk)
SEE ALSO SEE ALSO
blocks, blkfree blocks, blkfree
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -234,8 +249,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.4 $ ## @(#) $Revision: 29.5 $
## @(#) $Id: blk,v 29.4 2006/05/07 07:16:42 chongo Exp $ ## @(#) $Id: blk,v 29.5 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/blk,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/blk,v $
## ##
## Under source code control: 1997/04/05 13:07:13 ## Under source code control: 1997/04/05 13:07:13

View File

@@ -26,9 +26,9 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
XXX - fill in argv, system
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -44,8 +44,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.2 $ ## @(#) $Revision: 29.3 $
## @(#) $Id: cmdbuf,v 29.2 2000/06/07 14:02:33 chongo Exp $ ## @(#) $Id: cmdbuf,v 29.3 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cmdbuf,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cmdbuf,v $
## ##
## Under source code control: 1995/07/09 04:05:58 ## Under source code control: 1995/07/09 04:05:58

View File

@@ -36,9 +36,9 @@ LINK LIBRARY
void zcomb(ZVALUE x, ZVALUE y, ZVALUE *res) void zcomb(ZVALUE x, ZVALUE y, ZVALUE *res)
SEE ALSO SEE ALSO
fact, perm fact, perm, randperm
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -54,8 +54,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: comb,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: comb,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/comb,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/comb,v $
## ##
## Under source code control: 1994/10/20 04:03:02 ## Under source code control: 1994/10/20 04:03:02

View File

@@ -430,6 +430,12 @@ DESCRIPTION
by the various kinds of printing to the output: bits 0, 1, 3 and 4 by the various kinds of printing to the output: bits 0, 1, 3 and 4
are used in the same way as for the functions round and bround. are used in the same way as for the functions round and bround.
The C language method of modulus and integer division is:
config("quomod", 2)
config("quo", 2)
config("mod", 2)
=-= =-=
config("leadzero", boolean) config("leadzero", boolean)
@@ -954,8 +960,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.16 $ ## @(#) $Revision: 29.17 $
## @(#) $Id: config,v 29.16 2006/06/20 10:25:00 chongo Exp $ ## @(#) $Id: config,v 29.17 2006/06/24 19:06:58 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/config,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/config,v $
## ##
## Under source code control: 1991/07/21 04:37:17 ## Under source code control: 1991/07/21 04:37:17

View File

@@ -183,7 +183,7 @@ EXAMPLE
;; } ;; }
LIMITS LIMITS
The number of arguments in a function-call cannot exceed 100. The number of arguments in a function-call cannot exceed 1024.
LIBRARY LIBRARY
none none
@@ -207,8 +207,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.5 $ ## @(#) $Revision: 29.6 $
## @(#) $Id: define,v 29.5 2006/06/10 12:28:10 chongo Exp $ ## @(#) $Id: define,v 29.6 2006/06/22 23:49:22 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/define,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/define,v $
## ##
## ##

View File

@@ -39,9 +39,10 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
append, insert, pop, push, remove, size append, insert, islist, pop, push, remove, rsearch, search,
select, size
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -57,8 +58,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: delete,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: delete,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/delete,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/delete,v $
## ##
## Under source code control: 1994/03/19 03:13:18 ## Under source code control: 1994/03/19 03:13:18

View File

@@ -30,9 +30,9 @@ LINK LIBRARY
void zfact(NUMBER x, *ret) void zfact(NUMBER x, *ret)
SEE ALSO SEE ALSO
comb, perm comb, perm, randperm
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -48,8 +48,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: fact,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: fact,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fact,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fact,v $
## ##
## Under source code control: 1994/10/20 04:03:02 ## Under source code control: 1994/10/20 04:03:02

View File

@@ -47,7 +47,8 @@ LINK LIBRARY
FLAG zfactor(ZVALUE n, ZVALUE limit, ZVALUE *res) FLAG zfactor(ZVALUE n, ZVALUE limit, ZVALUE *res)
SEE ALSO SEE ALSO
lfactor isprime, lfactor, nextcand, nextprime, prevcand, prevprime,
pfact, pix, ptest
## Copyright (C) 1999-2006 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
@@ -65,8 +66,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.4 $ ## @(#) $Revision: 29.5 $
## @(#) $Id: factor,v 29.4 2006/06/01 11:36:02 chongo Exp $ ## @(#) $Id: factor,v 29.5 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/factor,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/factor,v $
## ##
## Under source code control: 1995/12/18 12:34:57 ## Under source code control: 1995/12/18 12:34:57

View File

@@ -43,10 +43,10 @@ EXAMPLE
"Beta" "Beta"
LIMITS LIMITS
none - XXX - is this correct? none
LINK LIBRARY LINK LIBRARY
none - XXX - is this correct? none
SEE ALSO SEE ALSO
fgetstr, fputstr, fgets, fputs, fopen, files, fprintf fgetstr, fputstr, fgets, fputs, fopen, files, fprintf
@@ -67,8 +67,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.4 $ ## @(#) $Revision: 29.5 $
## @(#) $Id: fgetfield,v 29.4 2006/06/10 12:28:10 chongo Exp $ ## @(#) $Id: fgetfield,v 29.5 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fgetfield,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fgetfield,v $
## ##
## Under source code control: 1996/04/30 03:05:17 ## Under source code control: 1996/04/30 03:05:17

View File

@@ -38,10 +38,10 @@ EXAMPLE
; fgetstr(f) ; fgetstr(f)
LIMITS LIMITS
none - XXX - is this correct? none
LINK LIBRARY LINK LIBRARY
none - XXX - is this correct? none
SEE ALSO SEE ALSO
fputstr, fgetword, fgets, fputs, fopen, files, fprintf fputstr, fgetword, fgets, fputs, fopen, files, fprintf
@@ -62,8 +62,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.4 $ ## @(#) $Revision: 29.5 $
## @(#) $Id: fgetstr,v 29.4 2006/06/10 12:28:10 chongo Exp $ ## @(#) $Id: fgetstr,v 29.5 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fgetstr,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fgetstr,v $
## ##
## Under source code control: 1996/04/30 03:05:17 ## Under source code control: 1996/04/30 03:05:17

View File

@@ -25,9 +25,9 @@ LINK LIBRARY
NUMBER *qfib(NUMBER *n) NUMBER *qfib(NUMBER *n)
SEE ALSO SEE ALSO
XXX - fill in fact
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -43,8 +43,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: fib,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: fib,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fib,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fib,v $
## ##
## Under source code control: 1995/10/25 04:03:45 ## Under source code control: 1995/10/25 04:03:45

View File

@@ -46,7 +46,7 @@ EXAMPLE
[3] = NULL [3] = NULL
LIMITS LIMITS
The number of arguments of fprintf() is not to exceed 100. The number of arguments of fprintf() is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
none none
@@ -54,7 +54,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
printf, strprintf, print printf, strprintf, print
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -70,8 +70,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: fprintf,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: fprintf,v 29.4 2006/06/22 23:49:22 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fprintf,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fprintf,v $
## ##
## Under source code control: 1996/03/12 22:50:41 ## Under source code control: 1996/03/12 22:50:41

View File

@@ -31,10 +31,10 @@ EXAMPLE
Error 72 Error 72
LIMITS LIMITS
none - XXX - is this correct? none
LINK LIBRARY LINK LIBRARY
none - XXX - is this correct? none
SEE ALSO SEE ALSO
fgetstr, fgetfield, fgets, fputs, fopen, files, fprintf fgetstr, fgetfield, fgets, fputs, fopen, files, fprintf
@@ -55,8 +55,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.4 $ ## @(#) $Revision: 29.5 $
## @(#) $Id: fputstr,v 29.4 2006/06/10 12:28:10 chongo Exp $ ## @(#) $Id: fputstr,v 29.5 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fputstr,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fputstr,v $
## ##
## Under source code control: 1996/04/30 03:05:18 ## Under source code control: 1996/04/30 03:05:18

View File

@@ -32,16 +32,16 @@ EXAMPLE
Error 10013 Error 10013
LIMITS LIMITS
none - XXX - is this correct? none
LINK LIBRARY LINK LIBRARY
none - XXX - is this correct? none
SEE ALSO SEE ALSO
errno, fclose, feof, ferror, fflush, fgetc, fgetline, fgets, files, fopen, errno, fclose, feof, ferror, fflush, fgetc, fgetline, fgets, files, fopen,
fprintf, fputc, fputs, fseek, fsize, ftell, isfile, printf, prompt fprintf, fputc, fputs, fseek, fsize, ftell, isfile, printf, prompt
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -57,8 +57,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: freopen,v 29.3 2006/05/07 07:18:56 chongo Exp $ ## @(#) $Id: freopen,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/freopen,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/freopen,v $
## ##
## Under source code control: 1996/04/30 03:05:18 ## Under source code control: 1996/04/30 03:05:18

View File

@@ -30,15 +30,15 @@ EXAMPLE
7 a-2i word 49 7 a-2i word 49
LIMITS LIMITS
none - XXX - is this correct? The number of arguments is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
none - XXX - is this correct? none
SEE ALSO SEE ALSO
scan, strscan, fscanf, scanf, strscanf, printf, fprintf, strprintf scan, strscan, fscanf, scanf, strscanf, printf, fprintf, strprintf
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -54,8 +54,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: fscan,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: fscan,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fscan,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fscan,v $
## ##
## Under source code control: 1996/04/30 03:05:18 ## Under source code control: 1996/04/30 03:05:18

View File

@@ -121,15 +121,15 @@ EXAMPLE
"mma" "mma"
LIMITS LIMITS
none - XXX - is this correct? The number of arguments is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
none - XXX - is this correct? extern int fscanfid(FILEID id, char *fmt, int count, VALUE **vals);
SEE ALSO SEE ALSO
scanf, strscanf, printf, fprintf, strprintf, fscan, scan, strscan scanf, strscanf, printf, fprintf, strprintf, fscan, scan, strscan
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -145,8 +145,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: fscanf,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: fscanf,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fscanf,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fscanf,v $
## ##
## Under source code control: 1996/04/30 03:05:18 ## Under source code control: 1996/04/30 03:05:18

View File

@@ -19,7 +19,7 @@ EXAMPLE
6 .02 0 6 .02 0
LIMITS LIMITS
The number of arguments may not to exceed 100. The number of arguments may not to exceed 1024.
LINK LIBRARY LINK LIBRARY
NUMBER *qgcd(NUMBER *x1, NUMBER *x2) NUMBER *qgcd(NUMBER *x1, NUMBER *x2)
@@ -27,7 +27,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
lcm lcm
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -43,8 +43,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: gcd,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: gcd,v 29.4 2006/06/22 23:49:22 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/gcd,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/gcd,v $
## ##
## Under source code control: 1995/10/05 04:52:26 ## Under source code control: 1995/10/05 04:52:26

View File

@@ -29,7 +29,7 @@ EXAMPLE
2378490456 2378490456
LIMITS LIMITS
The number of arguments is not to exceed 100. The number of arguments is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
none none
@@ -37,7 +37,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
sha, sha1, md5 sha, sha1, md5
## Copyright (C) 1999-2003 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -53,8 +53,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.4 $ ## @(#) $Revision: 29.5 $
## @(#) $Id: hash,v 29.4 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: hash,v 29.5 2006/06/22 23:49:22 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/hash,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/hash,v $
## ##
## Under source code control: 1996/03/12 23:10:01 ## Under source code control: 1996/03/12 23:10:01

View File

@@ -29,7 +29,7 @@ EXAMPLE
1 4/3 18/11 48/25 0 1 4/3 18/11 48/25 0
LIMITS LIMITS
The number of arguments is not to exceed 100. The number of arguments is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
none none
@@ -37,7 +37,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
avg avg
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -53,8 +53,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: hmean,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: hmean,v 29.4 2006/06/22 23:49:22 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/hmean,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/hmean,v $
## ##
## Under source code control: 1995/12/18 03:30:59 ## Under source code control: 1995/12/18 03:30:59

View File

@@ -56,9 +56,10 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
append, delete, islist, list, pop, push, remove, rsearch, search, size append, delete, islist, pop, push, remove, rsearch, search,
select, size
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -74,8 +75,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: insert,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: insert,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/insert,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/insert,v $
## ##
## Under source code control: 1994/03/19 03:13:18 ## Under source code control: 1994/03/19 03:13:18

View File

@@ -34,7 +34,7 @@ LIMITS
none none
LINK LIBRARY LINK LIBRARY
none - XXX ??? none
SEE ALSO SEE ALSO
blk, blocks, blkfree, blk, blocks, blkfree,
@@ -43,7 +43,7 @@ SEE ALSO
isobjtype, isodd, isprime, isrand, israndom, isreal, isrel, isobjtype, isodd, isprime, isrand, israndom, isreal, isrel,
issimple, issq, isstr, istype issimple, issq, isstr, istype
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -59,8 +59,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: isblk,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: isblk,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isblk,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isblk,v $
## ##
## Under source code control: 1997/04/06 03:03:23 ## Under source code control: 1997/04/06 03:03:23

View File

@@ -34,7 +34,7 @@ LIMITS
none none
LINK LIBRARY LINK LIBRARY
none - XXX ? none
SEE ALSO SEE ALSO
define, undefine, define, undefine,
@@ -43,7 +43,7 @@ SEE ALSO
isobjtype, isodd, isprime, isrand, israndom, isreal, isrel, isobjtype, isodd, isprime, isrand, israndom, isreal, isrel,
issimple, issq, isstr, istype issimple, issq, isstr, istype
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -59,8 +59,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: isdefined,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: isdefined,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isdefined,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isdefined,v $
## ##
## Under source code control: 1997/04/05 14:10:17 ## Under source code control: 1997/04/05 14:10:17

View File

@@ -25,14 +25,15 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
append, delete, insert, islist, pop, push, remove, rsearch, append, delete, insert, pop, push, remove, rsearch, search,
search, size, list, select, size,
isassoc, isatty, isblk, isconfig, isdefined, iserror, iseven, isfile,
ishash, isident, isint, ismat, ismult, isnull, isnum, isobj,
isobjtype, isodd, isprime, isrand, israndom, isreal, isrel,
issimple, issq, isstr, istype
## Copyright (C) 1999 Landon Curt Noll isassoc, isatty, isblk, isconfig, isdefined, iserror, iseven, isfile,
ishash, isident, isint, ismat, ismult, isnull, isnum, isobj,
isobjtype, isodd, isprime, isrand, israndom, isreal, isrel,
issimple, issq, isstr, istype
## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -48,8 +49,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: islist,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: islist,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/islist,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/islist,v $
## ##
## Under source code control: 1994/03/19 03:13:19 ## Under source code control: 1994/03/19 03:13:19

View File

@@ -25,7 +25,7 @@ LIMITS
none none
LINK LIBRARY LINK LIBRARY
none - XXX ??? none
SEE ALSO SEE ALSO
obj, obj,
@@ -34,7 +34,7 @@ SEE ALSO
isodd, isprime, isrand, israndom, isreal, isrel, isodd, isprime, isrand, israndom, isreal, isrel,
issimple, issq, isstr, istype issimple, issq, isstr, istype
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -50,8 +50,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: isobjtype,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: isobjtype,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isobjtype,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isobjtype,v $
## ##
## Under source code control: 1997/04/05 14:10:17 ## Under source code control: 1997/04/05 14:10:17

View File

@@ -45,13 +45,10 @@ LINK LIBRARY
FLAG zisprime(ZVALUE x) (return 1 if prime, 0 not prime, -1 if >= 2^32) FLAG zisprime(ZVALUE x) (return 1 if prime, 0 not prime, -1 if >= 2^32)
SEE ALSO SEE ALSO
factor, lfactor, nextprime, prevprime, pfact, pix, factor, lfactor, nextcand, nextprime, prevcand, prevprime,
isassoc, isatty, isblk, isconfig, isdefined, iserror, iseven, isfile, pfact, pix, ptest
ishash, isident, isint, islist, ismat, ismult, isnull, isnum, isobj,
isobjtype, isodd, isrand, israndom, isreal, isrel,
issimple, issq, isstr, istype
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -67,8 +64,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: isprime,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: isprime,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isprime,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/isprime,v $
## ##
## Under source code control: 1994/10/21 02:21:29 ## Under source code control: 1994/10/21 02:21:29

View File

@@ -13,8 +13,6 @@ DESCRIPTION
Determine if x is a Blum-Blum-Shub pseudo-random number generator state. Determine if x is a Blum-Blum-Shub pseudo-random number generator state.
This function will return 1 if x is a file, 0 otherwise. This function will return 1 if x is a file, 0 otherwise.
XXX - the interface to the Blum generator has not been not written.
EXAMPLE EXAMPLE
; a = srandom(0) ; a = srandom(0)
; print israndom(a), israndom(0); ; print israndom(a), israndom(0);
@@ -33,7 +31,7 @@ SEE ALSO
isobjtype, isodd, isprime, isrand, isreal, isrel, isobjtype, isodd, isprime, isrand, isreal, isrel,
issimple, issq, isstr, istype issimple, issq, isstr, istype
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -49,8 +47,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: israndom,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: israndom,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/israndom,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/israndom,v $
## ##
## Under source code control: 1995/11/11 05:09:41 ## Under source code control: 1995/11/11 05:09:41

View File

@@ -21,7 +21,7 @@ EXAMPLE
-120 79.2 2 -120 79.2 2
LIMITS LIMITS
none The number of arguments is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
NUMBER *qlcm(NUMBER *x1, NUMBER *x2) NUMBER *qlcm(NUMBER *x1, NUMBER *x2)
@@ -29,7 +29,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
gcd gcd
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -45,8 +45,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: lcm,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: lcm,v 29.4 2006/06/22 23:49:22 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/lcm,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/lcm,v $
## ##
## Under source code control: 1995/10/05 04:52:26 ## Under source code control: 1995/10/05 04:52:26

View File

@@ -40,7 +40,8 @@ LINK LIBRARY
FULL zlowfactor(ZVALUE z, long count) FULL zlowfactor(ZVALUE z, long count)
SEE ALSO SEE ALSO
factor factor, isprime, nextcand, nextprime, prevcand, prevprime,
pfact, pix, ptest
## Copyright (C) 1999-2006 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
@@ -58,8 +59,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.4 $ ## @(#) $Revision: 29.5 $
## @(#) $Id: lfactor,v 29.4 2006/06/01 11:36:02 chongo Exp $ ## @(#) $Id: lfactor,v 29.5 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/lfactor,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/lfactor,v $
## ##
## Under source code control: 1995/12/18 12:34:57 ## Under source code control: 1995/12/18 12:34:57

View File

@@ -410,9 +410,9 @@ LINK LIBRARY
n/a n/a
SEE ALSO SEE ALSO
ismat, matdim, matmax, matmin, mattrans, mattrace, matsum, det, inverse, ismat, matdim, matmax, matmin, mattrans, mattrace, matsum, matfill,
isident, test, config, search, rsearch, reverse, copy, blkcpy, dp, cp, det, inverse, isident, test, config, search, rsearch, reverse, copy,
randperm, sort blkcpy, dp, cp, randperm, sort
## Copyright (C) 1999-2006 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
@@ -430,8 +430,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.6 $ ## @(#) $Revision: 29.7 $
## @(#) $Id: mat,v 29.6 2006/06/11 07:25:14 chongo Exp $ ## @(#) $Id: mat,v 29.7 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/mat,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/mat,v $
## ##
## Under source code control: 1991/07/21 04:37:22 ## Under source code control: 1991/07/21 04:37:22

View File

@@ -24,9 +24,11 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
XXX - fill in mat, ismat, matmax, matmin, mattrans, mattrace, matsum, matfill,
det, inverse, isident, test, config, search, rsearch, reverse, copy,
blkcpy, dp, cp, randperm, sort
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -42,8 +44,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: matdim,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: matdim,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/matdim,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/matdim,v $
## ##
## Under source code control: 1995/10/25 04:03:45 ## Under source code control: 1995/10/25 04:03:45

View File

@@ -37,9 +37,11 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
XXX - fill in mat, ismat, matdim, matmax, matmin, mattrans, mattrace, matsum,
det, inverse, isident, test, config, search, rsearch, reverse, copy,
blkcpy, dp, cp, randperm, sort
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -55,8 +57,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: matfill,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: matfill,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/matfill,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/matfill,v $
## ##
## Under source code control: 1995/10/25 04:03:45 ## Under source code control: 1995/10/25 04:03:45

View File

@@ -26,9 +26,11 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
XXX - fill in mat, ismat, matdim, matmin, mattrans, mattrace, matsum, matfill,
det, inverse, isident, test, config, search, rsearch, reverse, copy,
blkcpy, dp, cp, randperm, sort
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -44,8 +46,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: matmax,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: matmax,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/matmax,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/matmax,v $
## ##
## Under source code control: 1995/10/25 04:03:45 ## Under source code control: 1995/10/25 04:03:45

View File

@@ -26,9 +26,11 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
XXX - fill in mat, ismat, matdim, matmax, mattrans, mattrace, matsum, matfill,
det, inverse, isident, test, config, search, rsearch, reverse, copy,
blkcpy, dp, cp, randperm, sort
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -44,8 +46,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: matmin,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: matmin,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/matmin,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/matmin,v $
## ##
## Under source code control: 1995/10/25 04:03:45 ## Under source code control: 1995/10/25 04:03:45

View File

@@ -25,9 +25,11 @@ LINK LIBRARY
void matsum(MATRIX *m, VALUE *vres); void matsum(MATRIX *m, VALUE *vres);
SEE ALSO SEE ALSO
XXX - fill in mat, ismat, matdim, matmax, matmin, mattrans, mattrace, matfill,
det, inverse, isident, test, config, search, rsearch, reverse, copy,
blkcpy, dp, cp, randperm, sort
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -43,8 +45,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: matsum,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: matsum,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/matsum,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/matsum,v $
## ##
## Under source code control: 1995/10/25 04:03:46 ## Under source code control: 1995/10/25 04:03:46

View File

@@ -31,9 +31,11 @@ LINK LIBRARY
MATRIX *mattrans(MATRIX *m) MATRIX *mattrans(MATRIX *m)
SEE ALSO SEE ALSO
XXX - fill in mat, ismat, matdim, matmax, matmin, mattrace, matsum, matfill,
det, inverse, isident, test, config, search, rsearch, reverse, copy,
blkcpy, dp, cp, randperm, sort
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -49,8 +51,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: mattrans,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: mattrans,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/mattrans,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/mattrans,v $
## ##
## Under source code control: 1995/10/25 04:03:46 ## Under source code control: 1995/10/25 04:03:46

View File

@@ -62,7 +62,7 @@ EXAMPLE
3 3
LIMITS LIMITS
The number of arguments is not to exceed 100. The number of arguments is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
NUMBER *qmax(NUMBER *x1, NUMBER *x2) NUMBER *qmax(NUMBER *x1, NUMBER *x2)
@@ -70,7 +70,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
max, obj max, obj
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -86,8 +86,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: max,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: max,v 29.4 2006/06/22 23:49:22 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/max,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/max,v $
## ##
## Under source code control: 1995/10/05 04:52:27 ## Under source code control: 1995/10/05 04:52:27

View File

@@ -62,15 +62,15 @@ EXAMPLE
1 1
LIMITS LIMITS
The number of arguments is not to exceed 100. The number of arguments is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
NUMBER *qmin(NUMBER *x1, NUMBER *x2) NUMBER *qmin(NUMBER *x1, NUMBER *x2)
SEE ALSO SEE ALSO
max, obj max, obj, sum, ssq
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -86,8 +86,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: min,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: min,v 29.4 2006/06/22 23:49:22 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/min,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/min,v $
## ##
## Under source code control: 1995/10/05 04:52:27 ## Under source code control: 1995/10/05 04:52:27

View File

@@ -23,6 +23,24 @@ TYPES
return number return number
DESCRIPTION DESCRIPTION
The expression:
x % y
is equivalent to call:
mod(x, y)
The function:
mod(x, y, rnd)
is equivalent to:
config("mod", rnd), x % y
except that the global config("mod") value does not change.
If x is real or complex and y is zero, mod(x, y, rnd) returns x. If x is real or complex and y is zero, mod(x, y, rnd) returns x.
If x is complex, mod(x, y, rnd) returns If x is complex, mod(x, y, rnd) returns
@@ -32,18 +50,16 @@ DESCRIPTION
If x/y is an integer mod(x, y, rnd) returns zero. If x/y is an integer mod(x, y, rnd) returns zero.
If x/y is not an integer, mod(x, y, rnd) returns one of the two numbers If x/y is not an integer, mod(x, y, rnd) returns one of the two
r for which for some integer q, x = q * v + r and abs(r) < abs(y). values of r for which for some integer q exists such that x = q * y + r
Which of the two numbers is returned is controlled by rnd. and abs(r) < abs(y). Which of the two values or r that is returned is
controlled by rnd.
If bit 4 of rnd is set (e.g. if 16 <= rnd < 32) abs(r) <= abs(y)/2; If bit 4 of rnd is set (e.g. if 16 <= rnd < 32) abs(r) <= abs(y)/2;
this uniquely determines r if abs(r) < abs(y)/2. If bit 4 of rnd is this uniquely determines r if abs(r) < abs(y)/2. If bit 4 of rnd is
set and abs(r) = abs(y)/2, or if bit 4 of r is not set, the result for set and abs(r) = abs(y)/2, or if bit 4 of r is not set, the result for
r depends on rnd as in the following table: r depends on rnd as in the following table:
(Blank entries indicate that the description would be complicated
and probably not of much interest.)
rnd & 15 sign of r parity of q rnd & 15 sign of r parity of q
0 sgn(y) 0 sgn(y)
@@ -63,26 +79,36 @@ DESCRIPTION
14 even if x > 0, otherwise odd 14 even if x > 0, otherwise odd
15 odd if x > 0, otherwise even 15 odd if x > 0, otherwise even
This dependence on rnd is consistent with quo(x, y, rnd) and NOTE: Blank entries in the table above indicate that the
appr(x, y, rnd) in that for any real x and y and any integer rnd, description would be complicated and probably not of
much interest.
x = y * quo(x, y, rnd) + mod(x, y, rnd). The C language method of modulus and integer division is:
mod(x, y, rnd) = x - appr(x, y, rnd)
If y and rnd are fixed and mod(x, y, rnd) is to be considered as config("quomod", 2)
a canonical residue of x modulo y, bits 1 and 3 of rnd should be config("quo", 2)
zero: if 0 <= rnd < 32, it is only for rnd = 0, 1, 4, 5, 16, 17, config("mod", 2)
20, or 21, that the set of possible values for mod(x, y, rnd)
form an interval of length y, and for any x1, x2,
mod(x1, y, rnd) = mod(x2, y, rnd) This dependence on rnd is consistent with quo(x, y, rnd) and
appr(x, y, rnd) in that for any real x and y and any integer rnd,
is equivalent to: x = y * quo(x, y, rnd) + mod(x, y, rnd).
mod(x, y, rnd) = x - appr(x, y, rnd)
x1 is congruent to x2 modulo y. If y and rnd are fixed and mod(x, y, rnd) is to be considered as
a canonical residue of x % y, bits 1 and 3 of rnd should be
zero: if 0 <= rnd < 32, it is only for rnd = 0, 1, 4, 5, 16, 17,
20, or 21, that the set of possible values for mod(x, y, rnd)
form an interval of length y, and for any x1, x2,
This is particularly relevant when working with the ring of mod(x1, y, rnd) = mod(x2, y, rnd)
integers modulo an integer y.
is equivalent to:
x1 is congruent to x2 modulo y.
This is particularly relevant when working with the ring of
integers modulo an integer y.
EXAMPLE EXAMPLE
; print mod(11,5,0), mod(11,5,1), mod(-11,5,2), mod(-11,-5,3) ; print mod(11,5,0), mod(11,5,1), mod(-11,5,2), mod(-11,-5,3)
@@ -111,7 +137,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
quo, quomod, //, % quo, quomod, //, %
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -127,8 +153,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.5 $
## @(#) $Id: mod,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: mod,v 29.5 2006/06/24 19:06:58 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/mod,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/mod,v $
## ##
## Under source code control: 1995/09/18 02:09:31 ## Under source code control: 1995/09/18 02:09:31

View File

@@ -33,12 +33,12 @@ LIMITS
none none
LINK LIBRARY LINK LIBRARY
none - XXX ??? none
SEE ALSO SEE ALSO
blk, fopen blk, fopen
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -54,8 +54,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: name,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: name,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/name,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/name,v $
## ##
## Under source code control: 1997/04/05 14:12:44 ## Under source code control: 1997/04/05 14:12:44

View File

@@ -74,9 +74,10 @@ LINK LIBRARY
ZVALUE *cand) ZVALUE *cand)
SEE ALSO SEE ALSO
prevcand, ptest factor, isprime, lfactor, nextprime, prevcand, prevprime,
pfact, pix, ptest
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -92,8 +93,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: nextcand,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: nextcand,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/nextcand,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/nextcand,v $
## ##
## Under source code control: 1996/02/25 00:27:43 ## Under source code control: 1996/02/25 00:27:43

View File

@@ -33,9 +33,10 @@ LINK LIBRARY
FULL znprime(ZVALUE z) FULL znprime(ZVALUE z)
SEE ALSO SEE ALSO
prevprime factor, isprime, lfactor, nextcand, prevcand, prevprime,
pfact, pix, ptest
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -51,8 +52,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: nextprime,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: nextprime,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/nextprime,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/nextprime,v $
## ##
## Under source code control: 1995/12/18 12:34:57 ## Under source code control: 1995/12/18 12:34:57

View File

@@ -66,7 +66,7 @@ EXAMPLE
27 27
LIMITS LIMITS
The number of arguments is not to exceed 100. The number of arguments is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
none none
@@ -74,7 +74,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
isnull, test isnull, test
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -90,8 +90,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: null,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: null,v 29.4 2006/06/22 23:49:22 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/null,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/null,v $
## ##
## Under source code control: 1996/03/12 23:10:01 ## Under source code control: 1996/03/12 23:10:01

View File

@@ -35,9 +35,9 @@ LINK LIBRARY
void zperm(NUMBER x, y, *ret) void zperm(NUMBER x, y, *ret)
SEE ALSO SEE ALSO
comb, fact comb, fact, randperm
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -53,8 +53,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: perm,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: perm,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/perm,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/perm,v $
## ##
## Under source code control: 1994/10/20 04:03:02 ## Under source code control: 1994/10/20 04:03:02

View File

@@ -24,9 +24,10 @@ LINK LIBRARY
void zpfact(ZVALUE z, ZVALUE *dest) void zpfact(ZVALUE z, ZVALUE *dest)
SEE ALSO SEE ALSO
fact, lcmfact factor, isprime, lfactor, nextcand, nextprime, prevcand, prevprime,
pix, ptest, fact, lcmfact
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -42,8 +43,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: pfact,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: pfact,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/pfact,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/pfact,v $
## ##
## Under source code control: 1995/12/18 12:34:57 ## Under source code control: 1995/12/18 12:34:57

View File

@@ -24,9 +24,9 @@ LINK LIBRARY
NUMBER *qpi(NUMBER *eps) NUMBER *qpi(NUMBER *eps)
SEE ALSO SEE ALSO
XXX - fill in atan2
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -42,8 +42,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: pi,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: pi,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/pi,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/pi,v $
## ##
## Under source code control: 1995/10/25 04:03:46 ## Under source code control: 1995/10/25 04:03:46

View File

@@ -35,9 +35,10 @@ LINK LIBRARY
FULL pix(FULL x) FULL pix(FULL x)
SEE ALSO SEE ALSO
XXX - fill in factor, isprime, lfactor, nextcand, nextprime, prevcand, prevprime,
pfact, ptest
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -53,8 +54,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: pix,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: pix,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/pix,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/pix,v $
## ##
## Under source code control: 1995/12/18 12:34:58 ## Under source code control: 1995/12/18 12:34:58

View File

@@ -128,15 +128,15 @@ EXAMPLE
113 113 113 113 113 113
LIMITS LIMITS
The number of arguments is not to exceed 100 The number of arguments is not to exceed 1024
LINK LIBRARY LINK LIBRARY
BOOL evalpoly(LIST *clist, LISTELEM *x, VALUE *result); BOOL evalpoly(LIST *clist, LISTELEM *x, VALUE *result);
SEE ALSO SEE ALSO
XXX - fill in list
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -152,8 +152,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: poly,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: poly,v 29.4 2006/06/22 23:49:22 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/poly,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/poly,v $
## ##
## Under source code control: 1995/12/02 02:40:43 ## Under source code control: 1995/12/02 02:40:43

View File

@@ -43,9 +43,10 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
append, delete, insert, islist, list, push, remove, rsearch, search, size append, delete, insert, islist, push, remove, rsearch, search,
select, size
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -61,8 +62,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: pop,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: pop,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/pop,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/pop,v $
## ##
## Under source code control: 1994/03/19 03:13:20 ## Under source code control: 1994/03/19 03:13:20

View File

@@ -82,9 +82,10 @@ LINK LIBRARY
ZVALUE *cand) ZVALUE *cand)
SEE ALSO SEE ALSO
nextcand, ptest factor, isprime, lfactor, nextcand, nextprime, prevprime,
pfact, pix, ptest
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -100,8 +101,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: prevcand,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: prevcand,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/prevcand,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/prevcand,v $
## ##
## Under source code control: 1996/02/25 00:27:43 ## Under source code control: 1996/02/25 00:27:43

View File

@@ -36,9 +36,10 @@ LINK LIBRARY
FULL zpprime(ZVALUE z) FULL zpprime(ZVALUE z)
SEE ALSO SEE ALSO
nextprime factor, isprime, lfactor, nextcand, nextprime, prevcand,
pfact, pix, ptest
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -54,8 +55,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: prevprime,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: prevprime,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/prevprime,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/prevprime,v $
## ##
## Under source code control: 1995/12/18 12:34:58 ## Under source code control: 1995/12/18 12:34:58

View File

@@ -118,7 +118,7 @@ EXAMPLE
LIMITS LIMITS
The number of arguments of printf() is not to exceed 100. The number of arguments of printf() is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
none none
@@ -126,7 +126,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
fprintf, strprintf, print fprintf, strprintf, print
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -142,8 +142,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: printf,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: printf,v 29.4 2006/06/22 23:49:22 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/printf,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/printf,v $
## ##
## Under source code control: 1996/03/12 22:50:41 ## Under source code control: 1996/03/12 22:50:41

View File

@@ -35,7 +35,7 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
XXX - fill in fgetfield, fgetline, fgetstr
## Copyright (C) 1999-2006 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
@@ -53,8 +53,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.4 $ ## @(#) $Revision: 29.5 $
## @(#) $Id: prompt,v 29.4 2006/06/10 12:28:10 chongo Exp $ ## @(#) $Id: prompt,v 29.5 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/prompt,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/prompt,v $
## ##
## Under source code control: 1995/12/18 12:34:58 ## Under source code control: 1995/12/18 12:34:58

View File

@@ -126,9 +126,10 @@ LINK LIBRARY
BOOL zprimetest(ZVALUE n, long count, long skip) BOOL zprimetest(ZVALUE n, long count, long skip)
SEE ALSO SEE ALSO
isprime, prevcand, nextcand factor, isprime, lfactor, nextcand, nextprime, prevcand, prevprime,
pfact, pix
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -144,8 +145,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: ptest,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: ptest,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ptest,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ptest,v $
## ##
## Under source code control: 1996/02/25 00:27:43 ## Under source code control: 1996/02/25 00:27:43

View File

@@ -52,9 +52,10 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
append, delete, insert, islist, list, pop, remove, rsearch, search, size append, delete, insert, islist, pop, remove, rsearch, search,
select, size
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -70,8 +71,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: push,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: push,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/push,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/push,v $
## ##
## Under source code control: 1994/03/19 03:13:20 ## Under source code control: 1994/03/19 03:13:20

View File

@@ -32,8 +32,8 @@ DESCRIPTION
If x/y is an integer quo(x, y, rnd) returns x/y. If x/y is an integer quo(x, y, rnd) returns x/y.
If x is real, y nonzero and x/y is not an integer, x // y returns If x is real, y nonzero and x/y is not an integer, x // y returns
one of the two integers v for which abs(x/y - v) < 1. Which one of the two integers v for which abs(x/y - v) < 1. Which
integer is returned is controlled by rnd as follows: integer is returned is controlled by rnd as follows:
rnd sign of x/y - v Description of rounding rnd sign of x/y - v Description of rounding
@@ -60,6 +60,16 @@ DESCRIPTION
half-integer, as if half-integer, as if
rnd replaced by rnd & 15 rnd replaced by rnd & 15
NOTE: Blank entries in the table above indicate that the
description would be complicated and probably not of
much interest.
The C language method of modulus and integer division is:
config("quomod", 2)
config("quo", 2)
config("mod", 2)
EXAMPLE EXAMPLE
print quo(11,5,0), quo(11,5,1), quo(-11,5,2), quo(-11,-5,3) print quo(11,5,0), quo(11,5,1), quo(-11,5,2), quo(-11,-5,3)
2 3 -2 3 2 3 -2 3
@@ -93,8 +103,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.2 $ ## @(#) $Revision: 29.3 $
## @(#) $Id: quo,v 29.2 2000/06/07 14:02:33 chongo Exp $ ## @(#) $Id: quo,v 29.3 2006/06/24 19:06:58 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/quo,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/quo,v $
## ##
## Under source code control: 1995/09/18 04:01:44 ## Under source code control: 1995/09/18 04:01:44

View File

@@ -2,13 +2,14 @@ NAME
quomod - assign quotient and remainder to two variables quomod - assign quotient and remainder to two variables
SYNOPSIS SYNOPSIS
quomod(x, y, q, r) quomod(x, y, q, r [, rnd])
TYPES TYPES
x real x real
y real y real
q any q any
r any r any
rnd integer, defaults to config("quomod")
return real return real
@@ -19,18 +20,43 @@ DESCRIPTION
Q and R. If x >= 0, the results for Q and R are the same as Q and R. If x >= 0, the results for Q and R are the same as
those given by Q = x // y, R = x % y. those given by Q = x // y, R = x % y.
XXX - need to document relationship with "quomod" config value The argument rnd (if passed or config value config("quomod") if the
rnd argument is not passed) impacts the rounding mode for producing
the quotient and modulus. See "help quo" details of how the quotient
is impacted by rounding modes. See "help mod" for details of how
the modulus is impacted by rounding modes. The only difference on
those descriptions is that quomod() is controlled by a single config
value config("quomod") instead of config("quo") and config("mod").
XXX - replace the above paragraph and directly describe how rnd
and config("quomod") impact quomod.
The C language method of modulus and integer division is:
config("quomod", 2)
config("quo", 2)
config("mod", 2)
EXAMPLE EXAMPLE
; global u, v; ; global u, v;
; global mat M[2]; ; global mat M[2];
; print quomod(13,5,u,v), u, v, quomod(15.6,5.2,M[0],M[1]), M[0], M[1]; ; print quomod(13,5,u,v), u, v, quomod(15.6,5.2,M[0],M[1]), M[0], M[1];
; 1 2 3 0 3 0 1 2 3 0 3 0
; A = assoc(); ; A = assoc();
; print quomod(13, 5, A[1], A[2]), A[1], A[2] ; print quomod(13, 5, A[1], A[2]), A[1], A[2]
; 1 2 3 ; 1 2 3
XXX - need examples of how the "quomod" config file changes results ; print quomod(10, -3, u, v), u, v;
1 -4 -2
; print quomod(10, -3, u, v, 0), u, v;
1 -4 -2
; print quomod(10, -3, u, v, 1), u, v;
1 -3 1
; print quomod(10, -3, u, v, 2), u, v;
1 -3 1
; print quomod(-10, -3, u, v, 2), u, v;
1 3 -1
LIMITS LIMITS
y > 0 y > 0
@@ -41,7 +67,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
//, % //, %
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -57,8 +83,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.5 $
## @(#) $Id: quomod,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: quomod,v 29.5 2006/06/25 20:33:26 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/quomod,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/quomod,v $
## ##
## Under source code control: 1995/05/07 03:17:03 ## Under source code control: 1995/05/07 03:17:03

View File

@@ -14,6 +14,9 @@ DESCRIPTION
the elements have been randomly permuted. The value of x is not the elements have been randomly permuted. The value of x is not
changed. changed.
This function uses the rand() subtractive 100 shuffle pseudo-random
number generator.
EXAMPLE EXAMPLE
; A = list(1,2,2,3,4) ; A = list(1,2,2,3,4)
; randperm(A) ; randperm(A)
@@ -41,9 +44,9 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
XXX - fill in comp, fact, rand, perm
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -59,8 +62,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: randperm,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: randperm,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/randperm,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/randperm,v $
## ##
## Under source code control: 1995/07/10 02:09:31 ## Under source code control: 1995/07/10 02:09:31

View File

@@ -47,9 +47,10 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
append, delete, insert, islist, list, push, pop, rsearch, search, size append, delete, insert, islist, pop, push, rsearch, search,
select, size
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -65,8 +66,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: remove,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: remove,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/remove,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/remove,v $
## ##
## Under source code control: 1996/03/12 23:10:01 ## Under source code control: 1996/03/12 23:10:01

View File

@@ -23,16 +23,16 @@ EXAMPLE
1 1
LIMITS LIMITS
none - XXX - is this correct? The number of arguments is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
none - XXX - is this correct? int rewindid(FILEID id);
SEE ALSO SEE ALSO
errno, fclose, feof, ferror, fflush, fgetc, fgetline, fgets, files, fopen, errno, fclose, feof, ferror, fflush, fgetc, fgetline, fgets, files, fopen,
fprintf, fputc, fputs, fseek, fsize, ftell, isfile, printf, prompt fprintf, fputc, fputs, fseek, fsize, ftell, isfile, printf, prompt
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -48,8 +48,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: rewind,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: rewind,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/rewind,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/rewind,v $
## ##
## Under source code control: 1996/04/30 03:05:18 ## Under source code control: 1996/04/30 03:05:18

View File

@@ -104,9 +104,12 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
assoc, list, mat, search append, delete, insert, islist, pop, push, remove, search,
select, size,
## Copyright (C) 1999 Landon Curt Noll assoc, list, mat
## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -122,8 +125,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: rsearch,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: rsearch,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/rsearch,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/rsearch,v $
## ##
## Under source code control: 1994/03/19 03:13:21 ## Under source code control: 1994/03/19 03:13:21

View File

@@ -11,10 +11,10 @@ DESCRIPTION
Returns the current user mode cpu runtime in seconds. Returns the current user mode cpu runtime in seconds.
EXAMPLE EXAMPLE
The result for this example will depend on the speed and number of The result for this example will depend on the speed and number of
of clock-ticks per second for the computer being used. of clock-ticks per second for the computer being used. The result
The result is a multiple of 1/CLK_TCK, where CLK_TCK is is a multiple of 1/CLK_TCK, where CLK_TCK is usually 60, 100, or 1000.
usually 60. The following is for a XXX machine.
; t = runtime(); ; t = runtime();
; pi = pi(1e-1000); ; pi = pi(1e-1000);
@@ -46,8 +46,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.4 $ ## @(#) $Revision: 29.5 $
## @(#) $Id: runtime,v 29.4 2006/06/04 18:24:33 chongo Exp $ ## @(#) $Id: runtime,v 29.5 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/runtime,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/runtime,v $
## ##
## Under source code control: 1996/03/12 23:10:01 ## Under source code control: 1996/03/12 23:10:01

View File

@@ -35,9 +35,9 @@ LINK LIBRARY
MATRIX *matscale(MATRIX *x, long n) MATRIX *matscale(MATRIX *x, long n)
SEE ALSO SEE ALSO
XXX - fill in obj
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -53,8 +53,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.4 $ ## @(#) $Revision: 29.5 $
## @(#) $Id: scale,v 29.4 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: scale,v 29.5 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/scale,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/scale,v $
## ##
## Under source code control: 1995/12/18 12:34:58 ## Under source code control: 1995/12/18 12:34:58

View File

@@ -25,15 +25,15 @@ EXAMPLE
5 25 3+4i Error 3 5 25 3+4i Error 3
LIMITS LIMITS
none - XXX - is this correct? The number of arguments is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
none - XXX - is this correct? int scanfstr(char *str, char *fmt, int count, VALUE **vals);
SEE ALSO SEE ALSO
fscan, strscan, fscanf, strscanf, scanf, printf, fprintf fscan, strscan, fscanf, strscanf, scanf, printf, fprintf
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -49,8 +49,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: scan,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: scan,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/scan,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/scan,v $
## ##
## Under source code control: 1996/04/30 03:05:18 ## Under source code control: 1996/04/30 03:05:18

View File

@@ -22,15 +22,15 @@ EXAMPLE
"Alpha" "Alpha"
LIMITS LIMITS
none - XXX - is this correct? The number of arguments is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
none - XXX - is this correct? int scanfstr(char *str, char *fmt, int count, VALUE **vals);
SEE ALSO SEE ALSO
scan, strscan, fscanf, strscanf, scanf, printf, fprintf scan, strscan, fscanf, strscanf, scanf, printf, fprintf
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -46,8 +46,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: scanf,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: scanf,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/scanf,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/scanf,v $
## ##
## Under source code control: 1996/04/30 03:05:18 ## Under source code control: 1996/04/30 03:05:18

View File

@@ -120,10 +120,12 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
assoc, list, mat, rsearch append, delete, insert, islist, pop, push, remove, rsearch,
select, size,
assoc, list, mat
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -139,8 +141,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: search,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: search,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/search,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/search,v $
## ##
## Under source code control: 1994/03/19 03:13:21 ## Under source code control: 1994/03/19 03:13:21

View File

@@ -17,7 +17,6 @@ DESCRIPTION
The list x is not changed. The order of the returned list is The list x is not changed. The order of the returned list is
the same as in x. the same as in x.
EXAMPLE EXAMPLE
; define f(x) = x > 5 ; define f(x) = x > 5
; A = list(2,4,6,8,2,7) ; A = list(2,4,6,8,2,7)
@@ -35,9 +34,10 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
XXX - fill in append, delete, insert, islist, pop, push, remove, rsearch, search,
size
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -53,8 +53,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: select,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: select,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/select,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/select,v $
## ##
## Under source code control: 1995/07/10 02:09:31 ## Under source code control: 1995/07/10 02:09:31

View File

@@ -55,9 +55,9 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
list, mat, assoc, obj, sizeof, memsize list, mat, assoc, obj, sizeof, memsize
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -73,8 +73,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: size,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: size,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/size,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/size,v $
## ##
## Under source code control: 1994/03/19 03:13:22 ## Under source code control: 1994/03/19 03:13:22

View File

@@ -5,14 +5,15 @@ SYNOPSIS
ssq(x1, x2, ...) ssq(x1, x2, ...)
TYPES TYPES
x1, x2, ... any for which the required squaring and addition x1, x2, ... lists or values for which required operations are defined
operations are defined
return as determined by the operations on x1, x2, ... return as determined by the operations on x1, x2, ...
DESCRIPTION DESCRIPTION
Returns the value of x1^2 + x2^2 + ... Null values are ignored; ssq() returns the null value.
If no argument is a list, returns x1^2 + x2^2 + ...
If an argument = list(t1, t2, ...) it contributes ssq(t1, t2, ...)
to the result.
EXAMPLE EXAMPLE
; print ssq(1,2,3), ssq(1+2i, 3-4i, 5 +6i) ; print ssq(1,2,3), ssq(1+2i, 3-4i, 5 +6i)
14 -21+40i 14 -21+40i
@@ -26,16 +27,24 @@ EXAMPLE
[1,0] = 286 [1,0] = 286
[1,1] = 352 [1,1] = 352
; ssq(list(2,3,5),7)
87
; ssq(1,2,3,4,5,6,7,8)
204
; ssq(1,2, list(3,4,list(5,6)), list(), 7, 8)
204
LIMITS LIMITS
The number of arguments is not to exceed 100. The number of arguments is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
none none
SEE ALSO SEE ALSO
XXX - fill in sum, max, min
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -51,8 +60,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.5 $
## @(#) $Id: ssq,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: ssq,v 29.5 2006/06/23 00:10:20 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ssq,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ssq,v $
## ##
## Under source code control: 1995/10/25 04:03:46 ## Under source code control: 1995/10/25 04:03:46

View File

@@ -47,7 +47,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
base, base2, config base, base2, config
## Copyright (C) 1999-2002 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -63,8 +63,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.4 $ ## @(#) $Revision: 29.5 $
## @(#) $Id: str,v 29.4 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: str,v 29.5 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/str,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/str,v $
## ##
## Under source code control: 1995/10/05 04:52:27 ## Under source code control: 1995/10/05 04:52:27

View File

@@ -1,5 +1,5 @@
NAME NAME
strcat - concatenate strings strcat - concatenate null-terminated strings
SYNOPSIS SYNOPSIS
strcat(x1, x2, ...) strcat(x1, x2, ...)
@@ -11,9 +11,16 @@ TYPES
DESCRIPTION DESCRIPTION
strcat(x1, x2, ...) forms a string starting with a copy of strcat(x1, x2, ...) forms a string starting with a copy of
x1, followed by the characters in order of x2, etc. The x1 before the first, if any, null character in x1, followed by the
initial non-null characters of any later arguments x2, ... The
length of the resulting string will be the sum of the lengths length of the resulting string will be the sum of the lengths
of the component strings. of the component strings considered as null-terminated strings (i.e.
the lengths as returned by strlen()). The sum function may be used
to concatenate strings where '\0' is to be considered as an ordinary
character, either by sum(x1, x2, ...) or sum(list(x1, x2, ...));
in this case, the size of the resulting string is the sum of the
sizes of the component strings.
EXAMPLE EXAMPLE
; A = "abc"; B = "XY"; C = " "; ; A = "abc"; B = "XY"; C = " ";
@@ -21,15 +28,16 @@ EXAMPLE
abcXY XYabc abcXY XYabc
LIMITS LIMITS
The number of arguments may not to exceed 100. The number of arguments may not to exceed 1024.
LINK LIBRARY LINK LIBRARY
none none
SEE ALSO SEE ALSO
XXX - fill in strcmp, strcpy, strerror, strlen, strncmp, strncpy, strpos,
strprintf, strscan, strscanf, substr
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -45,8 +53,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.5 $
## @(#) $Id: strcat,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: strcat,v 29.5 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strcat,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strcat,v $
## ##
## Under source code control: 1995/10/05 04:52:27 ## Under source code control: 1995/10/05 04:52:27

View File

@@ -29,7 +29,6 @@ EXAMPLE
strcmp("abc\0", "abc") == 1 strcmp("abc\0", "abc") == 1
strcmp("a\0b", "a\0c") == -1 strcmp("a\0b", "a\0c") == -1
LIMITS LIMITS
none none
@@ -37,4 +36,31 @@ LINK LIBRARY
FLAG stringrel(STRING *s1, STRING *s2) FLAG stringrel(STRING *s1, STRING *s2)
SEE ALSO SEE ALSO
strncmp strcat, strcpy, strerror, strlen, strncmp, strncpy, strpos,
strprintf, strscan, strscanf, substr
## Copyright (C) 2006 Ernest Bowen
##
## 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
## as published by the Free Software Foundation.
##
## Calc is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
## Public License for more details.
##
## A copy of version 2.1 of the GNU Lesser General Public License is
## distributed with calc under the filename COPYING-LGPL. You should have
## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
##
## @(#) $Revision: 25.2 $
## @(#) $Id: strcmp,v 25.2 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strcmp,v $
##
## Under source code control: 2006/03/03 03:32:44
## File existed as early as: 2006
##
## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/

View File

@@ -38,4 +38,31 @@ LINK LIBRARY
STRING* stringcpy(STRING *s1, STRING *s2) STRING* stringcpy(STRING *s1, STRING *s2)
SEE ALSO SEE ALSO
strncpy strcat, strcpy, strerror, strlen, strncmp, strncpy, strpos,
strprintf, strscan, strscanf, substr
## Copyright (C) 2006 Ernest Bowen
##
## 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
## as published by the Free Software Foundation.
##
## Calc is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
## Public License for more details.
##
## A copy of version 2.1 of the GNU Lesser General Public License is
## distributed with calc under the filename COPYING-LGPL. You should have
## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
##
## @(#) $Revision: 25.2 $
## @(#) $Id: strcpy,v 25.2 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strcpy,v $
##
## Under source code control: 2006/03/03 03:32:44
## File existed as early as: 2006
##
## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/

View File

@@ -49,6 +49,9 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
strcat, strcpy, strlen, strncmp, strncpy, strpos,
strprintf, strscan, strscanf, substr,
errcount, errmax, error, iserror, errno, newerror, errorcodes, errcount, errmax, error, iserror, errno, newerror, errorcodes,
stoponerror stoponerror
@@ -68,8 +71,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.4 $ ## @(#) $Revision: 29.5 $
## @(#) $Id: strerror,v 29.4 2006/05/21 07:31:46 chongo Exp $ ## @(#) $Id: strerror,v 29.5 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strerror,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strerror,v $
## ##
## Under source code control: 1996/04/30 03:05:18 ## Under source code control: 1996/04/30 03:05:18

View File

@@ -23,9 +23,10 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
XXX - fill in strcat, strcpy, strerror, strncmp, strncpy, strpos,
strprintf, strscan, strscanf, substr
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Ernest Bowen
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -41,8 +42,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: strlen,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: strlen,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strlen,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strlen,v $
## ##
## Under source code control: 1995/10/05 04:52:27 ## Under source code control: 1995/10/05 04:52:27

View File

@@ -41,4 +41,31 @@ LINK LIBRARY
temporarily replacing the string sizes by min(n1,n) and min(n2,n). temporarily replacing the string sizes by min(n1,n) and min(n2,n).
SEE ALSO SEE ALSO
strcmp strcat, strcpy, strerror, strlen, strncpy, strpos,
strprintf, strscan, strscanf, substr
## Copyright (C) 2006 Ernest Bowen
##
## 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
## as published by the Free Software Foundation.
##
## Calc is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
## Public License for more details.
##
## A copy of version 2.1 of the GNU Lesser General Public License is
## distributed with calc under the filename COPYING-LGPL. You should have
## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
##
## @(#) $Revision: 25.2 $
## @(#) $Id: strncmp,v 25.2 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strncmp,v $
##
## Under source code control: 2006/03/03 03:32:44
## File existed as early as: 2006
##
## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/

View File

@@ -36,4 +36,31 @@ LINK LIBRARY
STRING* stringncpy(STRING *s1, STRING *s2, long num) STRING* stringncpy(STRING *s1, STRING *s2, long num)
SEE ALSO SEE ALSO
strcpy strcat, strcpy, strerror, strlen, strncmp, strpos,
strprintf, strscan, strscanf, substr
## Copyright (C) 2006 Ernest Bowen
##
## 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
## as published by the Free Software Foundation.
##
## Calc is distributed in the hope that it will be useful, but WITHOUT
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
## Public License for more details.
##
## A copy of version 2.1 of the GNU Lesser General Public License is
## distributed with calc under the filename COPYING-LGPL. You should have
## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
##
## @(#) $Revision: 25.2 $
## @(#) $Id: strncpy,v 25.2 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strncpy,v $
##
## Under source code control: 2006/03/03 03:32:44
## File existed as early as: 2006
##
## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/

View File

@@ -29,7 +29,6 @@ EXAMPLE
; strpos("abcdefg", "xyz") ; strpos("abcdefg", "xyz")
0 0
LIMITS LIMITS
none none
@@ -37,9 +36,10 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
XXX - fill in strcat, strcpy, strerror, strlen, strncmp, strncpy,
strprintf, strscan, strscanf, substr
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Ernest Bowen
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -55,8 +55,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: strpos,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: strpos,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strpos,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strpos,v $
## ##
## Under source code control: 1995/07/09 03:48:57 ## Under source code control: 1995/07/09 03:48:57

View File

@@ -28,15 +28,18 @@ EXAMPLE
" "
LIMITS LIMITS
The number of arguments of strprintf() is not to exceed 100. The number of arguments of strprintf() is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
none none
SEE ALSO SEE ALSO
strcat, strcpy, strerror, strlen, strncmp, strncpy, strpos,
strscan, strscanf, substr,
printf, fprintf, print printf, fprintf, print
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -52,8 +55,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.5 $
## @(#) $Id: strprintf,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: strprintf,v 29.5 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strprintf,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strprintf,v $
## ##
## Under source code control: 1996/03/12 22:50:41 ## Under source code control: 1996/03/12 22:50:41

View File

@@ -27,15 +27,16 @@ EXAMPLE
5 25 5 25
LIMITS LIMITS
none - XXX - is this correct? The number of arguments is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
none - XXX - is this correct? none
SEE ALSO SEE ALSO
scan, fscan, fscanf, strscanf, scanf, printf, fprintf strcat, strcpy, strerror, strlen, strncmp, strncpy, strpos,
strprintf, strscanf, substr
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Ernest Bowen
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -51,8 +52,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: strscan,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: strscan,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strscan,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strscan,v $
## ##
## Under source code control: 1996/04/30 03:05:18 ## Under source code control: 1996/04/30 03:05:18

View File

@@ -106,15 +106,16 @@ EXAMPLE
; alpha ; alpha
LIMITS LIMITS
none - XXX - is this correct? The number of arguments is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
none - XXX - is this correct? int fscanfid(FILEID id, char *fmt, int count, VALUE **vals);
SEE ALSO SEE ALSO
fscanf, scanf, fscan, strscan, scan, print, printf strcat, strcpy, strerror, strlen, strncmp, strncpy, strpos,
strprintf, strscan, substr
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Ernest Bowen
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -130,8 +131,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: strscanf,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: strscanf,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strscanf,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strscanf,v $
## ##
## Under source code control: 1996/04/30 03:05:18 ## Under source code control: 1996/04/30 03:05:18

View File

@@ -35,9 +35,10 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
XXX - fill in strcat, strcpy, strerror, strlen, strncmp, strncpy, strpos,
strprintf, strscan, strscanf
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Ernest Bowen
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -53,8 +54,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: substr,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: substr,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/substr,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/substr,v $
## ##
## Under source code control: 1995/10/05 04:52:27 ## Under source code control: 1995/10/05 04:52:27

View File

@@ -51,15 +51,14 @@ EXAMPLE
5 5
LIMITS LIMITS
The number of arguments is not to exceed 100. The number of arguments is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
NUMBER *qmin(NUMBER *x1, NUMBER *x2)
SEE ALSO SEE ALSO
max, obj max, min, obj, ssq
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -75,8 +74,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: sum,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: sum,v 29.4 2006/06/22 23:49:22 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/sum,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/sum,v $
## ##
## Under source code control: 1997/03/10 03:59:59 ## Under source code control: 1997/03/10 03:59:59

View File

@@ -23,7 +23,6 @@ DESCRIPTION
will determine if the shell is executable. If the shell is executable, will determine if the shell is executable. If the shell is executable,
0 is returned otherwise non-zero is returned. 0 is returned otherwise non-zero is returned.
EXAMPLE EXAMPLE
; system("") ; system("")
0 0
@@ -42,9 +41,9 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
XXX - fill in cmdbuf, argv
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -60,8 +59,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: system,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: system,v 29.4 2006/06/25 22:16:55 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/system,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/system,v $
## ##
## Under source code control: 1995/07/09 03:48:57 ## Under source code control: 1995/07/09 03:48:57

View File

@@ -139,6 +139,7 @@ Variable declarations
arguments as addresses, there is no gain in using the backquote when arguments as addresses, there is no gain in using the backquote when
calling these functions. calling these functions.
XXX - this file needs to be updated to be in sync with calc source code.
## Copyright (C) 1999-2006 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
@@ -156,8 +157,8 @@ Variable declarations
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: variable,v 29.3 2006/06/11 07:50:48 chongo Exp $ ## @(#) $Id: variable,v 29.4 2006/06/25 23:07:08 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/variable,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/variable,v $
## ##
## Under source code control: 1991/07/21 04:37:25 ## Under source code control: 1991/07/21 04:37:25

View File

@@ -30,15 +30,15 @@ EXAMPLE
2 10 2 10
LIMITS LIMITS
The number of arguments is not to exceed 100. The number of arguments is not to exceed 1024.
LINK LIBRARY LINK LIBRARY
NUMBER *qxor(NUMBER *x1, NUMBER *x2) NUMBER *qxor(NUMBER *x1, NUMBER *x2)
SEE ALSO SEE ALSO
XXX - fill in operator
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999-2006 Landon Curt Noll
## ##
## Calc is open software; you can redistribute it and/or modify it under ## 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 ## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -54,8 +54,8 @@ SEE ALSO
## received a copy with calc; if not, write to Free Software Foundation, Inc. ## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
## ##
## @(#) $Revision: 29.3 $ ## @(#) $Revision: 29.4 $
## @(#) $Id: xor,v 29.3 2006/05/07 07:25:46 chongo Exp $ ## @(#) $Id: xor,v 29.4 2006/06/22 23:49:22 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/xor,v $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/xor,v $
## ##
## Under source code control: 1995/10/05 04:52:27 ## Under source code control: 1995/10/05 04:52:27

Some files were not shown because too many files have changed in this diff Show More