mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
convert ASCII TABs to ASCII SPACEs
Converted all ASCII tabs to ASCII spaces using a 8 character tab stop, for all files, except for all Makefiles (plus rpm.mk). The `git diff -w` reports no changes.
This commit is contained in:
48
help/digit
48
help/digit
@@ -5,11 +5,11 @@ SYNOPSIS
|
||||
digit(x, n [, b])
|
||||
|
||||
TYPES
|
||||
x real
|
||||
n integer
|
||||
b integer >= 2, default = 10
|
||||
x real
|
||||
n integer
|
||||
b integer >= 2, default = 10
|
||||
|
||||
return integer
|
||||
return integer
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
@@ -28,11 +28,11 @@ DESCRIPTION
|
||||
left of the "decimal" point; the digit d_n at position n contributes
|
||||
additively d_n * b^n to the value of x. For example,
|
||||
|
||||
; d_2 d_1 d_0 . d_-1 d_-2
|
||||
; d_2 d_1 d_0 . d_-1 d_-2
|
||||
|
||||
represents the number
|
||||
|
||||
; d_2 * b^2 + d_1 * b + d0 + d_-1 * b^-1 + d_-2 * b^-2
|
||||
; d_2 * b^2 + d_1 * b + d0 + d_-1 * b^-1 + d_-2 * b^-2
|
||||
|
||||
The sequence of digits has to be infinite if den(x) has a prime factor
|
||||
which is not a factor of the base b. In cases where the representation
|
||||
@@ -53,30 +53,30 @@ DESCRIPTION
|
||||
With base-b digits for x as explained above, the integer whose base-b
|
||||
representation is
|
||||
|
||||
; b_n+k-1 b_n_k-2 ... b_n,
|
||||
; b_n+k-1 b_n_k-2 ... b_n,
|
||||
|
||||
i.e. the k digits with last digit b_n, is given by
|
||||
|
||||
; digit(b^-r * x, q, b^k)
|
||||
; digit(b^-r * x, q, b^k)
|
||||
|
||||
if r and q satisfy n = q * b + r.
|
||||
|
||||
EXAMPLE
|
||||
; a = 123456.789
|
||||
; for (n = 6; n >= -6; n++) print digit(a, n),; print
|
||||
0 1 2 3 4 5 6 7 8 9 0 0 0
|
||||
; a = 123456.789
|
||||
; for (n = 6; n >= -6; n++) print digit(a, n),; print
|
||||
0 1 2 3 4 5 6 7 8 9 0 0 0
|
||||
|
||||
; for (n = 6; n >= -6; n--) print digit(a, n, 100),; print
|
||||
0 0 0 0 12 34 56 78 90 0 0 0 0
|
||||
; for (n = 6; n >= -6; n--) print digit(a, n, 100),; print
|
||||
0 0 0 0 12 34 56 78 90 0 0 0 0
|
||||
|
||||
; for (n = 6; n >= -6; n--) print digit(a, n, 256),; print
|
||||
0 0 0 0 1 226 64 201 251 231 108 139 67
|
||||
; for (n = 6; n >= -6; n--) print digit(a, n, 256),; print
|
||||
0 0 0 0 1 226 64 201 251 231 108 139 67
|
||||
|
||||
; for (n = 1; n >= -12; n++) print digit(10/7, n),; print
|
||||
; 0 1 4 2 8 5 7 1 4 2 8 5 7 1
|
||||
; for (n = 1; n >= -12; n++) print digit(10/7, n),; print
|
||||
; 0 1 4 2 8 5 7 1 4 2 8 5 7 1
|
||||
|
||||
; print digit(10/7, -7e1000, 1e6)
|
||||
428571
|
||||
; print digit(10/7, -7e1000, 1e6)
|
||||
428571
|
||||
|
||||
LIMITS
|
||||
|
||||
@@ -99,7 +99,7 @@ SEE ALSO
|
||||
##
|
||||
## 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
|
||||
## 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
|
||||
@@ -107,8 +107,8 @@ SEE ALSO
|
||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
##
|
||||
## Under source code control: 1995/10/03 10:40:01
|
||||
## File existed as early as: 1995
|
||||
## Under source code control: 1995/10/03 10:40:01
|
||||
## File existed as early as: 1995
|
||||
##
|
||||
## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
|
||||
## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|
||||
## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
|
||||
## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
|
||||
|
Reference in New Issue
Block a user