Release calc version 2.11.6

This commit is contained in:
Landon Curt Noll
2003-02-25 12:07:57 -08:00
parent 383290a844
commit b60eec99bb
30 changed files with 463 additions and 117 deletions

View File

@@ -2,7 +2,7 @@
#
# help - makefile for calc help files
#
# Copyright (C) 1999 Landon Curt Noll
# Copyright (C) 1999-2002 Landon Curt Noll
#
# Calc is open software; you can redistribute it and/or modify it under
# the terms of the version 2.1 of the GNU Lesser General Public License
@@ -18,8 +18,8 @@
# 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.20 $
# @(#) $Id: Makefile,v 29.20 2002/03/14 00:28:28 chongo Exp $
# @(#) $Revision: 29.22 $
# @(#) $Id: Makefile,v 29.22 2002/12/29 08:43:37 chongo Exp $
# @(#) $Source: /usr/local/src/cmd/calc/help/RCS/Makefile,v $
#
# Under source code control: 1991/07/23 06:47:57
@@ -246,11 +246,11 @@ BLT_HELP_FILES= ${BLT_HELP_FILES_3} ${BLT_HELP_FILES_5} \
# This list is prodiced by the detaillist rule when no WARNINGS are detected.
#
DETAIL_HELP= abs access acos acosh acot acoth acsc acsch address agd append \
appr arg argv arrow asec asech asin asinh assign atan atan2 atanh avg \
base bernoulli bit blk blkcpy blkfree blocks bround btrunc calc_tty \
calclevel catalan ceil cfappr cfsim char cmdbuf cmp comb conj cos \
cosh cot coth count cp csc csch ctime delete den dereference det \
digit digits dp epsilon errcount errmax errno error euler eval \
appr arg argv arrow asec asech asin asinh assign atan atan2 atanh \
avg base base2 bernoulli bit blk blkcpy blkfree blocks bround btrunc \
calc_tty calclevel catalan ceil cfappr cfsim char cmdbuf cmp comb \
conj cos cosh cot coth count cp csc csch ctime delete den dereference \
det digit digits dp epsilon errcount errmax errno error euler eval \
exp fact factor fclose fcnt feof ferror fflush fgetc fgetfield \
fgetline fgets fgetstr fib files floor fopen forall fprintf fputc \
fputs fputstr frac free freebernoulli freeeuler freeglobals freeredc \

View File

@@ -23,7 +23,7 @@ DESCRIPTION
0 <= i < sizeof(B). &B[i] then returns the address at which this
octet is located until the block is freed or relocated. Freeing
of an unnamed block B occurs when a new value is assigned to B or
when B ceases to exist; a named block B is freed by blkfree(B().
when B ceases to exist; a named block B is freed by blkfree(B).
A block is relocated when an operation like copying to B requires
a change of sizeof(B).
@@ -70,18 +70,18 @@ DESCRIPTION
> p = &"abc"
> A = "abc"
The address &*A of the value of A will be equal to p.
the address &*A of the value of A will be equal to p.
Except in cases like strcat(A, "") when *A identified with a literal
string as above, definitions of string values using strcat() or substr()
will copy the relevant strings to newly allocated addresses which will
be useable only while the variables retain these defined values.
For example,
For example, after
> B = C = strcat("a", "bc");
&*B and &*C will be different. If p is defined by p = &*B, p should
not be used after a mew value is assigned to B, or B ceases to exist,
not be used after a new value is assigned to B, or B ceases to exist,
etc.
When compilation of a function encounters for the first time a particular
@@ -117,7 +117,7 @@ DESCRIPTION
> A = B = C = f(2);
which, not only performs the addition n f() only once, but stores the
which, not only performs the addition in f() only once, but stores the
number values for A, B and C at the same address.
Whether a value V is a pointer and if so, its type, is indicated by the
@@ -176,8 +176,8 @@ SEE ALSO
## 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.2 $
## @(#) $Id: address,v 29.2 2000/06/07 14:02:33 chongo Exp $
## @(#) $Revision: 29.3 $
## @(#) $Id: address,v 29.3 2002/07/10 11:47:04 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/address,v $
##
## Under source code control: 1997/09/06 20:03:34

View File

@@ -13,7 +13,7 @@ TYPES
DESCRIPTION
p->X returns the same as (*p).X. Thus the current value of *p is
to be an object of a type for which X identifies one element.
p->X then returns the lvalue corresponding to that element of of the
p->X then returns the lvalue corresponding to that element of the
value of *p.
The expression *p.X will cause a runtime error since this is
@@ -66,8 +66,8 @@ SEE ALSO
## 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.2 $
## @(#) $Id: arrow,v 29.2 2000/06/07 14:02:33 chongo Exp $
## @(#) $Revision: 29.3 $
## @(#) $Id: arrow,v 29.3 2002/07/10 11:47:04 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/arrow,v $
##
## Under source code control: 1997/09/06 20:03:34

View File

@@ -14,7 +14,7 @@ DESCRIPTION
Returns the asin of x to a multiple of eps with error less in
absolute value than .75 * eps.
v = asin(x) is the number in [-p1/2, pi/2] for which sin(v) = x.
v = asin(x) is the number in [-pi/2, pi/2] for which sin(v) = x.
EXAMPLE
> print asin(.5, 1e-5), asin(.5, 1e-10), asin(.5, 1e-15), asin(.5, 1e-20)
@@ -45,8 +45,8 @@ SEE ALSO
## 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.2 $
## @(#) $Id: asin,v 29.2 2000/06/07 14:02:33 chongo Exp $
## @(#) $Revision: 29.3 $
## @(#) $Id: asin,v 29.3 2002/07/10 11:47:04 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/asin,v $
##
## Under source code control: 1994/03/19 01:40:24

View File

@@ -32,10 +32,9 @@ DESCRIPTION
may have different numbers (between 1 and 4 inclusive) of indices,
and these indices need not be integers in specified ranges.
Assignments of a null value
to an element of an association does not delete the element, but
a later reference to that element will return the null value as if
the element is undefined.
Assignment of a null value to an element of an association does not
delete the element, but a later reference to that element will return
the null value as if the element is undefined.
The elements of an association are stored in a hash table for
quick access. The index values are hashed to select the correct
@@ -99,8 +98,8 @@ SEE ALSO
## 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.2 $
## @(#) $Id: assoc,v 29.2 2000/06/07 14:02:33 chongo Exp $
## @(#) $Revision: 29.3 $
## @(#) $Id: assoc,v 29.3 2002/07/10 11:47:04 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/assoc,v $
##
## Under source code control: 1994/09/25 20:22:31

View File

@@ -14,7 +14,7 @@ DESCRIPTION
Returns the atan of x to a multiple of eps with error less in
absolute value than .75 * eps.
v = atan(x) is the number in (-p1/2, pi/2) for which tan(v) = x.
v = atan(x) is the number in (-pi/2, pi/2) for which tan(v) = x.
EXAMPLE
> print atan(2, 1e-5), atan(2, 1e-10), atan(2, 1e-15), atan(2, 1e-20)
@@ -45,8 +45,8 @@ SEE ALSO
## 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.2 $
## @(#) $Id: atan,v 29.2 2000/06/07 14:02:33 chongo Exp $
## @(#) $Revision: 29.3 $
## @(#) $Id: atan,v 29.3 2002/07/10 11:47:04 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/atan,v $
##
## Under source code control: 1994/03/19 01:40:25

View File

@@ -57,7 +57,7 @@ DESCRIPTION
base(1e20) base(2^64) base(2^8191-1)
However the base() function will only return one of the base values
lised in the table above.
listed in the table above.
EXAMPLE
> base()
@@ -79,7 +79,7 @@ LINK LIBRARY
MODE_REAL, MODE_EXP, MODE_HEX, MODE_OCTAL, MODE_BINARY
SEE ALSO
config
base2, config, str
## Copyright (C) 1999 Landon Curt Noll
##
@@ -97,8 +97,8 @@ SEE ALSO
## 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.2 $
## @(#) $Id: base,v 29.2 2000/06/07 14:02:33 chongo Exp $
## @(#) $Revision: 29.5 $
## @(#) $Id: base,v 29.5 2002/12/29 09:17:54 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/base,v $
##
## Under source code control: 1994/09/30 00:09:39

120
help/base2 Normal file
View File

@@ -0,0 +1,120 @@
NAME
base2 - set 2nd output base
SYNOPSIS
base2([mode])
TYPES
mode real
return real
DESCRIPTION
By default, calc will output values according to the default base
as controlled by the base() builtin function.
The base2() builtin function, if given a non-zero argument, enables
double base output mode. In double base output mode, calc values
are displayed twice, once according to base() and again according
to base2(). In double base output mode, the second time a value is
displayed, it is displayed within comments:
21701 /* 0x54c5 */
The arguments for base2() are identical to base() with the addition
of the 0 value:
base2 equivalent
config("mode2")'s
2 "binary" base 2 fractions
"bin"
8 "octal" base 8 fractions
"oct"
10 "real" base 10 floating point
"float"
"default"
-10 "integer" base 10 integers
"int"
16 "hexadecimal" base 16 fractions
"hex"
1/3 "fraction" base 10 fractions
"frac"
1e20 "scientific" base 10 scientific notation
"sci"
"exp"
0 "off" disable double base output
For convenience, any non-integer non-zero value is assumed to mean
base 10 fractions and any integer >= 2^64 is assumed to mean base 10
scientific notation.
These base2() calls have the same meaning as config("mode2", "fraction"):
base2(1/3) base2(0.1415) base2(16/37)
These base2() calls have the same meaning as config("mode2", "scientific"):
base2(1e20) base2(2^64) base2(2^8191-1)
However the base2() function will only return one of the base values
listed in the table above.
EXAMPLE
> base2()
0
> base2(8)
0 /* 0 */
> print 10
10 /* 012 */
> base2(16),
> 131072
131072 /* 0x20000 */
> 2345
2345 /* 0x929 */
LIMITS
none
LINK LIBRARY
int math_setmode2(int newmode)
NOTE: newmode must be one of MODE_DEFAULT, MODE_FRAC, MODE_INT,
MODE_REAL, MODE_EXP, MODE_HEX, MODE_OCTAL, MODE_BINARY,
MODE2_OFF
SEE ALSO
base, config, str
## Copyright (C) 2002 Landon Curt Noll
##
## Calc is open software; you can redistribute it and/or modify it under
## the terms of the version 2.1 of the GNU Lesser General Public License
## 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: 1.3 $
## @(#) $Id: base2,v 1.3 2002/12/29 09:17:54 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/base2,v $
##
## Under source code control: 2002/12/29 00:21:07
## File existed as early as: 2002
##
## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/

View File

@@ -15,7 +15,7 @@ DESCRIPTION
t/(exp(t) - 1) = Sum B_n * t^n/n!
bernouuli(n) is zero both for n < 0 and for n odd and > 2.
bernoulli(n) is zero both for n < 0 and for n odd and > 2.
When bernoulli(n) is computed for positive even n, the values for
n and smaller positive even indices are stored in a table so that
a later call to bernoulli(k) with 0 <= k < n will be executed quickly.
@@ -57,8 +57,8 @@ SEE ALSO
## 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.4 $
## @(#) $Id: bernoulli,v 29.4 2000/12/17 12:27:58 chongo Exp $
## @(#) $Revision: 29.5 $
## @(#) $Id: bernoulli,v 29.5 2002/07/10 11:47:04 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/bernoulli,v $
##
## Under source code control: 2000/07/13 01:33:00

View File

@@ -122,7 +122,7 @@ DESCRIPTION
Named blocks are assigned index numbers 0, 1, 2, ..., in the order
of their creation. The block with index id is returned by blocks(id).
With no argument, blocks() returns the number of current unfreed
named blocks. A named block may be used
named blocks.
The memory allocated to a named block is freed by the blkfree()
function with argument the named block, its name, or its id number.
@@ -234,8 +234,8 @@ SEE ALSO
## 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.2 $
## @(#) $Id: blk,v 29.2 2000/06/07 14:02:33 chongo Exp $
## @(#) $Revision: 29.3 $
## @(#) $Id: blk,v 29.3 2002/07/10 11:47:04 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/blk,v $
##
## Under source code control: 1997/04/05 13:07:13

View File

@@ -1,5 +1,5 @@
NAME
blocks - return a named file or number of unfreed named blocks
blocks - return a named block or number of unfreed named blocks
SYNOPSIS
blocks([id])
@@ -58,8 +58,8 @@ SEE ALSO
## 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.2 $
## @(#) $Id: blocks,v 29.2 2000/06/07 14:02:33 chongo Exp $
## @(#) $Revision: 29.3 $
## @(#) $Id: blocks,v 29.3 2002/07/10 11:47:04 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/blocks,v $
##
## Under source code control: 1997/04/05 13:07:13

View File

@@ -16,6 +16,7 @@ Configuration parameters
"epsilon" sets error value for transcendentals.
"maxprint" sets maximum number of elements printed.
"mode" sets printout mode.
"mode2" sets 2nd base printout mode.
"mul2" sets size for alternative multiply.
"sq2" sets size for alternative squaring.
"pow2" sets size for alternate powering.
@@ -184,6 +185,7 @@ Detailed config descriptions
=-=
config("mode", "mode_string")
config("mode2", "mode_string")
The "mode" parameter is a string specifying the mode for printing of
numbers by the unformatted print functions, and the default
@@ -219,7 +221,17 @@ Detailed config descriptions
Where multiple strings are given, the first string listed is what
config("mode") will return.
The default "mode" is "real".
The "mode2" controls the double base output. When set to a value
other than "off", calc outputs files in both the "base" mode as
well as the "base2" mode. The "mode2" value may be any of the
"mode" values with the addition of:
"off" disable 2nd base output mode base2(0)
The base() builtin function sets and returns the "mode" value.
The base2() builtin function sets and returns the "mode2" value.
The default "mode" is "real". The default "mode2" is "off".
=-=
@@ -713,8 +725,8 @@ Detailed config descriptions
## 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.6 $
## @(#) $Id: config,v 29.6 2001/04/25 07:17:38 chongo Exp $
## @(#) $Revision: 29.7 $
## @(#) $Id: config,v 29.7 2002/12/29 08:32:04 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/config,v $
##
## Under source code control: 1991/07/21 04:37:17

View File

@@ -18,7 +18,7 @@ DESCRIPTION
For real or complex x, str(x) returns the string representing x
in the current printing mode; configuration parameters affecting
this are "mode", "display", "outround", "tilde", "leadzero",
this are "mode", "mode2", "display", "outround", "tilde", "leadzero",
EXAMPLE
> str("")
@@ -28,6 +28,10 @@ EXAMPLE
> print str(123), str("+"), str(4i), str("is the same as"), str(123+4i)
123 + 4i is the same as 3+4i
> base2(16),
> print str(23209)
23209 /* 0x5aa9 */
LIMITS
none
@@ -41,9 +45,9 @@ LINK LIBRARY
char *math_getdivertedio();
SEE ALSO
XXX - fill in
base, base2, config
## Copyright (C) 1999 Landon Curt Noll
## Copyright (C) 1999-2002 Landon Curt Noll
##
## Calc is open software; you can redistribute it and/or modify it under
## the terms of the version 2.1 of the GNU Lesser General Public License
@@ -59,8 +63,8 @@ SEE ALSO
## 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.2 $
## @(#) $Id: str,v 29.2 2000/06/07 14:02:33 chongo Exp $
## @(#) $Revision: 29.3 $
## @(#) $Id: str,v 29.3 2002/12/29 09:19:56 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/str,v $
##
## Under source code control: 1995/10/05 04:52:27

View File

@@ -59,6 +59,13 @@ Very High priority items:
* Fix any 'Known bugs' as noted in the BUGS file or as
displayed by 'calc help bugs'.
* Internationalize calc by converting calc error messages and
text strings (e.g., calc startup banner, show output, etc.)
into calls to the GNU gettext internationalization facility.
If somebody translated these strings into another language,
setting $LANG would allow calc to produce error messages
and text strings in that language.
=-=
High priority items:
@@ -133,8 +140,8 @@ Medium priority items:
## 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.2 $
## @(#) $Id: todo,v 29.2 2000/06/07 14:02:33 chongo Exp $
## @(#) $Revision: 29.4 $
## @(#) $Id: todo,v 29.4 2002/07/10 17:30:28 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/todo,v $
##
## Under source code control: 1999/10/20 07:42:55

View File

@@ -353,8 +353,8 @@ For more information use the following calc commands:
## 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.3 $
## @(#) $Id: usage,v 29.3 2000/06/07 14:02:33 chongo Exp chongo $
## @(#) $Revision: 29.4 $
## @(#) $Id: usage,v 29.4 2002/07/10 11:47:04 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/usage,v $
##
## Under source code control: 1991/07/21 04:37:25