mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Release calc version 2.12.4.2
This commit is contained in:
@@ -128,58 +128,72 @@ Using objects
|
||||
|
||||
The following is a list of the operations possible for objects.
|
||||
The 'xx' in each function name is replaced with the actual object
|
||||
type name. This table is displayed by the 'show objfuncs' command.
|
||||
type name. This table is displayed by the 'show objfunctions' command.
|
||||
|
||||
Name Args Comments
|
||||
|
||||
xx_print 1 print value, default prints elements
|
||||
xx_one 1 multiplicative identity, default is 1
|
||||
xx_test 1 logical test (false,true => 0,1),
|
||||
default tests elements
|
||||
xx_add 2
|
||||
xx_sub 2 subtraction, default adds negative
|
||||
xx_neg 1 negative
|
||||
xx_mul 2
|
||||
xx_div 2 non-integral division, default multiplies
|
||||
by inverse
|
||||
xx_inv 1 multiplicative inverse
|
||||
xx_abs 2 absolute value within given error
|
||||
xx_norm 1 square of absolute value
|
||||
xx_conj 1 conjugate
|
||||
xx_pow 2 integer power, default does multiply,
|
||||
square, inverse
|
||||
xx_sgn 1 sign of value (-1, 0, 1)
|
||||
xx_cmp 2 equality (equal,non-equal => 0,1),
|
||||
default tests elements
|
||||
xx_rel 2 inequality (less,equal,greater => -1,0,1)
|
||||
xx_quo 2 integer quotient
|
||||
xx_mod 2 remainder of division
|
||||
xx_int 1 integer part
|
||||
xx_frac 1 fractional part
|
||||
xx_inc 1 increment, default adds 1
|
||||
xx_dec 1 decrement, default subtracts 1
|
||||
xx_square 1 default multiplies by itself
|
||||
xx_scale 2 multiply by power of 2
|
||||
xx_shift 2 shift left by n bits (right if negative)
|
||||
xx_round 2 round to given number of decimal places
|
||||
xx_bround 2 round to given number of binary places
|
||||
xx_root 3 root of value within given error
|
||||
xx_sqrt 2 square root within given error
|
||||
xx_or 2 boolean or
|
||||
xx_and 2 boolean and
|
||||
xx_not 1 boolean not
|
||||
xx_fact 1 factorial
|
||||
|
||||
xx_print 1 print value, default prints elements
|
||||
xx_one 1 multiplicative identity, default is 1
|
||||
xx_test 1 logical test (false,true => 0,1), default tests elements
|
||||
xx_add 2
|
||||
xx_sub 2
|
||||
xx_neg 1 negative
|
||||
xx_mul 2
|
||||
xx_div 2 non-integral division
|
||||
xx_inv 1 multiplicative inverse
|
||||
xx_abs 2 absolute value within given error
|
||||
xx_norm 1 square of absolute value
|
||||
xx_conj 1 conjugate
|
||||
xx_pow 2 integer power, default does multiply, square, inverse
|
||||
xx_sgn 1 sign of value (-1, 0, 1)
|
||||
xx_cmp 2 equality (equal,nonequal => 0,1), default tests elements
|
||||
xx_rel 2 relative order, positive for >, etc.
|
||||
xx_quo 3 integer quotient
|
||||
xx_mod 3 remainder of division
|
||||
xx_int 1 integer part
|
||||
xx_frac 1 fractional part
|
||||
xx_inc 1 increment, default adds 1
|
||||
xx_dec 1 decrement, default subtracts 1
|
||||
xx_square 1 default multiplies by itself
|
||||
xx_scale 2 multiply by power of 2
|
||||
xx_shift 2 shift left by n bits (right if negative)
|
||||
xx_round 3 round to given number of decimal places
|
||||
xx_bround 3 round to given number of binary places
|
||||
xx_root 3 root of value within given error
|
||||
xx_sqrt 3 square root within given error
|
||||
xx_or 2 bitwise or
|
||||
xx_and 2 bitwise and
|
||||
xx_not 1 logical not
|
||||
xx_fact 1 factorial or postfix !
|
||||
xx_min 1 value for min(...)
|
||||
xx_max 1 value for max(...)
|
||||
xx_sum 1 value for sum(...)
|
||||
xx_assign 2 assign, defaults to a = b
|
||||
xx_xor 2 value for binary ~
|
||||
xx_comp 1 value for unary ~
|
||||
xx_content 1 unary hash op
|
||||
xx_hashop 2 binary hash op
|
||||
xx_backslash 1 unary backslash op
|
||||
xx_setminus 2 binary backslash op
|
||||
xx_plus 1 unary + op
|
||||
|
||||
Also see the standard resource files:
|
||||
|
||||
deg.cal
|
||||
dms.cal
|
||||
ellip.cal
|
||||
hms.cal
|
||||
mod.cal
|
||||
natnumset.cal
|
||||
poly.cal
|
||||
quat.cal
|
||||
regress.cal
|
||||
set8700.cal
|
||||
surd.cal
|
||||
test2300.cal
|
||||
test3100.cal
|
||||
|
||||
## Copyright (C) 1999 Landon Curt Noll
|
||||
## Copyright (C) 1999,2010 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
|
||||
@@ -195,8 +209,8 @@ Using objects
|
||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: obj.file,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Revision: 30.3 $
|
||||
## @(#) $Id: obj.file,v 30.3 2010/09/02 06:36:21 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/obj.file,v $
|
||||
##
|
||||
## Under source code control: 1991/07/21 04:37:22
|
||||
|
6
help/sgn
6
help/sgn
@@ -1,5 +1,5 @@
|
||||
NAME
|
||||
sign - indicator of sign of a real or complex number
|
||||
sgn - indicator of sign of a real or complex number
|
||||
|
||||
SYNOPSIS
|
||||
sgn(x)
|
||||
@@ -55,8 +55,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.
|
||||
##
|
||||
## @(#) $Revision: 30.1 $
|
||||
## @(#) $Id: sgn,v 30.1 2007/03/16 11:10:42 chongo Exp $
|
||||
## @(#) $Revision: 30.2 $
|
||||
## @(#) $Id: sgn,v 30.2 2008/05/10 13:23:57 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/sgn,v $
|
||||
##
|
||||
## Under source code control: 1995/10/25 04:03:46
|
||||
|
@@ -224,6 +224,12 @@ Unexpected
|
||||
|
||||
and increments x three times.
|
||||
|
||||
In an other example, this expression:
|
||||
|
||||
1<<8/2
|
||||
|
||||
evalues to 128, not 16, because <<8 is performed before the /2.
|
||||
|
||||
|
||||
&A[0] and A are different things in calc
|
||||
========================================
|
||||
@@ -414,8 +420,8 @@ Unexpected
|
||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
##
|
||||
## @(#) $Revision: 30.3 $
|
||||
## @(#) $Id: unexpected,v 30.3 2007/09/08 02:48:45 chongo Exp $
|
||||
## @(#) $Revision: 30.4 $
|
||||
## @(#) $Id: unexpected,v 30.4 2008/05/10 13:18:09 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/unexpected,v $
|
||||
##
|
||||
## Under source code control: 1997/03/21 13:15:18
|
||||
|
Reference in New Issue
Block a user