Improve help files

Minor improvement of various help files.  Made format of help
files more consistent.
This commit is contained in:
Landon Curt Noll
2021-12-05 23:02:12 -08:00
parent de47c960d3
commit a28edba4e9
91 changed files with 284 additions and 275 deletions

View File

@@ -4,6 +4,9 @@ The following are the changes from calc version 2.14.0.11 to date:
Drop support for SunOS, IRIX and MINGW32_NT-5.0 targets. Drop support for SunOS, IRIX and MINGW32_NT-5.0 targets.
Minor improvement of various help files. Made format of help
files more consistent.
The following are the changes from calc version 2.14.0.9 to 2.14.0.10: The following are the changes from calc version 2.14.0.9 to 2.14.0.10:

View File

@@ -6,8 +6,8 @@ SYNOPSIS
TYPES TYPES
If x is an object of type xx, the function xx_abs has to have If x is an object of type xx, the function xx_abs has to have
been defined; this will determine the types for x, eps and been defined; this will determine the types for x, eps and
the returned value. the returned value.
For non-object x and eps: For non-object x and eps:
@@ -44,7 +44,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
cmp, epsilon, hypot, norm, near, obj cmp, epsilon, hypot, norm, near, obj
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -20,8 +20,8 @@ DESCRIPTION
'w' or bit 1 for writing, 'x' or bit 0 for execution. 'w' or bit 1 for writing, 'x' or bit 0 for execution.
EXAMPLE EXAMPLE
The system error-numbers and messages may differ for different ; ## The system error-numbers and messages may differ
implementations ; ## for different implementations
; !rm -f junk ; !rm -f junk
; access("junk") ; access("junk")
@@ -48,7 +48,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
fopen, fclose, isfile, files fopen, fclose, isfile, files
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -18,7 +18,7 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print acot(2, 1e-5), acot(2, 1e-10), acot(2, 1e-15), acot(2, 1e-20) ; print acot(2, 1e-5), acot(2, 1e-10), acot(2, 1e-15), acot(2, 1e-20)
.46365 .463647609 .463647609000806 .46364760900080611621 0.46365 0.463647609 0.463647609000806 0.46364760900080611621
LIMITS LIMITS
none none
@@ -29,7 +29,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
asin, acos, atan, asec, acsc, epsilon asin, acos, atan, asec, acsc, epsilon
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -20,7 +20,7 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print acoth(2, 1e-5), acoth(2, 1e-10), acoth(2, 1e-15), acoth(2, 1e-20) ; print acoth(2, 1e-5), acoth(2, 1e-10), acoth(2, 1e-15), acoth(2, 1e-20)
.54931 .5493061443 .549306144334055 .5493061443340548457 0.54931 0.5493061443 0.549306144334055 0.5493061443340548457
LIMITS LIMITS
none none
@@ -31,7 +31,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
asinh, acosh, atanh, asech, acsch, epsilon asinh, acosh, atanh, asech, acsch, epsilon
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -18,7 +18,7 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print acsc(2, 1e-5), acsc(2, 1e-10), acsc(2, 1e-15), acsc(2, 1e-20) ; print acsc(2, 1e-5), acsc(2, 1e-10), acsc(2, 1e-15), acsc(2, 1e-20)
.5236 .5235987756 .523598775598299 .52359877559829887308 0.5236 0.5235987756 0.523598775598299 0.52359877559829887308
LIMITS LIMITS
none none
@@ -29,7 +29,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
asin, acos, atan, asec, acot, epsilon asin, acos, atan, asec, acot, epsilon
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -18,10 +18,9 @@ DESCRIPTION
acsch(x) = ln((1 + sqrt(1 + x^2))/x) acsch(x) = ln((1 + sqrt(1 + x^2))/x)
EXAMPLE EXAMPLE
; print acsch(2, 1e-5), acsch(2, 1e-10), acsch(2, 1e-15), acsch(2, 1e-20) ; print acsch(2, 1e-5), acsch(2, 1e-10), acsch(2, 1e-15), acsch(2, 1e-20)
.48121 .4812118251 .481211825059603 .4812118250596034475 0.48121 0.4812118251 0.481211825059603 0.4812118250596034475
LIMITS LIMITS
none none
@@ -32,7 +31,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
asinh, acosh, atanh, asech, acoth, epsilon asinh, acosh, atanh, asech, acoth, epsilon
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -33,7 +33,6 @@ DESCRIPTION
agd(z) = atanh(sin(x)/cosh(y)) + i * atan(sinh(y)/cos(x)> agd(z) = atanh(sin(x)/cosh(y)) + i * atan(sinh(y)/cos(x)>
EXAMPLE EXAMPLE
; print agd(1, 1e-5), agd(1, 1e-10), agd(1, 1e-15) ; print agd(1, 1e-5), agd(1, 1e-10), agd(1, 1e-15)
1.22619 1.2261911709 1.226191170883517 1.22619 1.2261911709 1.226191170883517
@@ -45,7 +44,7 @@ EXAMPLE
-1.93237 -1.9323667197 -1.932366719745925 -1.93237 -1.9323667197 -1.932366719745925
; print agd(1+2i, 1e-5), agd(1+2i, 1e-10) ; print agd(1+2i, 1e-5), agd(1+2i, 1e-10)
.22751+1.42291i .2275106584+1.4229114625i 0.22751+1.42291i 0.2275106584+1.4229114625i
LIMITS LIMITS
none none

View File

@@ -96,7 +96,7 @@ PROPERTIES
If y is nonzero, appr(x,y,8)/y = an odd integer n only if x = n * y. If y is nonzero, appr(x,y,8)/y = an odd integer n only if x = n * y.
EXAMPLES EXAMPLE
; print appr(-5.44,0.1,0), appr(5.44,0.1,0), appr(5.7,1,0), appr(-5.7,1,0) ; print appr(-5.44,0.1,0), appr(5.44,0.1,0), appr(5.7,1,0), appr(-5.7,1,0)
-5.5 5.4 5 -6 -5.5 5.4 5 -6
@@ -119,26 +119,26 @@ EXAMPLES
-5.5 5.5 5 -5 -5.5 5.5 5 -5
; print appr(-.44,0.1,11), appr(.44,0.1,11), appr(5.7,1,11), appr(-5.7,1,11) ; print appr(-.44,0.1,11), appr(.44,0.1,11), appr(5.7,1,11), appr(-5.7,1,11)
-.4 .5 5 -6 -0.4 0.5 5 -6
; print appr(-.44,-.1,11),appr(.44,-.1,11),appr(5.7,-1,11),appr(-5.7,-1,11) ; print appr(-.44,-.1,11),appr(.44,-.1,11),appr(5.7,-1,11),appr(-5.7,-1,11)
-.5 .4 6 -5 -0.5 0.4 6 -5
; print appr(-.44,0.1,12), appr(.44,0.1,12), appr(5.7,1,12), appr(-5.7,1,12) ; print appr(-.44,0.1,12), appr(.44,0.1,12), appr(5.7,1,12), appr(-5.7,1,12)
-.4 .5 5 -6 -0.4 0.5 5 -6
; print appr(-.44,-.1,12),appr(.44,-.1,12),appr(5.7,-1,12),appr(-5.7,-1,12) ; print appr(-.44,-.1,12),appr(.44,-.1,12),appr(5.7,-1,12),appr(-5.7,-1,12)
-.5 .4 6 -5 -0.5 0.4 6 -5
; print appr(-.44,0.1,15), appr(.44,0.1,15), appr(5.7,1,15), appr(-5.7,1,15) ; print appr(-.44,0.1,15), appr(.44,0.1,15), appr(5.7,1,15), appr(-5.7,1,15)
-.4 .5 5 -6 -0.4 0.5 5 -6
; print appr(-.44,-.1,15),appr(.44,-.1,15),appr(5.7,-1,15),appr(-5.7,-1,15) ; print appr(-.44,-.1,15),appr(.44,-.1,15),appr(5.7,-1,15),appr(-5.7,-1,15)
-.4 .5 5 -6 -0.4 0.5 5 -6
; x = sqrt(7-3i, 1e-20) ; x = sqrt(7-3i, 1e-20)
; print appr(x,1e-5,0), appr(x,1e-5,1), appr(x,1e-5,2), appr(x,1e-6,3) ; print appr(x,1e-5,0), appr(x,1e-5,1), appr(x,1e-5,2), appr(x,1e-6,3)
2.70331-.55488i 2.70332-.55487i 2.70331-.55487i 2.70332-.55488i 2.70331-0.55488i 2.70332-0.55487i 2.70331-0.55487i 2.70332-0.55488i
LIMITS LIMITS
none none
@@ -151,7 +151,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
round, bround, cfappr, cfsim round, bround, cfappr, cfsim
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -17,7 +17,7 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print arg(2), arg(2+3i, 1e-5), arg(2+3i, 1e-10), arg(2+3i, 1e-20) ; print arg(2), arg(2+3i, 1e-5), arg(2+3i, 1e-10), arg(2+3i, 1e-20)
0 .98279 .9827937232 .98279372324732906799 0 0.98279 0.9827937232 0.98279372324732906799
; pi = pi(1e-10); deg = pi/180; eps = deg/10000 ; pi = pi(1e-10); deg = pi/180; eps = deg/10000
; print arg(2+3i, eps)/deg, arg(-1 +1i, eps)/deg, arg(-1 - 1i,eps)/deg ; print arg(2+3i, eps)/deg, arg(-1 +1i, eps)/deg, arg(-1 - 1i,eps)/deg
@@ -32,7 +32,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
conj, im, polar, re conj, im, polar, re
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -22,24 +22,23 @@ DESCRIPTION
Spaces or tabs on either side of -> are optional. Spaces or tabs on either side of -> are optional.
EXAMPLES EXAMPLE
; obj pair {one, two} ; obj pair {one, two}
; obj pair A, B ; obj pair A; obj pair B
; p = &A ; p = &A
; p->one = 1; p->two = 2 ; p->one = 1; p->two = 2
; A ; A
obj pair {1, 2} obj pair {1, 2}
; A->two = &B ; A->two = &B
; p->two->one = 3; p->two->two = 4 ; p->one = 3; p->two = 4
; *p->ptwo ; *p
obj pair {3, 4} obj pair {3, 4}
; B = {5,6} ; B = {5,6}
; *p->two ; *p->two
obj pair {5, 6} 4
LIMITS LIMITS
none none
@@ -50,7 +49,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
address, dereference, isptr, dot address, dereference, isptr, dot
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -29,7 +29,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
asin, acos, atan, acsc, acot, epsilon asin, acos, atan, acsc, acot, epsilon
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -18,7 +18,7 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print asin(.5, 1e-5), asin(.5, 1e-10), asin(.5, 1e-15), asin(.5, 1e-20) ; print asin(.5, 1e-5), asin(.5, 1e-10), asin(.5, 1e-15), asin(.5, 1e-20)
.5236 .5235987756 .523598775598299 .52359877559829887308 0.5236 0.5235987756 0.523598775598299 0.52359877559829887308
LIMITS LIMITS
none none
@@ -29,7 +29,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
acos, atan, asec, acsc, acot, epsilon acos, atan, asec, acsc, acot, epsilon
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -74,7 +74,6 @@ DESCRIPTION
results in the value 3 being stored not only as the new value for A results in the value 3 being stored not only as the new value for A
but also at the now unnamed location earlier used for A[0]. but also at the now unnamed location earlier used for A[0].
EXAMPLE EXAMPLE
; b = 3+1 ; b = 3+1
; a = b ; a = b

View File

@@ -66,12 +66,12 @@ EXAMPLE
; A["zero"] = 0; A["one"] = 1; A["two"] = 2; A["three"] = 3; ; A["zero"] = 0; A["one"] = 1; A["two"] = 2; A["three"] = 3;
; A["smallest", "prime"] = 2; ; A["smallest", "prime"] = 2;
; print A ; print A
assoc (5 elements); assoc (5 elements);
["two"] = 2 ["two"] = 2
["three"] = 3 ["three"] = 3
["one"] = 1 ["one"] = 1
["zero"] = 0 ["zero"] = 0
["smallest","prime"] = 2 ["smallest","prime"] = 2
LIMITS LIMITS
none none
@@ -82,7 +82,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
isassoc, rsearch, search, size isassoc, rsearch, search, size
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -25,7 +25,7 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print atan2(0,0), atan2(1,sqrt(3)), atan2(17,53,1e-100) ; print atan2(0,0), atan2(1,sqrt(3)), atan2(17,53,1e-100)
0 ~.52359877559829887307 ~.31038740713235146535 0 ~0.52359877559829887307 ~0.31038740713235146535
LIMITS LIMITS
none none
@@ -36,7 +36,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
acos, asin, atan, cos, epsilon, sin, tan acos, asin, atan, cos, epsilon, sin, tan
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -20,7 +20,7 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print atanh(.5,1e-5), atanh(.5,1e-10), atanh(.5,1e-15), atanh(.5,1e-20) ; print atanh(.5,1e-5), atanh(.5,1e-10), atanh(.5,1e-15), atanh(.5,1e-20)
.54931 .5493061443 .549306144334055 .5493061443340548457 0.54931 0.5493061443 0.549306144334055 0.5493061443340548457
LIMITS LIMITS
none none
@@ -31,7 +31,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
asinh, acosh, asech, acsch, acoth, epsilon asinh, acosh, asech, acsch, acoth, epsilon
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -35,10 +35,10 @@ EXAMPLE
; avg(x,y) ; avg(x,y)
mat [2,2] (4 elements, 4 nonzero): mat [2,2] (4 elements, 4 nonzero):
[0,0] = 1 [0,0] = 1
[0,1] = 2 [0,1] = 2
[1,0] = 3.5 [1,0] = 3.5
[1,1] = 6 [1,1] = 6
LIMITS LIMITS
The number of arguments is not to exceed 1024. The number of arguments is not to exceed 1024.
@@ -49,7 +49,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
hmean hmean
## Copyright (C) 1999-2006 Landon Curt Noll ## Copyright (C) 1999-2006,2021 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

View File

@@ -106,7 +106,6 @@ DESCRIPTION
and dsi refer to the double-bracket method of indexing, i.e. the and dsi refer to the double-bracket method of indexing, i.e. the
matrix is as if its elements were indexed 0, 1, ..., size(M) - 1. matrix is as if its elements were indexed 0, 1, ..., size(M) - 1.
EXAMPLE EXAMPLE
; A = blk() = {1,2,3,4} ; A = blk() = {1,2,3,4}
; B = blk() ; B = blk()
@@ -190,7 +189,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
blk, mat, file, list, str blk, mat, file, list, str
## Copyright (C) 1999-2006 Landon Curt Noll ## Copyright (C) 1999-2006,2021 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

View File

@@ -19,7 +19,6 @@ DESCRIPTION
of their creation. of their creation.
EXAMPLE EXAMPLE
; A = blk("alpha") ; A = blk("alpha")
; B = blk("beta") = {1,2,3} ; B = blk("beta") = {1,2,3}
; blocks() ; blocks()
@@ -42,7 +41,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
blk, blkfree blk, blkfree
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -65,29 +65,29 @@ DESCRIPTION
changed by assignments; plcs and rnd are copied to temporary changed by assignments; plcs and rnd are copied to temporary
variables, so their values are not changed by the call. variables, so their values are not changed by the call.
EXAMPLES EXAMPLE
; a = 7/32, b = -7/32 ; a = 7/32, b = -7/32
; print a, b ; print a, b
.21875 -.21875 0.21875 -0.21875
; print round(a,3,0), round(a,3,1), round(a,3,2), print round(a,3,3) ; print round(a,3,0), round(a,3,1), round(a,3,2), print round(a,3,3)
.218, .219, .218, .219 0.218, 0.219, 0.218, 0.219
; print round(b,3,0), round(b,3,1), round(b,3,2), print round(b,3,3) ; print round(b,3,0), round(b,3,1), round(b,3,2), print round(b,3,3)
-.219, -.218, -.218, -.219 -0.219, -0.218, -0.218, -0.219
; print round(a,3,16), round(a,3,17), round(a,3,18), print round(a,3,19) ; print round(a,3,16), round(a,3,17), round(a,3,18), print round(a,3,19)
.2188 .2188 .2188 .2188 0.2188 0.2188 0.2188 0.2188
; print round(a,4,16), round(a,4,17), round(a,4,18), print round(a,4,19) ; print round(a,4,16), round(a,4,17), round(a,4,18), print round(a,4,19)
.2187 .2188 .2187 .2188 0.2187 0.2188 0.2187 0.2188
; print round(a,2,8), round(a,3,8), round(a,4,8), round(a,5,8) ; print round(a,2,8), round(a,3,8), round(a,4,8), round(a,5,8)
.22 .218 .2188 .21875 0.22 0.218 0.2188 0.21875
; print round(a,2,24), round(a,3,24), round(a,4,24), round(a,5,24) ; print round(a,2,24), round(a,3,24), round(a,4,24), round(a,5,24)
.22 .219 .2188 .21875 0.22 0.219 0.2188 0.21875
; c = 21875 ; c = 21875
; print round(c,-2,0), round(c,-2,1), round(c,-3,0), round(c,-3,16) ; print round(c,-2,0), round(c,-2,1), round(c,-3,0), round(c,-3,16)
@@ -100,13 +100,13 @@ EXAMPLES
; print round(A,2,24) ; print round(A,2,24)
list(7 elements, 7 nonzero): list(7 elements, 7 nonzero):
[[0]] = .12 [[0]] = 0.12
[[1]] = .25 [[1]] = 0.25
[[3]] = .38 [[3]] = 0.38
[[4]] = .5 [[4]] = 0.5
[[5]] = .62 [[5]] = 0.62
[[6]] = .75 [[6]] = 0.75
[[7]] = .88 [[7]] = 0.88
LIMITS LIMITS
For non-object case: For non-object case:
@@ -122,7 +122,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
round, trunc, btrunc, int, appr round, trunc, btrunc, int, appr
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -23,7 +23,10 @@ DESCRIPTION
depths. depths.
EXAMPLE EXAMPLE
n/a ; ## NOTE: Your current calculation level may vary:
; calclevel()
0
LIMITS LIMITS
none none
@@ -34,7 +37,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
eval, read, quit, abort, inputlevel eval, read, quit, abort, inputlevel
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -18,7 +18,10 @@ DESCRIPTION
information on CALCPATH. information on CALCPATH.
EXAMPLE EXAMPLE
n/a ; ## NOTE: Your current CALCPATH search path may vary:
; calcpath()
".:./cal:~/.cal:/usr/local/share/calc:/usr/local/share/calc/custom"
LIMITS LIMITS
none none
@@ -29,7 +32,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
environment, fpathopen environment, fpathopen
## Copyright (C) 2006 Landon Curt Noll ## Copyright (C) 2006,2021 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

View File

@@ -13,11 +13,12 @@ DESCRIPTION
this function will return an empty string. this function will return an empty string.
EXAMPLE EXAMPLE
% calc "print cmdbuf(); a = 3; print a^2;" # NOTE: The following is intended to a shell command line:
$ calc "print cmdbuf(); a = 3; print a^2;"
print cmdbuf(); a = 3; print a^2; print cmdbuf(); a = 3; print a^2;
9 9
%
LIMITS LIMITS
none none
@@ -28,7 +29,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
argv, system argv, system
## Copyright (C) 1999-2006 Landon Curt Noll ## Copyright (C) 1999-2006,2021 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

View File

@@ -45,7 +45,7 @@ DESCRIPTION
"round" sets rounding mode for round and bround "round" sets rounding mode for round and bround
"outround" sets rounding mode for printing of numbers "outround" sets rounding mode for printing of numbers
"leadzero" enables/disables printing of 0 as in 0.5 "leadzero" enables/disables printing of 0 as in 0.5
"fullzero" enables/disables padding zeros as in .5000 "fullzero" enables/disables padding zeros as in 0.5000
"maxscan" maximum number of scan errors before abort "maxscan" maximum number of scan errors before abort
"prompt" default interactive prompt "prompt" default interactive prompt
"more" default interactive multi-line input prompt "more" default interactive multi-line input prompt
@@ -883,7 +883,6 @@ DESCRIPTION
This config parameter is read-only and cannot be set. This config parameter is read-only and cannot be set.
EXAMPLE EXAMPLE
; current_cfg = config("all"); ; current_cfg = config("all");
; config("tilde", off),; ; config("tilde", off),;
@@ -962,7 +961,8 @@ EXAMPLE
*/ */
; config("tilde", 1),; ; config("tilde", 1),;
; /* NOTE: display has too few digits and epsilon is not small enough */ ; ## NOTE: display has too few digits and epsilon is not small enough
; config("display", 12),; /* or display(12),; */ ; config("display", 12),; /* or display(12),; */
; printf("%f\n", pi(1e-10)); ; printf("%f\n", pi(1e-10));
3.1415926536 3.1415926536
@@ -970,7 +970,8 @@ EXAMPLE
; printf("%f\n", pi()); ; printf("%f\n", pi());
3.1415926536 3.1415926536
; /* NOTE: display has too few digits yet epsilon is small enough */ ; ## NOTE: display has too few digits yet epsilon is small enough
; config("display", 12),; /* or display(12),; */ ; config("display", 12),; /* or display(12),; */
; printf("%f\n", pi(1e-72)); ; printf("%f\n", pi(1e-72));
~3.141592653590 ~3.141592653590
@@ -978,7 +979,8 @@ EXAMPLE
; printf("%f\n", pi()); ; printf("%f\n", pi());
~3.141592653590 ~3.141592653590
; /* NOTE: display has enough digits but epsilon is not small enough */ ; ## NOTE: display has enough digits but epsilon is not small enough
; config("display", 72),; /* or display(72),; */ ; config("display", 72),; /* or display(72),; */
; printf("%f\n", pi(1e-10)); ; printf("%f\n", pi(1e-10));
3.1415926536 3.1415926536
@@ -986,7 +988,8 @@ EXAMPLE
; printf("%f\n", pi()); ; printf("%f\n", pi());
3.1415926536 3.1415926536
/* NOTE: display has enough digits and epsilon is small enough */ ; ## NOTE: display has enough digits and epsilon is small enough
; config("display", 72),; /* or display(72),; */ ; config("display", 72),; /* or display(72),; */
; printf("%f\n", pi(1e-72)); ; printf("%f\n", pi(1e-72));
3.141592653589793238462643383279502884197169399375105820974944592307816406 3.141592653589793238462643383279502884197169399375105820974944592307816406
@@ -998,7 +1001,7 @@ LIMITS
none none
LINK LIBRARY LINK LIBRARY
n/a none
SEE ALSO SEE ALSO
custom, custom_cal, display, epsilon, fprintf, printf, strprintf, usage custom, custom_cal, display, epsilon, fprintf, printf, strprintf, usage

View File

@@ -16,14 +16,14 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print cos(1, 1e-5), cos(1, 1e-10), cos(1, 1e-15), cos(1, 1e-20) ; print cos(1, 1e-5), cos(1, 1e-10), cos(1, 1e-15), cos(1, 1e-20)
.5403 .5403023059 .54030230586814 .5403023058681397174 0.5403 0.5403023059 0.54030230586814 0.5403023058681397174
; print cos(2 + 3i, 1e-5), cos(2 + 3i, 1e-10) ; print cos(2 + 3i, 1e-5), cos(2 + 3i, 1e-10)
-4.18963-9.10923i -4.189625691-9.1092278938i -4.18963-9.10923i -4.189625691-9.1092278938i
; pi = pi(1e-20) ; pi = pi(1e-20)
; print cos(pi/3, 1e-10), cos(pi/2, 1e-10), cos(pi, 1e-10) ; print cos(pi/3, 1e-10), cos(pi/2, 1e-10), cos(pi, 1e-10)
.5 0 -1 0.5 0 -1
LIMITS LIMITS
none none
@@ -35,7 +35,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
sin, tan, sec, csc, cot, epsilon sin, tan, sec, csc, cot, epsilon
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -16,7 +16,7 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print cot(1, 1e-5), cot(1, 1e-10), cot(1, 1e-15), cot(1, 1e-20) ; print cot(1, 1e-5), cot(1, 1e-10), cot(1, 1e-15), cot(1, 1e-20)
.64209 .6420926159 .642092615934331 .64209261593433070301 0.64209 0.6420926159 0.642092615934331 0.64209261593433070301
LIMITS LIMITS
none none
@@ -27,7 +27,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
sin, cos, tan, sec, csc, epsilon sin, cos, tan, sec, csc, epsilon
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -18,7 +18,7 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print csch(1, 1e-5), csch(1, 1e-10), csch(1, 1e-15), csch(1, 1e-20) ; print csch(1, 1e-5), csch(1, 1e-10), csch(1, 1e-15), csch(1, 1e-20)
.85092 .8509181282 .850918128239322 .85091812823932154513 0.85092 0.8509181282 0.850918128239322 0.85091812823932154513
LIMITS LIMITS
none none
@@ -29,7 +29,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
sinh, cosh, tanh, sech, coth, epsilon sinh, cosh, tanh, sech, coth, epsilon
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -16,6 +16,8 @@ DESCRIPTION
The 25th ctime() character, '\n' is removed. The 25th ctime() character, '\n' is removed.
EXAMPLE EXAMPLE
; ## NOTE: Your output will likely vary:
; printf("The time is now %s.\n", ctime()) ; printf("The time is now %s.\n", ctime())
The time is now Mon Apr 15 12:41:44 1996. The time is now Mon Apr 15 12:41:44 1996.
@@ -28,7 +30,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
runtime, time runtime, time
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1996,1999,2021 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

View File

@@ -54,9 +54,8 @@ DESCRIPTION
return_value == d + m/60; return_value == d + m/60;
EXAMPLE EXAMPLE
/* if args are undefined, pre-declare them or assign them as args */ ; ## if args are undefined, pre-declare them or assign them as args
; global d, m; ; global d, m;
@@ -74,7 +73,7 @@ EXAMPLE
; print d2dm(360.321,deg=,min=), deg, min; ; print d2dm(360.321,deg=,min=), deg, min;
0.321 0 19.26 0.321 0 19.26
/* certain non-default rounding modes can return negative values */ ; ## certain non-default rounding modes can return negative values
; print d2dm(654.321,deg=,min=,1), deg, min; ; print d2dm(654.321,deg=,min=,1), deg, min;
-65.679 -65 -40.74 -65.679 -65 -40.74
@@ -83,7 +82,6 @@ EXAMPLE
; print d2dm(360.321,deg=,min=,1), deg, min; ; print d2dm(360.321,deg=,min=,1), deg, min;
-359.679 -359 -40.74 -359.679 -359 -40.74
LIMITS LIMITS
none none

View File

@@ -69,9 +69,8 @@ DESCRIPTION
return_value == d + m/60 + s/3600; return_value == d + m/60 + s/3600;
EXAMPLE EXAMPLE
/* if args are undefined, pre-declare them or assign them as args */ ; ## if args are undefined, pre-declare them or assign them as args
; global d, m, s; ; global d, m, s;
@@ -89,7 +88,7 @@ EXAMPLE
; print d2dms(360.321,deg=,min=,sec=), deg, min, sec; ; print d2dms(360.321,deg=,min=,sec=), deg, min, sec;
0.321 0 19 15.6 0.321 0 19 15.6
/* certain non-default rounding modes can return negative values */ ; ## certain non-default rounding modes can return negative values
; print d2dms(654.321,deg=,min=,sec=,1), deg, min, sec; ; print d2dms(654.321,deg=,min=,sec=,1), deg, min, sec;
-65.679 -65 -40 -44.4 -65.679 -65 -40 -44.4
@@ -98,7 +97,6 @@ EXAMPLE
; print d2dms(360.321,deg=,min=,sec=,1), deg, min, sec; ; print d2dms(360.321,deg=,min=,sec=,1), deg, min, sec;
-359.679 -359 -40 -44.4 -359.679 -359 -40 -44.4
LIMITS LIMITS
none none

View File

@@ -58,11 +58,13 @@ EXAMPLE
; print det(A) ; print det(A)
obj res {5} obj res {5}
Note that if A had been a 3 x 3 or larger matrix, res_div(a,b) for ; /*
non-zero b would have had to be defined (assuming at least one * NOTE: if A had been a 3 x 3 or larger matrix, res_div(a,b) for
division is necessary); for consistent results when md is composite, * non-zero b would have had to be defined (assuming at least one
res_div(a,b) should be defined only when b and md are relatively * division is necessary); for consistent results when md is composite,
prime; there is no problem when md is prime. * res_div(a,b) should be defined only when b and md are relatively
* prime; there is no problem when md is prime.
*/
LIMITS LIMITS
none none
@@ -73,7 +75,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
matdim, matmax, matmin, inverse matdim, matmax, matmin, inverse
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -61,7 +61,6 @@ DESCRIPTION
if r and q satisfy n = q * b + r. if r and q satisfy n = q * b + r.
EXAMPLE EXAMPLE
; a = 123456.789 ; a = 123456.789
; for (n = 6; n >= -6; n++) print digit(a, n),; print ; for (n = 6; n >= -6; n++) print digit(a, n),; print

View File

@@ -55,7 +55,8 @@ EXAMPLE
*/ */
; config("tilde", 1),; ; config("tilde", 1),;
; /* NOTE: display has too few digits and epsilon is not small enough */ ; ## NOTE: display has too few digits and epsilon is not small enough
; display(12),; ; display(12),;
; printf("%f\n", pi(1e-10)); ; printf("%f\n", pi(1e-10));
3.1415926536 3.1415926536
@@ -63,7 +64,8 @@ EXAMPLE
; printf("%f\n", pi()); ; printf("%f\n", pi());
3.1415926536 3.1415926536
; /* NOTE: display has too few digits yet epsilon is small enough */ ; ## NOTE: display has too few digits yet epsilon is small enough
; display(12),; ; display(12),;
; printf("%f\n", pi(1e-72)); ; printf("%f\n", pi(1e-72));
~3.141592653590 ~3.141592653590
@@ -71,7 +73,8 @@ EXAMPLE
; printf("%f\n", pi()); ; printf("%f\n", pi());
~3.141592653590 ~3.141592653590
; /* NOTE: display has enough digits but epsilon is not small enough */ ; ## NOTE: display has enough digits but epsilon is not small enough
; display(72),; ; display(72),;
; printf("%f\n", pi(1e-10)); ; printf("%f\n", pi(1e-10));
3.1415926536 3.1415926536
@@ -79,7 +82,8 @@ EXAMPLE
; printf("%f\n", pi()); ; printf("%f\n", pi());
3.1415926536 3.1415926536
/* NOTE: display has enough digits and epsilon is small enough */ ; ## NOTE: display has enough digits and epsilon is small enough
; display(72),; ; display(72),;
; printf("%f\n", pi(1e-72)); ; printf("%f\n", pi(1e-72));
3.141592653589793238462643383279502884197169399375105820974944592307816406 3.141592653589793238462643383279502884197169399375105820974944592307816406

View File

@@ -29,7 +29,6 @@ DESCRIPTION
The dm2d(d, m, rnd) builtin is an alias for dms2d(d, m, 0, rnd). The dm2d(d, m, rnd) builtin is an alias for dms2d(d, m, 0, rnd).
EXAMPLE EXAMPLE
; print dm2d(203, 325.5594); ; print dm2d(203, 325.5594);
208.42599 208.42599
@@ -50,7 +49,6 @@ EXAMPLE
; print dms2d(12, 20, 44.16, 1); ; print dms2d(12, 20, 44.16, 1);
-347.6544 -347.6544
LIMITS LIMITS
none none

View File

@@ -23,7 +23,7 @@ EXAMPLE
; epsilon(1e-20),; ; epsilon(1e-20),;
; oldeps = epsilon(1e-6) ; oldeps = epsilon(1e-6)
; print epsilon(), sqrt(2), epsilon(1e-4), sqrt(2), epsilon(oldeps) ; print epsilon(), sqrt(2), epsilon(1e-4), sqrt(2), epsilon(oldeps)
; .000001 1.414214 .000001 1.4142 .0001 ; 0.000001 1.414214 0.000001 1.4142 0.0001
; /* ; /*
* NOTE: When displaying many digits after the decimal point * NOTE: When displaying many digits after the decimal point
@@ -35,7 +35,8 @@ EXAMPLE
*/ */
; config("tilde", 1),; ; config("tilde", 1),;
; /* NOTE: display has too few digits and epsilon is not small enough */ ; ## NOTE: display has too few digits and epsilon is not small enough
; display(12),; ; display(12),;
; printf("%f\n", pi(1e-10)); ; printf("%f\n", pi(1e-10));
3.1415926536 3.1415926536
@@ -43,7 +44,8 @@ EXAMPLE
; printf("%f\n", pi()); ; printf("%f\n", pi());
3.1415926536 3.1415926536
; /* NOTE: display has too few digits yet epsilon is small enough */ ; ## NOTE: display has too few digits yet epsilon is small enough
; display(12),; ; display(12),;
; printf("%f\n", pi(1e-72)); ; printf("%f\n", pi(1e-72));
~3.141592653590 ~3.141592653590
@@ -51,7 +53,8 @@ EXAMPLE
; printf("%f\n", pi()); ; printf("%f\n", pi());
~3.141592653590 ~3.141592653590
; /* NOTE: display has enough digits but epsilon is not small enough */ ; ## NOTE: display has enough digits but epsilon is not small enough
; display(72),; ; display(72),;
; printf("%f\n", pi(1e-10)); ; printf("%f\n", pi(1e-10));
3.1415926536 3.1415926536
@@ -59,7 +62,8 @@ EXAMPLE
; printf("%f\n", pi()); ; printf("%f\n", pi());
3.1415926536 3.1415926536
/* NOTE: display has enough digits and epsilon is small enough */ ; ## NOTE: display has enough digits and epsilon is small enough
; display(72),; ; display(72),;
; printf("%f\n", pi(1e-72)); ; printf("%f\n", pi(1e-72));
3.141592653589793238462643383279502884197169399375105820974944592307816406 3.141592653589793238462643383279502884197169399375105820974944592307816406
@@ -77,7 +81,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
config, display, fprintf, printf, strprintf config, display, fprintf, printf, strprintf
## Copyright (C) 1999,2018 Landon Curt Noll ## Copyright (C) 1999,2018,2021 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

View File

@@ -28,6 +28,8 @@ DESCRIPTION
errcount. errcount.
EXAMPLE EXAMPLE
; ## NOTE: Your output may vary:
; errmax(10) ; errmax(10)
0 0
; errcount() ; errcount()
@@ -46,7 +48,7 @@ SEE ALSO
errmax, error, strerror, iserror, errno, newerror, errorcodes, errmax, error, strerror, iserror, errno, newerror, errorcodes,
stoponerror stoponerror
## Copyright (C) 1999-2006 Landon Curt Noll ## Copyright (C) 1999-2006,2021 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

View File

@@ -26,8 +26,8 @@ EXAMPLE
; a = 1/0; b = 2 + ""; c = error(27); d = newerror("alpha"); ; a = 1/0; b = 2 + ""; c = error(27); d = newerror("alpha");
Error 27 caused errcount to exceed errmax Error 27 caused errcount to exceed errmax
## Here global variables c and d were created when compiling the line ; ## Here global variables c and d were created when compiling the line
## but execution was aborted before the intended assignments to c and d. ; ## but execution was aborted before the intended assignments to c and d.
; print c, d ; print c, d
0 0 0 0
@@ -45,7 +45,7 @@ SEE ALSO
errcount, error, strerror, iserror, errno, newerror, errorcodes, errcount, error, strerror, iserror, errno, newerror, errorcodes,
stoponerror stoponerror
## Copyright (C) 2006 Landon Curt Noll ## Copyright (C) 2006,2021 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

View File

@@ -32,7 +32,8 @@ DESCRIPTION
"No error". "No error".
EXAMPLE EXAMPLE
Assuming there is no file with name "not_a_file" ; ## Assuming there is no file with name "not_a_file"
; errno(0) ; errno(0)
0 0
; errmax(errcount()+4) ; errmax(errcount()+4)
@@ -55,7 +56,7 @@ SEE ALSO
errmax, errcount, error, strerror, iserror, newerror, errorcodes, errmax, errcount, error, strerror, iserror, newerror, errorcodes,
stoponerror stoponerror
## Copyright (C) 1999-2006 Landon Curt Noll ## Copyright (C) 1999-2006,2021 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

View File

@@ -24,7 +24,6 @@ DESCRIPTION
For real x, estr(x) represents x in fractional mode. For real x, estr(x) represents x in fractional mode.
EXAMPLE EXAMPLE
; estr("abc\0xyz\00023\n\xa5\r\n") ; estr("abc\0xyz\00023\n\xa5\r\n")
""abc\0xyz\00023\n\xa5\r\n"" ""abc\0xyz\00023\n\xa5\r\n""

View File

@@ -25,7 +25,7 @@ EXAMPLE
10686474600000 10686474581524 10686474581524.4621469905 10686474600000 10686474581524 10686474581524.4621469905
; print exp(-20, 1e-5), exp(-20, 1e-10), exp(-20, 1e-15), exp(-20, 1e-20) ; print exp(-20, 1e-5), exp(-20, 1e-10), exp(-20, 1e-15), exp(-20, 1e-20)
0 .0000000021 .000000002061154 .00000000206115362244 0 0.0000000021 0.000000002061154 0.00000000206115362244
; print exp(1+2i, 1e-5), exp(1+2i, 1e-10) ; print exp(1+2i, 1e-5), exp(1+2i, 1e-10)
-1.1312+2.47173i -1.1312043838+2.471726672i -1.1312+2.47173i -1.1312043838+2.471726672i
@@ -40,7 +40,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
ln, cosh, sinh, tanh ln, cosh, sinh, tanh
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -21,7 +21,6 @@ DESCRIPTION
the file position will be that immediately after that character. the file position will be that immediately after that character.
EXAMPLE EXAMPLE
; f = fopen("/tmp/junk", "w") ; f = fopen("/tmp/junk", "w")
; fputs(f, " Alpha Beta \n") ; fputs(f, " Alpha Beta \n")
; freopen(f, "r") ; freopen(f, "r")

View File

@@ -27,9 +27,7 @@ DESCRIPTION
read newfile; read newfile;
EXAMPLE EXAMPLE
; f = fopen("/tmp/newfile", "w") ; f = fopen("/tmp/newfile", "w")
; fputs(f, "abc\0xyz\n\t\xb0\0\r\v123" ; fputs(f, "abc\0xyz\n\t\xb0\0\r\v123"
; freopen(f, "r") ; freopen(f, "r")
@@ -45,7 +43,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
fgets, fgetstr, files, fopen, fprintf, fputs, fputstr fgets, fgetstr, files, fopen, fprintf, fputs, fputstr
## Copyright (C) 1999-2006 Landon Curt Noll ## Copyright (C) 1999-2006,2021 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

View File

@@ -35,7 +35,7 @@ EXAMPLE
mat [4] (4 elements, 4 nonzero): mat [4] (4 elements, 4 nonzero):
[0] = 1.4142135623730950488 [0] = 1.4142135623730950488
[1] = ~.42857142857142857142 [1] = ~0.42857142857142857142
[2] = "undefined" [2] = "undefined"
[3] = NULL [3] = NULL
@@ -55,7 +55,8 @@ EXAMPLE
*/ */
; config("tilde", 1),; ; config("tilde", 1),;
; /* NOTE: display has too few digits and epsilon is not small enough */ ; ## NOTE: display has too few digits and epsilon is not small enough
; display(12),; ; display(12),;
; fprintf(files(1), "%f\n", pi(1e-10)); ; fprintf(files(1), "%f\n", pi(1e-10));
3.1415926536 3.1415926536
@@ -63,7 +64,8 @@ EXAMPLE
; fprintf(files(1), "%f\n", pi()); ; fprintf(files(1), "%f\n", pi());
3.1415926536 3.1415926536
; /* NOTE: display has too few digits yet epsilon is small enough */ ; ## NOTE: display has too few digits yet epsilon is small enough
; display(12),; ; display(12),;
; fprintf(files(1), "%f\n", pi(1e-72)); ; fprintf(files(1), "%f\n", pi(1e-72));
~3.141592653590 ~3.141592653590
@@ -71,7 +73,8 @@ EXAMPLE
; fprintf(files(1), "%f\n", pi()); ; fprintf(files(1), "%f\n", pi());
~3.141592653590 ~3.141592653590
; /* NOTE: display has enough digits but epsilon is not small enough */ ; ## NOTE: display has enough digits but epsilon is not small enough
; display(72),; ; display(72),;
; fprintf(files(1), "%f\n", pi(1e-10)); ; fprintf(files(1), "%f\n", pi(1e-10));
3.1415926536 3.1415926536
@@ -79,7 +82,8 @@ EXAMPLE
; fprintf(files(1), "%f\n", pi()); ; fprintf(files(1), "%f\n", pi());
3.1415926536 3.1415926536
/* NOTE: display has enough digits and epsilon is small enough */ ; ## NOTE: display has enough digits and epsilon is small enough
; display(72),; ; display(72),;
; fprintf(files(1), "%f\n", pi(1e-72)); ; fprintf(files(1), "%f\n", pi(1e-72));
3.141592653589793238462643383279502884197169399375105820974944592307816406 3.141592653589793238462643383279502884197169399375105820974944592307816406
@@ -96,7 +100,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
config, display, epsilon, printf, strprintf config, display, epsilon, printf, strprintf
## Copyright (C) 1999-2006,2018 Landon Curt Noll ## Copyright (C) 1999-2006,2018,2021 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

View File

@@ -21,7 +21,6 @@ DESCRIPTION
fs. A non-null value is returned only if the attempt fails. fs. A non-null value is returned only if the attempt fails.
EXAMPLE EXAMPLE
; f = fopen("/tmp/junk", "w") ; f = fopen("/tmp/junk", "w")
; fputs(f, "Leonard Euler") ; fputs(f, "Leonard Euler")
; freopen(f, "r") ; freopen(f, "r")

View File

@@ -54,9 +54,8 @@ DESCRIPTION
return_value == g + m/60; return_value == g + m/60;
EXAMPLE EXAMPLE
/* if args are undefined, pre-declare them or assign them as args */ ; ## if args are undefined, pre-declare them or assign them as args
; global g, m; ; global g, m;
@@ -74,7 +73,7 @@ EXAMPLE
; print g2gm(400.321,grad=,min=), grad, min; ; print g2gm(400.321,grad=,min=), grad, min;
0.321 0 19.26 0.321 0 19.26
/* certain non-default rounding modes can return negative values */ ; ## certain non-default rounding modes can return negative values
; print g2gm(654.321,grad=,min=,1), grad, min; ; print g2gm(654.321,grad=,min=,1), grad, min;
-145.679 -145 -40.74 -145.679 -145 -40.74
@@ -83,7 +82,6 @@ EXAMPLE
; print g2gm(400.321,grad=,min=,1), grad, min; ; print g2gm(400.321,grad=,min=,1), grad, min;
-399.679 -399 -40.74 -399.679 -399 -40.74
LIMITS LIMITS
none none

View File

@@ -69,9 +69,8 @@ DESCRIPTION
return_value == g + m/60 + s/3600; return_value == g + m/60 + s/3600;
EXAMPLE EXAMPLE
/* if args are undefined, pre-declare them or assign them as args */ ; ## if args are undefined, pre-declare them or assign them as args
; global g, m, s; ; global g, m, s;
@@ -89,7 +88,7 @@ EXAMPLE
; print g2gms(400.321,grad=,min=,sec=), grad, min, sec; ; print g2gms(400.321,grad=,min=,sec=), grad, min, sec;
0.321 0 19 15.6 0.321 0 19 15.6
/* certain non-default rounding modes can return negative values */ ; ## certain non-default rounding modes can return negative values
; print g2gms(654.321,grad=,min=,sec=,1), grad, min, sec; ; print g2gms(654.321,grad=,min=,sec=,1), grad, min, sec;
-145.679 -145 -40 -44.4 -145.679 -145 -40 -44.4
@@ -98,7 +97,6 @@ EXAMPLE
; print g2gms(400.321,grad=,min=,sec=,1), grad, min, sec; ; print g2gms(400.321,grad=,min=,sec=,1), grad, min, sec;
-399.679 -399 -40 -44.4 -399.679 -399 -40 -44.4
LIMITS LIMITS
none none

View File

@@ -16,7 +16,7 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print gcd(12, -24, 30), gcd(9/10, 11/5, 4/25), gcd(0,0,0,0,0) ; print gcd(12, -24, 30), gcd(9/10, 11/5, 4/25), gcd(0,0,0,0,0)
6 .02 0 6 0.02 0
LIMITS LIMITS
The number of arguments may not to exceed 1024. The number of arguments may not to exceed 1024.
@@ -27,7 +27,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
lcm lcm
## Copyright (C) 1999-2006 Landon Curt Noll ## Copyright (C) 1999-2006,2021 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

View File

@@ -36,10 +36,10 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print gd(1, 1e-5), gd(1, 1e-10), gd(1, 1e-15) ; print gd(1, 1e-5), gd(1, 1e-10), gd(1, 1e-15)
.86577 .8657694832 .865769483239659 0.86577 0.8657694832 0.865769483239659
; print gd(2+1i, 1e-5), gd(2+1i, 1e-10) ; print gd(2+1i, 1e-5), gd(2+1i, 1e-10)
1.42291+.22751i 1.4229114625+.2275106584i 1.42291+0.22751i 1.4229114625+0.2275106584i
LIMITS LIMITS
none none

View File

@@ -29,7 +29,6 @@ DESCRIPTION
The gm2g(d, m, rnd) builtin is an alias for gms2g(d, m, 0, rnd). The gm2g(d, m, rnd) builtin is an alias for gms2g(d, m, 0, rnd).
EXAMPLE EXAMPLE
; print gm2g(203, 325.5594); ; print gm2g(203, 325.5594);
208.42599 208.42599
@@ -50,7 +49,6 @@ EXAMPLE
; print gms2g(12, 20, 44.16, 1); ; print gms2g(12, 20, 44.16, 1);
-387.6544 -387.6544
LIMITS LIMITS
none none

View File

@@ -54,9 +54,8 @@ DESCRIPTION
return_value == h + m/60; return_value == h + m/60;
EXAMPLE EXAMPLE
/* if args are undefined, pre-declare them or assign them as args */ ; ## if args are undefined, pre-declare them or assign them as args
; global h, m; ; global h, m;
@@ -74,7 +73,7 @@ EXAMPLE
; print h2hm(24.321,hour=,min=), hour, min; ; print h2hm(24.321,hour=,min=), hour, min;
0.321 0 19.26 0.321 0 19.26
/* certain non-default rounding modes can return negative values */ ; ## certain non-default rounding modes can return negative values
; print h2hm(654.321,hour=,min=,1), hour, min; ; print h2hm(654.321,hour=,min=,1), hour, min;
-17.679 -17 -40.74 -17.679 -17 -40.74
@@ -83,7 +82,6 @@ EXAMPLE
; print h2hm(24.321,hour=,min=,1), hour, min; ; print h2hm(24.321,hour=,min=,1), hour, min;
-23.679 -23 -40.7 -23.679 -23 -40.7
LIMITS LIMITS
none none

View File

@@ -69,9 +69,8 @@ DESCRIPTION
return_value == h + m/60 + s/3600; return_value == h + m/60 + s/3600;
EXAMPLE EXAMPLE
/* if args are undefined, pre-declare them or assign them as args */ ; ## if args are undefined, pre-declare them or assign them as args
; global h, m, s; ; global h, m, s;
@@ -89,7 +88,7 @@ EXAMPLE
; print h2hms(24.321,hour=,min=,sec=), hour, min, sec; ; print h2hms(24.321,hour=,min=,sec=), hour, min, sec;
0.321 0 19 15.6 0.321 0 19 15.6
/* certain non-default rounding modes can return negative values */ ; ## certain non-default rounding modes can return negative values
; print h2hms(654.321,hour=,min=,sec=,1), hour, min, sec; ; print h2hms(654.321,hour=,min=,sec=,1), hour, min, sec;
-17.679 -17 -40 -44.4 -17.679 -17 -40 -44.4
@@ -98,7 +97,6 @@ EXAMPLE
; print h2hms(24.321,hour=,min=,sec=,1), hour, min, sec; ; print h2hms(24.321,hour=,min=,sec=,1), hour, min, sec;
-23.679 -23 -40 -44.4 -23.679 -23 -40 -44.4
LIMITS LIMITS
none none

View File

@@ -29,7 +29,6 @@ DESCRIPTION
The hm2h(h, m, rnd) builtin is an alias for hms2h(h, m, 0, rnd). The hm2h(h, m, rnd) builtin is an alias for hms2h(h, m, 0, rnd).
EXAMPLE EXAMPLE
; print hm2h(203, 325.5594); ; print hm2h(203, 325.5594);
16.42599 16.42599
@@ -50,7 +49,6 @@ EXAMPLE
; print hms2h(12, 20, 44.16, 1); ; print hms2h(12, 20, 44.16, 1);
-11.6544 -11.6544
LIMITS LIMITS
none none

View File

@@ -24,7 +24,10 @@ DESCRIPTION
of inputlevel() indicate reading at greater depths. of inputlevel() indicate reading at greater depths.
EXAMPLE EXAMPLE
n/a ; ## NOTE: Your current input level may vary:
; inputlevel()
0
LIMITS LIMITS
none none

View File

@@ -25,7 +25,7 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print inverse(5/4), inverse(-2/7), inverse(3 + 4i) ; print inverse(5/4), inverse(-2/7), inverse(3 + 4i)
.8 -3.5 .12-.16i 0.8 -3.5 0.12-0.16i
; mat A[2,2] = {2,3,5,7} ; mat A[2,2] = {2,3,5,7}
; print inverse(A) ; print inverse(A)
@@ -47,7 +47,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -21,7 +21,7 @@ EXAMPLE
2.30259 2.302585093 2.302585092994046 2.30258509299404568402 2.30259 2.302585093 2.302585092994046 2.30258509299404568402
; print ln(2+3i, 1e-5), ln(2+3i, 1e-10) ; print ln(2+3i, 1e-5), ln(2+3i, 1e-10)
1.28247+.98279i 1.2824746787+.9827937232i 1.28247+0.98279i 1.2824746787+0.9827937232i
LIMITS LIMITS
x != 0 x != 0
@@ -34,7 +34,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
exp, acosh, asinh, atanh, log exp, acosh, asinh, atanh, log
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -17,7 +17,7 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print ltol(0.4, 1e-6), hypot(0.5, 1e-6) ; print ltol(0.4, 1e-6), hypot(0.5, 1e-6)
.6 .866025 0.6 0.866025
LIMITS LIMITS
abs(x) <= 1 abs(x) <= 1
@@ -28,7 +28,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
hypot hypot
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -407,7 +407,7 @@ LIMITS
times as long to invert a 100 * 100 matrix. times as long to invert a 100 * 100 matrix.
LINK LIBRARY LINK LIBRARY
n/a none
SEE ALSO SEE ALSO
ismat, matdim, matmax, matmin, mattrans, mattrace, matsum, matfill, ismat, matdim, matmax, matmin, mattrans, mattrace, matsum, matfill,

View File

@@ -49,7 +49,7 @@ DESCRIPTION
The minimum value for memsize(x) occurs for the null and error values. The minimum value for memsize(x) occurs for the null and error values.
EXAMPLES EXAMPLE
The results for examples like these will depend to some extent on The results for examples like these will depend to some extent on
the system being used. The following were for an SGI R4k machine the system being used. The following were for an SGI R4k machine

View File

@@ -113,7 +113,7 @@ operators
as division of real numbers, and think of '//' as division as division of real numbers, and think of '//' as division
of integers (e.g., 8 / 3 is 8/3 whereas 8 // 3 is 2). of integers (e.g., 8 / 3 is 8/3 whereas 8 // 3 is 2).
The '%' is integral or fractional modulus (e.g., 11%4 is 3, The '%' is integral or fractional modulus (e.g., 11%4 is 3,
and 10%pi() is ~.575222). and 10%pi() is ~0.575222).
| Bitwise OR. | Bitwise OR.
In a | b, both a and b are to be real integers; In a | b, both a and b are to be real integers;
@@ -128,7 +128,7 @@ operators
^ ** << >> ^ ** << >>
Powers and shifts. Powers and shifts.
The '^' and '**' are both exponentiation, e.g. 2^3 The '^' and '**' are both exponentiation, e.g. 2^3
returns 8, 2^-3 returns .125. Note that in a^b, if returns 8, 2^-3 returns 0.125. Note that in a^b, if
'a' == 0 and 'b' is real, then is must be >= 0 as well. 'a' == 0 and 'b' is real, then is must be >= 0 as well.
Also 0^0 and 0**0 return the value 1. Also 0^0 and 0**0 return the value 1.

View File

@@ -19,7 +19,7 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print polar(2, 0), polar(1, 2, 1e-5), polar(1, 2, 1e-10) ; print polar(2, 0), polar(1, 2, 1e-5), polar(1, 2, 1e-10)
2 -.41615+.9093i -.4161468365+.9092974268i 2 -0.41615+0.9093i -0.4161468365+0.9092974268i
; pi = pi(1e-10); eps = 1e-5 ; pi = pi(1e-10); eps = 1e-5
; print polar(2, pi/4, eps), polar(2, pi/2, eps), polar(2, 3*pi/4, eps) ; print polar(2, pi/4, eps), polar(2, pi/2, eps), polar(2, 3*pi/4, eps)
@@ -34,7 +34,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
abs, arg, re, im abs, arg, re, im
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -35,7 +35,7 @@ EXAMPLE
2.71828182845904523536 2.71828182845904523536
; print power(1i, 1i, 1e-20) ; print power(1i, 1i, 1e-20)
.20787957635076190855 0.20787957635076190855
; print power(exp(1, 1e-20), pi(1e-20) * 1i/2, 1e-20) ; print power(exp(1, 1e-20), pi(1e-20) * 1i/2, 1e-20)
1i 1i
@@ -55,7 +55,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
root root
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -165,7 +165,6 @@ DESCRIPTION
; fclose(fd); ; fclose(fd);
EXAMPLE EXAMPLE
; config("epsilon", 1e-6),; ; config("epsilon", 1e-6),;
: config("display", 6),; : config("display", 6),;
@@ -179,11 +178,15 @@ EXAMPLE
; fd = fopen("/tmp/test.txt", "w+"); ; fd = fopen("/tmp/test.txt", "w+");
; fprintf(fd, "%d\n", 2^23209-1); ; fprintf(fd, "%d\n", 2^23209-1);
; /* one must flush to be buffered output is written */
; ## one must flush to be buffered output is written
; fflush(fd); ; fflush(fd);
; display(10000),; ; display(10000),;
; fprintf(fd, "%d\n", pi(1e-10000)); ; fprintf(fd, "%d\n", pi(1e-10000));
; /* closing the file will also flush the buffer */
; ## closing the file will also flush the buffer
; fclose(fd); ; fclose(fd);
; printf("%x\n", 1.2345); ; printf("%x\n", 1.2345);
@@ -207,7 +210,7 @@ EXAMPLE
; printf("%f%r",A,A); ; printf("%f%r",A,A);
mat [4] (4 elements, 4 nonzero): mat [4] (4 elements, 4 nonzero):
[0] = 1.414214 [0] = 1.414214
[1] = .428571 [1] = 0.428571
[2] = "undefined" [2] = "undefined"
[3] = NULL [3] = NULL
@@ -262,7 +265,8 @@ EXAMPLE
*/ */
; config("tilde", 1),; ; config("tilde", 1),;
; /* NOTE: display has too few digits and epsilon is not small enough */ ; ## NOTE: display has too few digits and epsilon is not small enough
; display(12),; ; display(12),;
; printf("%f\n", pi(1e-10)); ; printf("%f\n", pi(1e-10));
3.1415926536 3.1415926536
@@ -270,7 +274,8 @@ EXAMPLE
; printf("%f\n", pi()); ; printf("%f\n", pi());
3.1415926536 3.1415926536
; /* NOTE: display has too few digits yet epsilon is small enough */ ; ## NOTE: display has too few digits yet epsilon is small enough
; display(12),; ; display(12),;
; printf("%f\n", pi(1e-72)); ; printf("%f\n", pi(1e-72));
~3.141592653590 ~3.141592653590
@@ -278,7 +283,8 @@ EXAMPLE
; printf("%f\n", pi()); ; printf("%f\n", pi());
~3.141592653590 ~3.141592653590
; /* NOTE: display has enough digits but epsilon is not small enough */ ; ## NOTE: display has enough digits but epsilon is not small enough
; display(72),; ; display(72),;
; printf("%f\n", pi(1e-10)); ; printf("%f\n", pi(1e-10));
3.1415926536 3.1415926536
@@ -286,7 +292,8 @@ EXAMPLE
; printf("%f\n", pi()); ; printf("%f\n", pi());
3.1415926536 3.1415926536
/* NOTE: display has enough digits and epsilon is small enough */ ; ## NOTE: display has enough digits and epsilon is small enough
; display(72),; ; display(72),;
; printf("%f\n", pi(1e-72)); ; printf("%f\n", pi(1e-72));
3.141592653589793238462643383279502884197169399375105820974944592307816406 3.141592653589793238462643383279502884197169399375105820974944592307816406

View File

@@ -200,7 +200,6 @@ DESCRIPTION
only when it is referred to by A. only when it is referred to by A.
EXAMPLE EXAMPLE
; A = 27 ; A = 27
; protect(A,1) ; protect(A,1)
; A = 45 ; A = 45

View File

@@ -108,7 +108,7 @@ EXAMPLE
The integer x in this example is the smallest positive integer that is The integer x in this example is the smallest positive integer that is
a strong pseudoprime to each of the first four primes 2, 3, 5, 7, but a strong pseudoprime to each of the first four primes 2, 3, 5, 7, but
not to base 11. The probability that ptest(x,-1,0) will return 1 is not to base 11. The probability that ptest(x,-1,0) will return 1 is
about .23. about 0.23.
; for (i = 0; i < 11; i++) print ptest(91,-1,0),:; print; ; for (i = 0; i < 11; i++) print ptest(91,-1,0),:; print;
0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1

View File

@@ -25,7 +25,6 @@ DESCRIPTION
putenv(strcat(env, "=", val)) putenv(strcat(env, "=", val))
EXAMPLE EXAMPLE
; putenv("name", "value") ; putenv("name", "value")
0 0
@@ -47,7 +46,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
getenv getenv
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -68,7 +68,6 @@ DESCRIPTION
argument is not as specified above, or if Q or R has no-assign-to argument is not as specified above, or if Q or R has no-assign-to
protection, e.g. after protect(Q,1). protection, e.g. after protect(Q,1).
EXAMPLE EXAMPLE
; global u, v; ; global u, v;
; global mat M[2]; ; global mat M[2];

View File

@@ -137,7 +137,6 @@ DESCRIPTION
of the other compiled in Blum moduli or provide your own. See of the other compiled in Blum moduli or provide your own. See
the srandom help page for details. the srandom help page for details.
EXAMPLE EXAMPLE
; print srandom(0), random(), random(), random() ; print srandom(0), random(), random(), random()
RANDOM state 9203168135432720454 13391974640168007611 13954330032848846793 RANDOM state 9203168135432720454 13391974640168007611 13954330032848846793

View File

@@ -32,13 +32,13 @@ EXAMPLE
1.62658 1.6265765617 1.626576561697786 1.62658 1.6265765617 1.626576561697786
; print root(1+3i, 3, 1e-5), root(1 + 3i, 3, 1e-10) ; print root(1+3i, 3, 1e-5), root(1 + 3i, 3, 1e-10)
1.34241+.59361i 1.3424077452+.5936127825i 1.34241+0.59361i 1.3424077452+0.5936127825i
; print root(-8, 3, 1e-5), root(-8, 34, 1e-5) ; print root(-8, 3, 1e-5), root(-8, 34, 1e-5)
-2 ~1.05853505050032399594+~.09807874962631613016i -2 ~1.05853505050032399594+~0.09807874962631613016i
; print root(1i, 100, 1e-20) ; print root(1i, 100, 1e-20)
.99987663248166059864+.01570731731182067575i 0.99987663248166059864+0.01570731731182067575i
LIMITS LIMITS
n >= 0 n >= 0
@@ -52,7 +52,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
power power
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -65,29 +65,29 @@ DESCRIPTION
changed by assignments; plcs and rnd are copied to temporary changed by assignments; plcs and rnd are copied to temporary
variables, so their values are not changed by the call. variables, so their values are not changed by the call.
EXAMPLES EXAMPLE
; a = 7/32, b = -7/32 ; a = 7/32, b = -7/32
; print a, b ; print a, b
.21875 -.21875 0.21875 -0.21875
; print round(a,3,0), round(a,3,1), round(a,3,2), print round(a,3,3) ; print round(a,3,0), round(a,3,1), round(a,3,2), print round(a,3,3)
.218, .219, .218, .219 0.218, 0.219, 0.218, 0.219
; print round(b,3,0), round(b,3,1), round(b,3,2), print round(b,3,3) ; print round(b,3,0), round(b,3,1), round(b,3,2), print round(b,3,3)
-.219, -.218, -.218, -.219 -0.219, -0.218, -0.218, -0.219
; print round(a,3,16), round(a,3,17), round(a,3,18), print round(a,3,19) ; print round(a,3,16), round(a,3,17), round(a,3,18), print round(a,3,19)
.2188 .2188 .2188 .2188 0.2188 0.2188 0.2188 0.2188
; print round(a,4,16), round(a,4,17), round(a,4,18), print round(a,4,19) ; print round(a,4,16), round(a,4,17), round(a,4,18), print round(a,4,19)
.2187 .2188 .2187 .2188 0.2187 0.2188 0.2187 0.2188
; print round(a,2,8), round(a,3,8), round(a,4,8), round(a,5,8) ; print round(a,2,8), round(a,3,8), round(a,4,8), round(a,5,8)
.22 .218 .2188 .21875 0.22 0.218 0.2188 0.21875
; print round(a,2,24), round(a,3,24), round(a,4,24), round(a,5,24) ; print round(a,2,24), round(a,3,24), round(a,4,24), round(a,5,24)
.22 .219 .2188 .21875 0.22 0.219 0.2188 0.21875
; c = 21875 ; c = 21875
; print round(c,-2,0), round(c,-2,1), round(c,-3,0), round(c,-3,16) ; print round(c,-2,0), round(c,-2,1), round(c,-3,0), round(c,-3,16)
@@ -100,13 +100,13 @@ EXAMPLES
; print round(A,2,24) ; print round(A,2,24)
list(7 elements, 7 nonzero): list(7 elements, 7 nonzero):
[[0]] = .12 [[0]] = 0.12
[[1]] = .25 [[1]] = 0.25
[[3]] = .38 [[3]] = 0.38
[[4]] = .5 [[4]] = 0.5
[[5]] = .62 [[5]] = 0.62
[[6]] = .75 [[6]] = 0.75
[[7]] = .88 [[7]] = 0.88
LIMITS LIMITS
For non-object case: For non-object case:
@@ -122,7 +122,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
bround, btrunc, trunc, int, appr bround, btrunc, trunc, int, appr
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -24,7 +24,7 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print scale(3, 2), scale(3,1), scale(3,0), scale(3,-1), scale(3,-2) ; print scale(3, 2), scale(3,1), scale(3,0), scale(3,-1), scale(3,-2)
12 6 3 1.5 .75 12 6 3 1.5 0.75
LIMITS LIMITS
For non-object x, abs(n) < 2^31 For non-object x, abs(n) < 2^31
@@ -37,7 +37,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
obj obj
## Copyright (C) 1999-2006 Landon Curt Noll ## Copyright (C) 1999-2006,2021 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

View File

@@ -18,7 +18,7 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print sech(1, 1e-5), sech(1, 1e-10), sech(1, 1e-15), sech(1, 1e-20) ; print sech(1, 1e-5), sech(1, 1e-10), sech(1, 1e-15), sech(1, 1e-20)
.64805 .6480542737 .648054273663885 .64805427366388539958 0.64805 0.6480542737 0.648054273663885 0.64805427366388539958
LIMITS LIMITS
unlike sin and cos, x must be real unlike sin and cos, x must be real
@@ -30,7 +30,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
sinh, cosh, tanh, csch, coth, epsilon sinh, cosh, tanh, csch, coth, epsilon
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -22,7 +22,6 @@ DESCRIPTION
sgn(re(x)) + sgn(im(x))*1i sgn(re(x)) + sgn(im(x))*1i
EXAMPLE EXAMPLE
; print sgn(27), sgn(1e-20), sgn(0), sgn(-45) ; print sgn(27), sgn(1e-20), sgn(0), sgn(-45)
1 1 0 -1 1 1 0 -1
@@ -39,7 +38,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
abs abs
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -16,14 +16,14 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print sin(1, 1e-5), sin(1, 1e-10), sin(1, 1e-15), sin(1, 1e-20) ; print sin(1, 1e-5), sin(1, 1e-10), sin(1, 1e-15), sin(1, 1e-20)
.84147 .8414709848 .841470984807896 .84147098480789650665 0.84147 0.8414709848 0.841470984807896 0.84147098480789650665
; print sin(2 + 3i, 1e-5), sin(2 + 3i, 1e-10) ; print sin(2 + 3i, 1e-5), sin(2 + 3i, 1e-10)
9.1545-4.16891i 9.1544991469-4.16890696i 9.1545-4.16891i 9.1544991469-4.16890696i
; pi = pi(1e-20) ; pi = pi(1e-20)
; print sin(pi/6, 1e-10), sin(pi/2, 1e-10), sin(pi, 1e-10) ; print sin(pi/6, 1e-10), sin(pi/2, 1e-10), sin(pi, 1e-10)
.5 1 0 0.5 1 0
LIMITS LIMITS
eps > 0 eps > 0
@@ -35,7 +35,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
cos, tan, sec, csc, cot, epsilon cos, tan, sec, csc, cot, epsilon
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -51,7 +51,7 @@ DESCRIPTION
The minimum value for sizeof(x) occurs for the null and error values. The minimum value for sizeof(x) occurs for the null and error values.
EXAMPLES EXAMPLE
The results for examples like these will depend to some extent on The results for examples like these will depend to some extent on
the system being used. The following were for an SGI R4k machine the system being used. The following were for an SGI R4k machine
in 32-bit mode: in 32-bit mode:

View File

@@ -206,7 +206,7 @@ DESCRIPTION
1 The order of the elements is reversed 1 The order of the elements is reversed
EXAMPLES EXAMPLE
; A = list(1, 7, 2, 4, 2) ; A = list(1, 7, 2, 4, 2)
; print sort(A) ; print sort(A)

View File

@@ -103,7 +103,6 @@ DESCRIPTION
decimal digit being even when the part differs from a multiple decimal digit being even when the part differs from a multiple
of 1e-20 by 1/2 * 1e-20. of 1e-20 by 1/2 * 1e-20.
EXAMPLE EXAMPLE
; eps = 1e-4 ; eps = 1e-4
; print sqrt(4,eps,0), sqrt(4,eps,64), sqrt(8i,eps,0), sqrt(8i, eps, 64) ; print sqrt(4,eps,0), sqrt(4,eps,64), sqrt(8i,eps,0), sqrt(8i, eps, 64)
@@ -117,7 +116,7 @@ EXAMPLE
1.2346 1.2345678 -1.2345678 1.2346 1.2345678 -1.2345678
; print sqrt(.00005^2, eps, 24), sqrt(.00015^2, eps, 24) ; print sqrt(.00005^2, eps, 24), sqrt(.00015^2, eps, 24)
0 .0002 0 0.0002
LIMITS LIMITS
none none

View File

@@ -21,7 +21,6 @@ DESCRIPTION
in this case, the size of the resulting string is the sum of the in this case, the size of the resulting string is the sum of the
sizes of the component strings. sizes of the component strings.
EXAMPLE EXAMPLE
; A = "abc"; B = "XY"; C = " "; ; A = "abc"; B = "XY"; C = " ";
; print strcat(A, B, C, B, A) ; print strcat(A, B, C, B, A)
@@ -37,7 +36,7 @@ SEE ALSO
strcmp, strcpy, strerror, strlen, strncmp, strncpy, strpos, strcmp, strcpy, strerror, strlen, strncmp, strncpy, strpos,
strprintf, strscan, strscanf, substr strprintf, strscan, strscanf, substr
## Copyright (C) 1999-2006 Landon Curt Noll ## Copyright (C) 1999-2006,2021 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

View File

@@ -22,7 +22,6 @@ DESCRIPTION
both greater than equal to n, 0 is returned. both greater than equal to n, 0 is returned.
This function is case independent. This function is case independent.
EXAMPLE EXAMPLE
strncasecmp("abc", "xyz", 0) == 0 strncasecmp("abc", "xyz", 0) == 0
strncasecmp("abc", "xyz", 1) == -1 strncasecmp("abc", "xyz", 1) == -1
@@ -44,7 +43,7 @@ SEE ALSO
strcat, strcpy, strerror, strlen, strncpy, strpos, strcasecmp strcat, strcpy, strerror, strlen, strncpy, strpos, strcasecmp
strprintf, strscan, strscanf, substr strprintf, strscan, strscanf, substr
## Copyright (C) 2013 Christoph Zurnieden ## Copyright (C) 2013,2021 Christoph Zurnieden
## ##
## 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

View File

@@ -21,17 +21,15 @@ DESCRIPTION
to, or less than min(n2, n); in particular, if n1 and n2 are to, or less than min(n2, n); in particular, if n1 and n2 are
both greater than equal to n, 0 is returned. both greater than equal to n, 0 is returned.
EXAMPLE EXAMPLE
strncmp("abc", "xyz", 0) == 0 ; strncmp("abc", "xyz", 0) == 0
strncmp("abc", "xyz", 1) == -1 ; strncmp("abc", "xyz", 1) == -1
strncmp("abc", "", 1) == 1 ; strncmp("abc", "", 1) == 1
strncmp("a", "b", 2) == -1 ; strncmp("a", "b", 2) == -1
strncmp("ab", "ac", 2) == -1 ; strncmp("ab", "ac", 2) == -1
strncmp("\0ac", "\0b", 2) == -1 ; strncmp("\0ac", "\0b", 2) == -1
strncmp("ab", "abc", 2) == 0 ; strncmp("ab", "abc", 2) == 0
strncmp("abc", "abd", 2) == 0 ; strncmp("abc", "abd", 2) == 0
LIMITS LIMITS
none none
@@ -44,7 +42,7 @@ SEE ALSO
strcat, strcpy, strerror, strlen, strncpy, strpos, strcat, strcpy, strerror, strlen, strncpy, strpos,
strprintf, strscan, strscanf, substr strprintf, strscan, strscanf, substr
## Copyright (C) 2006 Ernest Bowen ## Copyright (C) 2006,2021 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

View File

@@ -21,13 +21,13 @@ DESCRIPTION
new value. new value.
EXAMPLE EXAMPLE
strncpy("abcdef", "xyz", 0) == "abcdef" ; strncpy("abcdef", "xyz", 0) == "abcdef"
strncpy("abcdef", "xyz", 1) == "xbcdef" ; strncpy("abcdef", "xyz", 1) == "xbcdef"
strncpy("abcdef", "xyz", 2) == "xycdef" ; strncpy("abcdef", "xyz", 2) == "xycdef"
strncpy("abcdef", "xyz", 3) == "xyzdef" ; strncpy("abcdef", "xyz", 3) == "xyzdef"
strncpy("abcdef", "xyz", 4) == "xyz\0ef" ; strncpy("abcdef", "xyz", 4) == "xyz\0ef"
strncpy("abcdef", "xyz", 5) == "xyz\0\0f" ; strncpy("abcdef", "xyz", 5) == "xyz\0\0f"
strncpy("ab", "xyz", 3) == "xy" ; strncpy("ab", "xyz", 3) == "xy"
LIMITS LIMITS
none none

View File

@@ -48,7 +48,8 @@ EXAMPLE
; config("tab", 0),; ; config("tab", 0),;
; fmt1 = "%f"; ; fmt1 = "%f";
; /* NOTE: display has too few digits and epsilon is not small enough */ ; ## NOTE: display has too few digits and epsilon is not small enough
; display(12),; ; display(12),;
; strprintf(fmt1, pi(1e-10)); ; strprintf(fmt1, pi(1e-10));
"3.1415926536" "3.1415926536"
@@ -56,7 +57,8 @@ EXAMPLE
; strprintf(fmt1, pi()); ; strprintf(fmt1, pi());
"3.1415926536" "3.1415926536"
; /* NOTE: display has too few digits yet epsilon is small enough */ ; ## NOTE: display has too few digits yet epsilon is small enough
; display(12),; ; display(12),;
; strprintf(fmt1, pi(1e-72)); ; strprintf(fmt1, pi(1e-72));
"~3.141592653590" "~3.141592653590"
@@ -64,7 +66,8 @@ EXAMPLE
; strprintf(fmt1, pi()); ; strprintf(fmt1, pi());
~3.141592653590 ~3.141592653590
; /* NOTE: display has enough digits but epsilon is not small enough */ ; ## NOTE: display has enough digits but epsilon is not small enough
; display(72),; ; display(72),;
; strprintf(fmt1, pi(1e-10)); ; strprintf(fmt1, pi(1e-10));
"3.1415926536" "3.1415926536"
@@ -72,7 +75,8 @@ EXAMPLE
; strprintf(fmt1, pi()); ; strprintf(fmt1, pi());
"3.1415926536" "3.1415926536"
/* NOTE: display has enough digits and epsilon is small enough */ ; ## NOTE: display has enough digits and epsilon is small enough
; display(72),; ; display(72),;
; strprintf(fmt1, pi(1e-72)); ; strprintf(fmt1, pi(1e-72));
"3.141592653589793238462643383279502884197169399375105820974944592307816406" "3.141592653589793238462643383279502884197169399375105820974944592307816406"
@@ -91,7 +95,7 @@ SEE ALSO
strlen, strncmp, strncpy, strpos, strscan, strscanf, substr, strlen, strncmp, strncpy, strpos, strscan, strscanf, substr,
printf printf
## Copyright (C) 1999-2006,2018 Landon Curt Noll ## Copyright (C) 1999-2006,2018,2021 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

View File

@@ -19,7 +19,7 @@ DESCRIPTION
The function returns the number of fields evaluated. The function returns the number of fields evaluated.
EXAMPLE EXAMPLE
global a,b ; global a,b
; strscan(" 2+3 a^2 print(b)", a, b, 0); ; strscan(" 2+3 a^2 print(b)", a, b, 0);
25 25
3 3
@@ -36,7 +36,7 @@ SEE ALSO
strcat, strcpy, strerror, strlen, strncmp, strncpy, strpos, strcat, strcpy, strerror, strlen, strncmp, strncpy, strpos,
strprintf, strscanf, substr strprintf, strscanf, substr
## Copyright (C) 1999-2006 Ernest Bowen ## Copyright (C) 1999-2006,2021 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

View File

@@ -91,7 +91,6 @@ DESCRIPTION
is assigned to the corresponding lvalue. (Any width or skip specification is assigned to the corresponding lvalue. (Any width or skip specification
is ignored.) is ignored.)
EXAMPLE EXAMPLE
; global a, b, c, d ; global a, b, c, d
; A = "abc xyz 234.6 alpha" ; A = "abc xyz 234.6 alpha"
@@ -115,7 +114,7 @@ SEE ALSO
strcat, strcpy, strerror, strlen, strncmp, strncpy, strpos, strcat, strcpy, strerror, strlen, strncmp, strncpy, strpos,
strprintf, strscan, substr strprintf, strscan, substr
## Copyright (C) 1999-2006 Ernest Bowen ## Copyright (C) 1999-2006,2021 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

View File

@@ -24,7 +24,7 @@ DESCRIPTION
EXAMPLE EXAMPLE
; x = 3/4; y = "abc"; print x, y, swap(x,y), x, y ; x = 3/4; y = "abc"; print x, y, swap(x,y), x, y
.75 abc abc .75 0.75 abc abc 0.75
; A = list(1,2,3); mat B[3] = {4,5,6}; swap(A[[1]], B[1]); print A[[1]], B[1] ; A = list(1,2,3); mat B[3] = {4,5,6}; swap(A[[1]], B[1]); print A[[1]], B[1]
5 2 5 2
@@ -38,7 +38,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
assign assign
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -19,13 +19,15 @@ DESCRIPTION
POSIX system call and so this function will always return 0. POSIX system call and so this function will always return 0.
EXAMPLE EXAMPLE
; ## NOTE: Your output will likely vary:
The result for this example will depend on the speed of the CPU The result for this example will depend on the speed of the CPU
and precision of the operating CPU time accounting sub-system: and precision of the operating CPU time accounting sub-system:
; t = systime(); ; t = systime();
; system("true"), ; system("true"),
; systime() - t; ; systime() - t;
.001 0.001
LIMITS LIMITS
On non-POSIX based systems, this function always returns 0. On non-POSIX based systems, this function always returns 0.
@@ -36,7 +38,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
config, ctime, runtime, systime, time config, ctime, runtime, systime, time
## Copyright (C) 2006 Landon Curt Noll ## Copyright (C) 2006,2021 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

View File

@@ -18,7 +18,7 @@ DESCRIPTION
EXAMPLE EXAMPLE
; print tanh(1, 1e-5), tanh(1, 1e-10), tanh(1, 1e-15), tanh(1, 1e-20) ; print tanh(1, 1e-5), tanh(1, 1e-10), tanh(1, 1e-15), tanh(1, 1e-20)
.76159 .761594156 .761594155955765 .76159415595576488812 0.76159 0.761594156 0.761594155955765 0.76159415595576488812
LIMITS LIMITS
unlike sin and cos, x must be real unlike sin and cos, x must be real
@@ -30,7 +30,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
sinh, cosh, sech, csch, coth, epsilon sinh, cosh, sech, csch, coth, epsilon
## Copyright (C) 1999 Landon Curt Noll ## Copyright (C) 1999,2021 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

View File

@@ -127,7 +127,7 @@ The calc web site is located at:
http://www.isthe.com/chongo/tech/comp/calc/ http://www.isthe.com/chongo/tech/comp/calc/
NOTE: The Email address uses 'asthe', while the web site uses 'isthe'. NOTE: The Email address uses 'asthe', while the web site uses 'isthe'.
## Copyright (C) 1999-2007,2014,2021 Landon Curt Noll ## Copyright (C) 1999-2007,2014,2021 Landon Curt Noll
## ##

View File

@@ -17,8 +17,8 @@ DESCRIPTION
POSIX system call and so this function will always return 0. POSIX system call and so this function will always return 0.
EXAMPLE EXAMPLE
The result for this example will depend on the speed of the CPU ; ## The result for this example will depend on the speed of the CPU
and precision of the operating CPU time accounting sub-system: ; ## and precision of the operating CPU time accounting sub-system:
; t = usertime(); ; t = usertime();
; x = ptest(2^4253-1); ; x = ptest(2^4253-1);
@@ -34,7 +34,7 @@ LINK LIBRARY
SEE ALSO SEE ALSO
config, ctime, usertime, systime, time config, ctime, usertime, systime, time
## Copyright (C) 2006 Landon Curt Noll ## Copyright (C) 2006,2021 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

View File

@@ -20,8 +20,10 @@ DESCRIPTION
t is the literal character 't'. t is the literal character 't'.
EXAMPLE EXAMPLE
; ## NOTE: Your version will likely vary:
; version() ; version()
"2.11.5.4" "2.14.0.10"
LIMITS LIMITS
none none
@@ -30,7 +32,7 @@ LINK LIBRARY
none none
SEE ALSO SEE ALSO
n/a calclevel, calcpath, inputlevel
## Copyright (C) 2001,2021 Landon Curt Noll ## Copyright (C) 2001,2021 Landon Curt Noll
## ##

View File

@@ -213,7 +213,7 @@ The calc web site is located at:
http://www.isthe.com/chongo/tech/comp/calc/ http://www.isthe.com/chongo/tech/comp/calc/
NOTE: The Email address uses 'asthe', while the web site uses 'isthe'. NOTE: The Email address uses 'asthe', while the web site uses 'isthe'.
## Copyright (C) 1999,2014,2021 Landon Curt Noll ## Copyright (C) 1999,2014,2021 Landon Curt Noll
## ##