Release calc version 2.11.7

This commit is contained in:
Landon Curt Noll
2003-02-28 15:27:09 -08:00
parent 8db4e7af47
commit e1a3dfda0b
13 changed files with 507 additions and 206 deletions

View File

@@ -11,23 +11,38 @@ TYPES
return integer
DESCRIPTION
Returns the least non-negative integer n for which abs(x) < b^n.
Returns number of digits in the standard base-b representation
when x is truncated to an integer and the sign is ignored.
digits(x, b) = 0 if and only if abs(x) <= 1.
To be more precise: when abs(int(x)) > 0, this function returns
the value 1 + ilog(x, b). When abs(int(x)) == 0, then this
function returns the value 1.
For real x with absolute value > 1, digits(x, b) is the number
of digits in the standard base-b "decimal" representation of int(abs(x));
this is also given by 1 + ilog(x, b).
If omitted, b is assumed to be 10. If given, b must be an
integer > 1.
NOTE: both digits(0) and digits(1) return the value of 1.
This is not a bug, it is a feature of the above equation. :-)
One should remember these special cases:
digits(12.3456) == 2 computes with the integer part only
digits(-1234) == 4 computes with the absolute value only
digits(0) == 1 specical case
digits(-0.123) == 1 combination of all of the above
EXAMPLE
> print digits(0), digits(0.0123), digits(3.7), digits(-27), digits(-99.7)
0 0 1 2 2
> print digits(100), digits(23209), digits(2^72)
3 5 22
> print digits(0), digits(1), digits(-1)
1 1 1
> print digits(-1234), digits(12.3456), digits(107.207)
4 2 3
> print digits(17^463-1, 17), digits(10000, 100), digits(21701, 2)
3, 15 14
LIMITS
none
b > 1
LINK LIBRARY
long qdigits(NUMBER *q, ZVALUE base)
@@ -51,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.4 $
## @(#) $Id: digits,v 29.4 2003/01/14 04:09:35 chongo Exp $
## @(#) $Revision: 29.5 $
## @(#) $Id: digits,v 29.5 2003/01/26 19:41:35 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/digits,v $
##
## Under source code control: 1995/10/03 10:40:01

View File

@@ -16,6 +16,9 @@ DESCRIPTION
places(x,b) = 0 if and only if x is an integer.
If omitted, b is assumed to be 10. If given, b must be an
integer > 1.
places(x,b) = n > 0 if and only if the fractional part of abs(x)
has a finite base-b "decimal" representation with n digits of which
the last digit is nonzero. This occurs if and only if every prime
@@ -29,7 +32,7 @@ EXAMPLE
-1 3 1
LIMITS
none
b > 1
LINK LIBRARY
long qplaces(NUMBER *q, ZVALUE base)
@@ -37,7 +40,7 @@ LINK LIBRARY
SEE ALSO
digit, digits
## Copyright (C) 1999 Landon Curt Noll
## Copyright (C) 1999-2003 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
@@ -53,8 +56,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: places,v 29.4 2000/12/17 12:27:58 chongo Exp $
## @(#) $Revision: 29.5 $
## @(#) $Id: places,v 29.5 2003/01/26 19:43:45 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/places,v $
##
## Under source code control: 1995/10/03 10:40:02

View File

@@ -66,6 +66,8 @@ Very High priority items:
setting $LANG would allow calc to produce error messages
and text strings in that language.
* Consider using GNU autoconf / configure to build the calc Makefile.
=-=
High priority items:
@@ -83,8 +85,6 @@ High priority items:
* Perform a code coverage analysis of the 'make check' action
and improve the coverage (within reason) of the regress.cal suite.
* Create a Linux rpm (Red Hat Package Manager) package for calc.
* Address, if possible and reasonable, any Calc Mis-features
as noted in the BUGS file or as displayed by 'calc help bugs'.
@@ -122,9 +122,7 @@ Medium priority items:
* Add a builtin function to access the 64 bit FNV hash which
is currently being used internally in seed.c.
* Consider using configure to build the calc Makefile.
## Copyright (C) 1999 Landon Curt Noll
## Copyright (C) 1999-2003 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
@@ -140,8 +138,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.4 $
## @(#) $Id: todo,v 29.4 2002/07/10 17:30:28 chongo Exp $
## @(#) $Revision: 29.5 $
## @(#) $Id: todo,v 29.5 2003/02/25 20:26:17 chongo Exp $
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/todo,v $
##
## Under source code control: 1999/10/20 07:42:55