~ubuntu-branches/debian/squeeze/maxima/squeeze

« back to all changes in this revision

Viewing changes to doc/info/Miscellaneous.texi

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2006-10-18 14:52:42 UTC
  • mto: (1.1.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20061018145242-vzyrm5hmxr8kiosf
ImportĀ upstreamĀ versionĀ 5.10.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
@menu
2
2
* Introduction to Miscellaneous Options::  
3
 
* SHARE::                       
 
3
* Share::                       
4
4
* Definitions for Miscellaneous Options::  
5
5
@end menu
6
6
 
7
 
@node Introduction to Miscellaneous Options, SHARE, Miscellaneous Options, Miscellaneous Options
 
7
@node Introduction to Miscellaneous Options, Share, Miscellaneous Options, Miscellaneous Options
8
8
@section Introduction to Miscellaneous Options
9
9
 
10
10
In this section various options are discussed which have a global effect
11
 
on the operation of maxima.   Also various lists such as the list of all
 
11
on the operation of Maxima.   Also various lists such as the list of all
12
12
user defined functions, are discussed.
13
13
 
14
 
@node SHARE, Definitions for Miscellaneous Options, Introduction to Miscellaneous Options, Miscellaneous Options
15
 
@section SHARE
16
 
 - The SHARE directory on MC or on a DEC20 version of MACSYMA
17
 
contains programs, information files, etc.  which are considered to be
18
 
of interest to the MACSYMA community.  Most files on SHARE; are not
19
 
part of the MACSYMA system per se and must be loaded individually by
20
 
the user, e.g.  LOADFILE("array");. Many files on SHARE;
21
 
were contributed by MACSYMA users.  Do PRINTFILE(SHARE,USAGE,SHARE);
22
 
for more details and the conventions for contributing to the SHARE
23
 
directory.  For an annotated "table of contents" of the directory, do:
24
 
PRINTFILE(SHARE,>,SHARE);
25
 
 
26
 
@c end concepts Miscellaneous Options
27
 
@node Definitions for Miscellaneous Options,  , SHARE, Miscellaneous Options
 
14
@node Share, Definitions for Miscellaneous Options, Introduction to Miscellaneous Options, Miscellaneous Options
 
15
@section Share
 
16
The Maxima "share" directory contains programs and other files 
 
17
of interest to Maxima users, but not part of the core implementation of Maxima.
 
18
These programs are typically loaded via @code{load} or @code{setup_autoload}.
 
19
 
 
20
@code{:lisp *maxima-sharedir*} displays the location of the share directory
 
21
within the user's file system.
 
22
 
 
23
@c FIXME FIXME FIXME -- WE REALLY NEED AN UP-TO-DATE LIST OF SHARE PACKAGES !!
 
24
@code{printfile ("share.usg")} prints an out-of-date list of share packages.
 
25
Users may find it more informative to browse the share directory using a file system browser.
 
26
 
 
27
 
 
28
@node Definitions for Miscellaneous Options,  , Share, Miscellaneous Options
28
29
@section Definitions for Miscellaneous Options
29
 
@c @node ALIASES
30
 
@c @unnumberedsec phony
31
 
@defvar ALIASES
32
 
 default: [] atoms which have a user defined alias (set up by
33
 
the ALIAS, ORDERGREAT, ORDERLESS functions or by DECLAREing the atom a
34
 
NOUN).
35
 
@end defvar
36
 
 
37
 
 
38
 
@c @node ALLSYM
39
 
@c @unnumberedsec phony
40
 
@defvar ALLSYM
41
 
 default: [TRUE] - If TRUE then all indexed objects are assumed
42
 
symmetric in all of their covariant and contravariant indices. If
43
 
FALSE then no symmetries of any kind are assumed in these indices.
44
 
Derivative indices are always taken to be symmetric.
45
 
@end defvar
46
 
 
47
 
@c @node declaration
48
 
@c @unnumberedsec phony
49
 
@defvr declaration ALPHABETIC
50
 
Adds to MACSYMA's alphabet which initially contains
51
 
the letters A-Z, % and _.
52
 
Thus, DECLARE("~",ALPHABETIC) enables NEW~VALUE to be used as a name.
53
 
 
54
 
@end defvr
55
 
@c @node APROPOS
56
 
@c @unnumberedsec phony
57
 
@defun APROPOS (string)
58
 
takes a character string as argument and looks at all
59
 
the MACSYMA names for ones with that string appearing anywhere within
60
 
them.  Thus, APROPOS(EXP); will return a long list of all the flags
61
 
and functions which have EXP as part of their names, such as EXPAND,
62
 
EXP, EXPONENTIALIZE.  Thus if you can only remember part of the name
 
30
 
 
31
@defvr {System variable} aliases
 
32
Default value: @code{[]}
 
33
 
 
34
@code{aliases} is the list of atoms which have a user defined alias (set up by
 
35
the @code{alias}, @code{ordergreat}, @code{orderless} functions or by declaring the atom a
 
36
@code{noun} with @code{declare}).
 
37
@end defvr
 
38
 
 
39
 
 
40
@defvr {Declaration} alphabetic
 
41
@code{declare (@var{char}, alphabetic)} adds @code{char} to Maxima's alphabet,
 
42
which initially contains
 
43
the letters @code{A} through @code{Z}, @code{a} through @code{z}, @code{%} and @code{_}.
 
44
@var{char} is specified as a string of length 1, e.g., @code{"~"}.
 
45
 
 
46
@example
 
47
(%i1) declare ("~", alphabetic);
 
48
(%o1)                         done
 
49
(%i2) foo~bar;  
 
50
(%o2)                        foo~bar
 
51
(%i3) atom (foo~bar);
 
52
(%o3)                         true
 
53
@end example
 
54
 
 
55
@end defvr
 
56
 
 
57
@c REPHRASE
 
58
@c DOES apropos RETURN THE SAME THING AS THE LIST SHOWN BY describe ??
 
59
@deffn {Function} apropos (@var{string})
 
60
Searches for Maxima names which have @var{string} appearing anywhere within
 
61
them.  Thus, @code{apropos (exp)} returns a list of all the flags
 
62
and functions which have @code{exp} as part of their names, such as @code{expand},
 
63
@code{exp}, and @code{exponentialize}.  Thus if you can only remember part of the name
63
64
of something you can use this command to find the rest of the name.
64
 
Similarily, you could say APROPOS(TR_); to find a list of many of the
65
 
switches relating to the TRANSLATOR (most of which begin with TR_).
66
 
 
67
 
@end defun
68
 
@c @node ARGS
69
 
@c @unnumberedsec phony
70
 
@defun ARGS (exp)
71
 
returns a list of the args of exp.  I.e. it is
72
 
essentially equivalent to
73
 
@example
74
 
SUBSTPART("[",exp,0)
75
 
@end example
76
 
Both ARGS and
77
 
SUBSTPART depend on the setting of INFLAG.
78
 
 
79
 
@end defun
80
 
@c @node DUMMY
81
 
@c @unnumberedsec phony
82
 
@defun DUMMY (i1,i2,...)
83
 
will set each index i1,i2,... to name of the form !n
84
 
where n is a positive integer.  This guarantees that dummy indices
85
 
which are needed in forming expressions will not conflict with indices
86
 
already in use.  COUNTER[default 1] determines the numerical suffix to
87
 
be used in generating the next dummy index.  The prefix is determined
88
 
by the option DUMMYX[!].
89
 
 
90
 
@end defun
91
 
@c @node GENINDEX
92
 
@c @unnumberedsec phony
93
 
@defvar GENINDEX
94
 
 default: [I] is the alphabetic prefix used to generate the
 
65
Similarly, you could say @code{apropos (tr_)} to find a list of many of the
 
66
switches relating to the translator, most of which begin with @code{tr_}.
 
67
 
 
68
@end deffn
 
69
 
 
70
@deffn {Function} args (@var{expr})
 
71
Returns the list of arguments of @code{expr},
 
72
which may be any kind of expression other than an atom.
 
73
Only the arguments of the top-level operator are extracted;
 
74
subexpressions of @code{expr} appear as elements or subexpressions of elements
 
75
of the list of arguments.
 
76
 
 
77
The order of the items in the list may depend on the global flag @code{inflag}.
 
78
 
 
79
@code{args (@var{expr})} is equivalent to @code{substpart ("[", @var{expr}, 0)}.
 
80
See also @code{substpart}.
 
81
 
 
82
See also @code{op}.
 
83
 
 
84
@c NEEDS EXAMPLES
 
85
@end deffn
 
86
 
 
87
@defvr {Option variable} genindex
 
88
Default value: @code{i}
 
89
 
 
90
@code{genindex} is the alphabetic prefix used to generate the
95
91
next variable of summation when necessary.
96
92
 
97
 
@end defvar
98
 
@c @node GENSUMNUM
99
 
@c @unnumberedsec phony
100
 
@defvar GENSUMNUM
101
 
[0] is the numeric suffix used to generate the next variable
102
 
of summation.  If it is set to FALSE then the index will consist only
103
 
of GENINDEX with no numeric suffix.
104
 
 
105
 
@end defvar
106
 
@c @node INF
107
 
@c @unnumberedsec phony
108
 
@defvar INF
109
 
 - real positive infinity.
110
 
 
111
 
@end defvar
112
 
@c @node INFINITY
113
 
@c @unnumberedsec phony
114
 
@defvar INFINITY
115
 
 - complex infinity, an infinite magnitude of arbitrary phase
116
 
angle.  (See also INF and MINF.)
117
 
 
118
 
@end defvar
119
 
@c @node INFOLISTS
120
 
@c @unnumberedsec phony
121
 
@defvar INFOLISTS
122
 
 default: [] a list of the names of all of the information
123
 
lists in MACSYMA. These are:
124
 
LABELS - all bound C,D, and E labels.
125
 
VALUES - all bound atoms, i.e. user variables, not MACSYMA
126
 
Options or Switches, (set up by : , :: , or functional binding).
127
 
FUNCTIONS - all user defined functions (set up by f(x):=...).
128
 
ARRAYS - declared and undeclared arrays (set up by : , :: , or :=...)
129
 
MACROS - any Macros defined by the user.
130
 
MYOPTIONS - all options ever reset by the user (whether or not they
131
 
get reset to their default value).
132
 
RULES - user defined pattern matching and simplification rules (set up
133
 
by TELLSIMP, TELLSIMPAFTER, DEFMATCH, or, DEFRULE.)
134
 
ALIASES - atoms which have a user defined alias (set up by the ALIAS,
135
 
ORDERGREAT, ORDERLESS functions or by DECLAREing the atom a NOUN).
136
 
DEPENDENCIES - atoms which have functional dependencies (set up by the
137
 
DEPENDS or GRADEF functions).
138
 
GRADEFS - functions which have user defined derivatives (set up by the
139
 
GRADEF function).
140
 
PROPS - atoms which have any property other than those mentioned
141
 
above, such as atvalues, matchdeclares, etc.  as well as properties
142
 
specified in the DECLARE function.
143
 
LET_RULE_PACKAGES - a list of all the user-defined let rule packages
144
 
plus the special package DEFAULT_LET_RULE_PACKAGE.
145
 
(DEFAULT_LET_RULE_PACKAGE is the name of the rule package used when
 
93
@end defvr
 
94
 
 
95
@defvr {Option variable} gensumnum
 
96
Default value: 0
 
97
 
 
98
@code{gensumnum} is the numeric suffix used to generate the next variable
 
99
of summation.  If it is set to @code{false} then the index will consist only
 
100
of @code{genindex} with no numeric suffix.
 
101
 
 
102
@end defvr
 
103
 
 
104
@c NEEDS EXPANSION AND EXAMPLES
 
105
@defvr {Constant} inf
 
106
Real positive infinity.
 
107
 
 
108
@end defvr
 
109
 
 
110
@c NEEDS EXPANSION AND EXAMPLES
 
111
@defvr {Constant} infinity
 
112
Complex infinity, an infinite magnitude of arbitrary phase
 
113
angle.  See also @code{inf} and @code{minf}.
 
114
 
 
115
@end defvr
 
116
 
 
117
@defvr {System variable} infolists
 
118
Default value: @code{[]}
 
119
 
 
120
@code{infolists} is a list of the names of all of the information
 
121
lists in Maxima. These are:
 
122
 
 
123
@table @code
 
124
@item labels
 
125
All bound @code{%i}, @code{%o}, and @code{%t} labels.
 
126
@item values
 
127
All bound atoms which are user variables, not Maxima
 
128
options or switches, created by @code{:} or @code{::} or functional binding.
 
129
@c WHAT IS INTENDED BY "FUNCTIONAL BINDING" HERE ??
 
130
@item functions
 
131
All user-defined functions, created by @code{:=} or @code{define}.
 
132
@item arrays
 
133
All declared and undeclared arrays, created by @code{:}, @code{::}, or @code{:=}.
 
134
@c AREN'T THERE OTHER MEANS OF CREATING ARRAYS ??
 
135
@item macros
 
136
All user-defined macro functions.
 
137
@item myoptions
 
138
All options ever reset by the user (whether or not they
 
139
are later reset to their default values).
 
140
@item rules
 
141
All user-defined pattern matching and simplification rules, created
 
142
by @code{tellsimp}, @code{tellsimpafter}, @code{defmatch}, or @code{defrule}.
 
143
@item aliases
 
144
All atoms which have a user-defined alias, created by the @code{alias},
 
145
@code{ordergreat}, @code{orderless} functions or by declaring the atom as a @code{noun}
 
146
with @code{declare}.
 
147
@item dependencies
 
148
All atoms which have functional dependencies, created by the
 
149
@code{depends} or @code{gradef} functions.
 
150
@item gradefs
 
151
All functions which have user-defined derivatives, created by the
 
152
@code{gradef} function.
 
153
@c UMM, WE REALLY NEED TO BE SPECIFIC -- WHAT DOES "ETC" CONTAIN HERE ??
 
154
@item props
 
155
All atoms which have any property other than those mentioned
 
156
above, such as properties established by @code{atvalue} or @code{matchdeclare}, etc.,
 
157
as well as properties established in the @code{declare} function.
 
158
@item let_rule_packages
 
159
All user-defined @code{let} rule packages
 
160
plus the special package @code{default_let_rule_package}.
 
161
(@code{default_let_rule_package} is the name of the rule package used when
146
162
one is not explicitly set by the user.)
147
 
 
148
 
@end defvar
149
 
@c @node INTEGERP
150
 
@c @unnumberedsec phony
151
 
@defun INTEGERP (exp)
152
 
is TRUE if exp is an integer else FALSE.
153
 
 
154
 
@end defun
155
 
@c @node M1PBRANCH
156
 
@c @unnumberedsec phony
157
 
@defvar M1PBRANCH
158
 
 default: [FALSE] - "principal branch for -1 to a power".
159
 
Quantities such as (-1)^(1/3) [i.e. "odd" rational exponent] and 
160
 
(-1)^(1/4) [i.e. "even" rational exponent] are now handled as 
161
 
indicated in the following chart: 
162
 
@example
163
 
             DOMAIN:REAL(default)   
 
163
@end table
 
164
 
 
165
@end defvr
 
166
 
 
167
@deffn {Function} integerp (@var{expr})
 
168
Returns @code{true} if @var{expr} is a literal numeric integer, otherwise @code{false}.
 
169
 
 
170
@code{integerp} returns false if its argument is a symbol,
 
171
even if the argument is declared integer.
 
172
 
 
173
Examples:
 
174
 
 
175
@example
 
176
(%i1) integerp (0);
 
177
(%o1)                         true
 
178
(%i2) integerp (1);
 
179
(%o2)                         true
 
180
(%i3) integerp (-17);
 
181
(%o3)                         true
 
182
(%i4) integerp (0.0);
 
183
(%o4)                         false
 
184
(%i5) integerp (1.0);
 
185
(%o5)                         false
 
186
(%i6) integerp (%pi);
 
187
(%o6)                         false
 
188
(%i7) integerp (n);
 
189
(%o7)                         false
 
190
(%i8) declare (n, integer);
 
191
(%o8)                         done
 
192
(%i9) integerp (n);
 
193
(%o9)                         false
 
194
@end example
 
195
 
 
196
@end deffn
 
197
 
 
198
@defvr {Option variable} m1pbranch
 
199
Default value: @code{false}
 
200
 
 
201
@code{m1pbranch} is the principal branch for @code{-1} to a power.
 
202
Quantities such as @code{(-1)^(1/3)} (that is, an "odd" rational exponent) and 
 
203
@code{(-1)^(1/4)} (that is, an "even" rational exponent) are handled as follows:
 
204
 
 
205
@c REDRAW THIS AS A TABLE
 
206
@example
 
207
              domain:real
164
208
                            
165
209
(-1)^(1/3):      -1         
166
210
(-1)^(1/4):   (-1)^(1/4)   
167
211
 
168
 
                DOMAIN:COMPLEX              
169
 
M1PBRANCH:FALSE(default)   M1PBRANCH:TRUE
 
212
             domain:complex              
 
213
m1pbranch:false          m1pbranch:true
170
214
(-1)^(1/3)               1/2+%i*sqrt(3)/2
171
215
(-1)^(1/4)              sqrt(2)/2+%i*sqrt(2)/2
172
216
@end example
173
 
@end defvar
174
 
@c @node NUMBERP
175
 
@c @unnumberedsec phony
176
 
@defun NUMBERP (exp)
177
 
is TRUE if exp is an integer, a rational number, a
178
 
floating point number or a bigfloat else FALSE.
179
 
 
180
 
@end defun
181
 
@c @node PROPERTIES
182
 
@c @unnumberedsec phony
183
 
@defun PROPERTIES (a)
184
 
will yield a list showing the names of all the
185
 
properties associated with the atom a.
186
 
 
187
 
@end defun
188
 
@c @node PROPS
189
 
@c @unnumberedsec phony
190
 
@defvr {special symbol} PROPS
191
 
 - atoms which have any property other than those explicitly
192
 
mentioned in INFOLISTS, such as atvalues, matchdeclares, etc. as well
193
 
as properties specified in the DECLARE function.
194
 
 
195
 
@end defvr
196
 
@c @node PROPVARS
197
 
@c @unnumberedsec phony
198
 
@defun PROPVARS (prop)
199
 
yields a list of those atoms on the PROPS list which
200
 
have the property indicated by prop.  Thus PROPVARS(ATVALUE) will
201
 
yield a list of atoms which have atvalues.
202
 
 
203
 
@end defun
204
 
@c @node PUT
205
 
@c @unnumberedsec phony
206
 
@defun PUT (a, p, i)
207
 
associates with the atom a the property p with the
208
 
indicator i.  This enables the user to give an atom any arbitrary
209
 
property.
210
 
 
211
 
@end defun
212
 
@c @node QPUT
213
 
@c @unnumberedsec phony
214
 
@defun QPUT (a, p, i)
215
 
is similar to PUT but it doesn't have its arguments
216
 
evaluated.
217
 
 
218
 
@end defun
219
 
@c @node REM
220
 
@c @unnumberedsec phony
221
 
@defun REM (a, i)
222
 
removes the property indicated by i from the atom a.
223
 
 
224
 
@end defun
225
 
@c @node REMOVE
226
 
@c @unnumberedsec phony
227
 
@defun REMOVE (args)
228
 
will remove some or all of the properties associated
229
 
with variables or functions.
230
 
REMOVE(a1, p1, a2, p2, ...)  removes the property pi from the atom ai.
231
 
Ai and pi may also be lists as with DECLARE.  Pi may be any property
232
 
e.g.  FUNCTION, MODE_DECLARE, etc.  It may also be TRANSFUN implying
233
 
that the translated LISP version of the function is to be removed.
234
 
This is useful if one wishes to have the MACSYMA version of the
235
 
function executed rather than the translated version. Pi may also be
236
 
OP or OPERATOR to remove a syntax extension given to ai (see Appendix
237
 
II).  If ai is "ALL" then the property indicated by pi is removed from
238
 
all atoms which have it.  Unlike the more specific remove functions
239
 
(REMVALUE, REMARRAY, REMFUNCTION, and REMRULE) REMOVE does not
240
 
indicate when a given property is non-existent; it always returns
241
 
"DONE".
242
 
 
243
 
@end defun
244
 
@c @node REMVALUE
245
 
@c @unnumberedsec phony
246
 
@defun REMVALUE (name1, name2, ...)
247
 
removes the values of user variables
248
 
(which can be subscripted) from the system.  If name is ALL then the
249
 
values of all user variables are removed.  Values are those items
250
 
given names by the user as opposed to those which are automatically
251
 
labeled by MACSYMA as Ci, Di, or Ei.
252
 
 
253
 
@end defun
254
 
@c @node RENAME
255
 
@c @unnumberedsec phony
256
 
@defun RENAME (exp)
257
 
returns an expression equivalent to exp but with the
258
 
dummy indices in each term chosen from the set [!1,!2,...].  Each
259
 
dummy index in a product will be different; for a sum RENAME will try
260
 
to make each dummy index in a sum the same.  In addition, the indices
261
 
will be sorted alphanumerically.
262
 
 
263
 
@end defun
264
 
@c @node RNCOMBINE
265
 
@c @unnumberedsec phony
266
 
@defun RNCOMBINE (exp)
267
 
transforms exp by combining all terms of exp that have
 
217
 
 
218
@end defvr
 
219
 
 
220
@deffn {Function} numberp (@var{expr})
 
221
Returns @code{true} if @var{expr} is a literal integer, rational number, 
 
222
floating point number, or bigfloat, otherwise @code{false}.
 
223
 
 
224
@code{numberp} returns false if its argument is a symbol,
 
225
even if the argument is a symbolic number such as @code{%pi} or @code{%i},
 
226
or declared to be 
 
227
even, odd, integer, rational, irrational, real, imaginary, or complex.
 
228
 
 
229
Examples:
 
230
 
 
231
@example
 
232
(%i1) numberp (42);
 
233
(%o1)                         true
 
234
(%i2) numberp (-13/19);
 
235
(%o2)                         true
 
236
(%i3) numberp (3.14159);
 
237
(%o3)                         true
 
238
(%i4) numberp (-1729b-4);
 
239
(%o4)                         true
 
240
(%i5) map (numberp, [%e, %pi, %i, %phi, inf, minf]);
 
241
(%o5)      [false, false, false, false, false, false]
 
242
(%i6) declare (a, even, b, odd, c, integer, d, rational,
 
243
     e, irrational, f, real, g, imaginary, h, complex);
 
244
(%o6)                         done
 
245
(%i7) map (numberp, [a, b, c, d, e, f, g, h]);
 
246
(%o7) [false, false, false, false, false, false, false, false]
 
247
@end example
 
248
 
 
249
@end deffn
 
250
 
 
251
@c CROSS REF TO WHICH FUNCTION OR FUNCTIONS ESTABLISH PROPERTIES !! (VERY IMPORTANT)
 
252
@c NEEDS EXPANSION, CLARIFICATION, AND EXAMPLES
 
253
@deffn {Function} properties (@var{a})
 
254
Returns a list of the names of all the
 
255
properties associated with the atom @var{a}.
 
256
 
 
257
@end deffn
 
258
 
 
259
@c CROSS REF TO WHICH FUNCTION OR FUNCTIONS ESTABLISH PROPERTIES !! (VERY IMPORTANT)
 
260
@c NEEDS EXPANSION, CLARIFICATION, AND EXAMPLES
 
261
@c WHAT IS HIDDEN IN THE "etc" HERE ??
 
262
@defvr {Special symbol} props
 
263
@code{props} are atoms which have any property other than those explicitly
 
264
mentioned in @code{infolists}, such as atvalues, matchdeclares, etc., as well
 
265
as properties specified in the @code{declare} function.
 
266
 
 
267
@end defvr
 
268
 
 
269
@c CROSS REF TO WHICH FUNCTION OR FUNCTIONS ESTABLISH PROPERTIES !! (VERY IMPORTANT)
 
270
@c NEEDS EXPANSION, CLARIFICATION, AND EXAMPLES
 
271
@deffn {Function} propvars (@var{prop})
 
272
Returns a list of those atoms on the @code{props} list which
 
273
have the property indicated by @var{prop}.  Thus @code{propvars (atvalue)}
 
274
returns a list of atoms which have atvalues.
 
275
 
 
276
@end deffn
 
277
 
 
278
@c CROSS REF TO OTHER FUNCTIONS WHICH PUT/GET PROPERTIES !! (VERY IMPORTANT)
 
279
@c NEEDS EXPANSION, CLARIFICATION, AND EXAMPLES
 
280
@c ARE PROPERTIES ESTABLISHED BY put THE SAME AS PROPERTIES ESTABLISHED BY declare OR OTHER FUNCTIONS ??
 
281
@c IS put (foo, true, integer) EQUIVALENT TO declare (foo, integer) FOR EXAMPLE ??
 
282
@deffn {Function} put (@var{atom}, @var{value}, @var{indicator})
 
283
Assigns @var{value} to the property (specified by @var{indicator}) of @var{atom}.
 
284
@var{indicator} may be the name of any property, not just a system-defined property.
 
285
 
 
286
@code{put} evaluates its arguments. 
 
287
@code{put} returns @var{value}.
 
288
 
 
289
Examples:
 
290
 
 
291
@example
 
292
(%i1) put (foo, (a+b)^5, expr);
 
293
                                   5
 
294
(%o1)                       (b + a)
 
295
(%i2) put (foo, "Hello", str);
 
296
(%o2)                         Hello
 
297
(%i3) properties (foo);
 
298
(%o3)            [[user properties, str, expr]]
 
299
(%i4) get (foo, expr);
 
300
                                   5
 
301
(%o4)                       (b + a)
 
302
(%i5) get (foo, str);
 
303
(%o5)                         Hello
 
304
@end example
 
305
 
 
306
@end deffn
 
307
 
 
308
@deffn {Function} qput (@var{atom}, @var{value}, @var{indicator})
 
309
Assigns @var{value} to the property (specified by @var{indicator}) of @var{atom}.
 
310
This is the same as @code{put},
 
311
except that the arguments are quoted.
 
312
 
 
313
Example:
 
314
 
 
315
@example
 
316
(%i1) foo: aa$ 
 
317
(%i2) bar: bb$
 
318
(%i3) baz: cc$
 
319
(%i4) put (foo, bar, baz);
 
320
(%o4)                          bb
 
321
(%i5) properties (aa);
 
322
(%o5)                [[user properties, cc]]
 
323
(%i6) get (aa, cc);
 
324
(%o6)                          bb
 
325
(%i7) qput (foo, bar, baz);
 
326
(%o7)                          bar
 
327
(%i8) properties (foo);
 
328
(%o8)            [value, [user properties, baz]]
 
329
(%i9) get ('foo, 'baz);
 
330
(%o9)                          bar
 
331
@end example
 
332
 
 
333
@end deffn
 
334
 
 
335
@c CROSS REF TO OTHER FUNCTIONS WHICH PUT/GET PROPERTIES !! (VERY IMPORTANT)
 
336
@c NEEDS EXPANSION, CLARIFICATION, AND EXAMPLES
 
337
@c HOW DOES THIS INTERACT WITH declare OR OTHER PROPERTY-ESTABLISHING FUNCTIONS ??
 
338
@c HOW IS THIS DIFFERENT FROM remove ??
 
339
@deffn {Function} rem (@var{atom}, @var{indicator})
 
340
Removes the property indicated by @var{indicator} from @var{atom}.
 
341
 
 
342
@end deffn
 
343
 
 
344
@c CROSS REF TO OTHER FUNCTIONS WHICH PUT/GET PROPERTIES !! (VERY IMPORTANT)
 
345
@c NEEDS EXPANSION, CLARIFICATION, AND EXAMPLES
 
346
@c HOW DOES THIS INTERACT WITH declare OR OTHER PROPERTY-ESTABLISHING FUNCTIONS ??
 
347
@c HOW IS THIS DIFFERENT FROM rem ??
 
348
@deffn {Function} remove (@var{a_1}, @var{p_1}, ..., @var{a_n}, @var{p_n})
 
349
@deffnx {Function} remove ([@var{a_1}, ..., @var{a_m}], [@var{p_1}, ..., @var{p_n}], ...)
 
350
@deffnx {Function} remove ("@var{a}", operator)
 
351
@deffnx {Function} remove (@var{a}, transfun)
 
352
@deffnx {Function} remove (all, @var{p})
 
353
Removes properties associated with atoms.
 
354
 
 
355
@code{remove (@var{a_1}, @var{p_1}, ..., @var{a_n}, @var{p_n})}
 
356
removes property @code{p_k} from atom @code{a_k}.
 
357
 
 
358
@code{remove ([@var{a_1}, ..., @var{a_m}], [@var{p_1}, ..., @var{p_n}], ...)}
 
359
removes properties @code{@var{p_1}, ..., @var{p_n}}
 
360
from atoms @var{a_1}, ..., @var{a_m}.
 
361
There may be more than one pair of lists.
 
362
 
 
363
@c VERIFY THAT THIS WORKS AS ADVERTISED
 
364
@code{remove (all, @var{p})} removes the property @var{p} from all atoms which have it.
 
365
 
 
366
@c SHOULD REFER TO A LIST OF ALL SYSTEM-DEFINED PROPERTIES HERE.
 
367
The removed properties may be system-defined properties such as
 
368
@code{function}, @code{macro}, or @code{mode_declare}, or user-defined properties.
 
369
 
 
370
@c VERIFY THAT THIS WORKS AS ADVERTISED
 
371
@c IS transfun PECULIAR TO remove ?? IF SO, SHOW SPECIAL CASE AS @defunx
 
372
A property may be @code{transfun} to remove
 
373
the translated Lisp version of a function.
 
374
After executing this, the Maxima version of the function is executed
 
375
rather than the translated version.
 
376
 
 
377
@code{remove ("@var{a}", operator)} or, equivalently, @code{remove ("@var{a}", op)}
 
378
removes from @var{a} the operator properties declared by
 
379
@code{prefix}, @code{infix}, @code{nary}, @code{postfix}, @code{matchfix}, or @code{nofix}.
 
380
Note that the name of the operator must be written as a quoted string.
 
381
 
 
382
@code{remove} always returns @code{done} whether or not an atom has a specified property.
 
383
This behavior is unlike the more specific remove functions
 
384
@code{remvalue}, @code{remarray}, @code{remfunction}, and @code{remrule}.
 
385
 
 
386
@c IN SERIOUS NEED OF EXAMPLES HERE
 
387
@end deffn
 
388
 
 
389
@c NEEDS EXAMPLES
 
390
@deffn {Function} remvalue (@var{name_1}, ..., @var{name_n})
 
391
@deffnx {Function} remvalue (all)
 
392
Removes the values of user variables @var{name_1}, ..., @var{name_n}
 
393
(which can be subscripted) from the system.
 
394
 
 
395
@code{remvalue (all)} removes the values of all variables in @code{values},
 
396
the list of all variables given names by the user
 
397
(as opposed to those which are automatically assigned by Maxima).
 
398
 
 
399
See also @code{values}.
 
400
 
 
401
@end deffn
 
402
 
 
403
@c NEEDS EXAMPLES
 
404
@deffn {Function} rncombine (@var{expr})
 
405
Transforms @var{expr} by combining all terms of @var{expr} that have
268
406
identical denominators or denominators that differ from each other by
269
407
numerical factors only.  This is slightly different from the behavior
270
 
of COMBINE, which collects terms that have identical denominators.
271
 
Setting PFEFORMAT:TRUE and using COMBINE will achieve results similar
272
 
to those that can be obtained with RNCOMBINE, but RNCOMBINE takes the
 
408
of @code{combine}, which collects terms that have identical denominators.
 
409
 
 
410
Setting @code{pfeformat: true} and using @code{combine} yields results similar
 
411
to those that can be obtained with @code{rncombine}, but @code{rncombine} takes the
273
412
additional step of cross-multiplying numerical denominator factors.
274
 
This results in neater forms, and the possiblity of recognizing some
275
 
cancellations.  Bugs to ASB.
276
 
 
277
 
@end defun
278
 
@c @node SCALARP
279
 
@c @unnumberedsec phony
280
 
@defun SCALARP (exp)
281
 
is TRUE if exp is a number, constant, or variable
282
 
DECLAREd SCALAR, or composed entirely of numbers, constants, and such
 
413
This results in neater forms, and the possibility of recognizing some
 
414
cancellations.
 
415
 
 
416
@end deffn
 
417
 
 
418
@c NEEDS CLARIFICATION AND EXAMPLES
 
419
@deffn {Function} scalarp (@var{expr})
 
420
Returns @code{true} if @var{expr} is a number, constant, or variable
 
421
declared @code{scalar} with @code{declare}, or composed entirely of numbers, constants, and such
283
422
variables, but not containing matrices or lists.
284
423
 
285
 
@end defun
286
 
@c @node SCALEFACTORS
287
 
@c @unnumberedsec phony
288
 
@defun SCALEFACTORS (coordinatetransform)
289
 
Here coordinatetransform
290
 
evaluates to the form [[expression1, expression2, ...],
291
 
indeterminate1, indeterminat2, ...], where indeterminate1,
292
 
indeterminate2, etc. are the curvilinear coordinate variables and
293
 
where a set of rectangular Cartesian components is given in terms of
294
 
the curvilinear coordinates by [expression1, expression2, ...].
295
 
COORDINATES is set to the vector [indeterminate1, indeterminate2,...],
296
 
and DIMENSION is set to the length of this vector.  SF[1], SF[2],
297
 
..., SF[DIMENSION] are set to the coordinate scale factors, and SFPROD
298
 
is set to the product of these scale factors.  Initially, COORDINATES
299
 
is [X, Y, Z], DIMENSION is 3, and SF[1]=SF[2]=SF[3]=SFPROD=1,
300
 
corresponding to 3-dimensional rectangular Cartesian coordinates.
301
 
To expand an expression into physical components in the current
302
 
coordinate system, there is a function with usage of the form
303
 
 
304
 
@end defun
305
 
@c @node SETUP_AUTOLOAD
306
 
@c @unnumberedsec phony
307
 
@defun SETUP_AUTOLOAD (file,func1,...,funcN)
308
 
which takes two or more
309
 
arguments: a file specification, and one or more function names,
310
 
"funcI", and which indicates that if a call to "funcI" is made and
311
 
"funcI" is not defined, that the file specified by "file" is to be
312
 
automatically loaded in via LOAD, which file should contain a
313
 
definition for "funcI".  (This is the process by which calling e.g.
314
 
INTEGRATE in a fresh MACSYMA causes various files to be loaded in.)
315
 
As with the other file-handling commands in MACSYMA, the arguments to
316
 
SETUP_AUTOLOAD are not evaluated.
 
424
@end deffn
 
425
 
 
426
@deffn {Function} setup_autoload (@var{filename}, @var{function_1}, ..., @var{function_n})
 
427
Specifies that
 
428
if any of @var{function_1}, ..., @var{function_n} are referenced and not yet defined,
 
429
@var{filename} is loaded via @code{load}.
 
430
@var{filename} usually contains definitions for the functions specified,
 
431
although that is not enforced.
 
432
 
 
433
@code{setup_autoload} does not work for array functions.
 
434
 
 
435
@code{setup_autoload} quotes its arguments.
 
436
 
317
437
Example:
318
 
SETUP_AUTOLOAD("bessel")$ J1(0.0); .
319
 
Note: SETUP_AUTOLOAD does not work for array functions.
320
 
 
321
 
@end defun
 
438
 
 
439
@c EXAMPLE GENERATED FROM FOLLOWING INPUT
 
440
@c legendre_p (1, %pi);
 
441
@c setup_autoload ("specfun.mac", legendre_p, ultraspherical);
 
442
@c ultraspherical (2, 1/2, %pi);
 
443
@c legendre_p (1, %pi);
 
444
@c legendre_q (1, %pi);
 
445
@example
 
446
(%i1) legendre_p (1, %pi);
 
447
(%o1)                  legendre_p(1, %pi)
 
448
(%i2) setup_autoload ("specfun.mac", legendre_p, ultraspherical);
 
449
(%o2)                         done
 
450
(%i3) ultraspherical (2, 1/2, %pi);
 
451
Warning - you are redefining the Macsyma function ultraspherical
 
452
Warning - you are redefining the Macsyma function legendre_p
 
453
                            2
 
454
                 3 (%pi - 1)
 
455
(%o3)            ------------ + 3 (%pi - 1) + 1
 
456
                      2
 
457
(%i4) legendre_p (1, %pi);
 
458
(%o4)                          %pi
 
459
(%i5) legendre_q (1, %pi);
 
460
                              %pi + 1
 
461
                      %pi log(-------)
 
462
                              1 - %pi
 
463
(%o5)                 ---------------- - 1
 
464
                             2
 
465
@end example
 
466
 
 
467
@end deffn