2 inverse - inverse of value
8 If x is an object of type xx, the function xx_inv has to have
9 been defined; any conditions on x and the nature of the returned
10 value will depend on the definition of xx_inv.
14 x nonzero number (real or complex) or nonsingular matrix
16 return number or matrix
19 For real or complex x, inverse(x) returns the value of 1/x.
21 If x is a nonsingular n x n matrix and its elements are numbers or
22 objects for which the required arithmetic operations are defined,
23 inverse(x) returns the matrix m for which m * x = x * m = the unit
24 n x n matrix. The inverse m will have the same index limits as x.
27 ; print inverse(5/4), inverse(-2/7), inverse(3 + 4i)
30 ; mat A[2,2] = {2,3,5,7}
33 mat [2,2] (4 elements, 4 nonzero):
43 void invertvalue(VALUE *x, VALUE *vres)
44 NUMBER *qinv(NUMBER *x)
45 COMPLEX *c_inv(COMPLEX *x)
46 MATRIX *matinv(MATRIX *x)
50 ## Copyright (C) 1999 Landon Curt Noll
52 ## Calc is open software; you can redistribute it and/or modify it under
53 ## the terms of the version 2.1 of the GNU Lesser General Public License
54 ## as published by the Free Software Foundation.
56 ## Calc is distributed in the hope that it will be useful, but WITHOUT
57 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
58 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
59 ## Public License for more details.
61 ## A copy of version 2.1 of the GNU Lesser General Public License is
62 ## distributed with calc under the filename COPYING-LGPL. You should have
63 ## received a copy with calc; if not, write to Free Software Foundation, Inc.
64 ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
66 ## @(#) $Revision: 30.1 $
67 ## @(#) $Id: inverse,v 30.1 2007/03/16 11:10:42 chongo Exp $
68 ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/inverse,v $
70 ## Under source code control: 1996/03/12 23:10:01
71 ## File existed as early as: 1996
73 ## chongo <was here> /\oo/\ http://www.isthe.com/chongo/
74 ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/