2
2
* Introduction to Miscellaneous Options::
4
4
* Definitions for Miscellaneous Options::
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
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.
14
@node SHARE, Definitions for Miscellaneous Options, Introduction to Miscellaneous Options, Miscellaneous Options
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);
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
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}.
20
@code{:lisp *maxima-sharedir*} displays the location of the share directory
21
within the user's file system.
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.
28
@node Definitions for Miscellaneous Options, , Share, Miscellaneous Options
28
29
@section Definitions for Miscellaneous Options
30
@c @unnumberedsec phony
32
default: [] atoms which have a user defined alias (set up by
33
the ALIAS, ORDERGREAT, ORDERLESS functions or by DECLAREing the atom a
39
@c @unnumberedsec phony
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.
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.
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
31
@defvr {System variable} aliases
32
Default value: @code{[]}
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}).
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{"~"}.
47
(%i1) declare ("~", alphabetic);
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_).
69
@c @unnumberedsec phony
71
returns a list of the args of exp. I.e. it is
72
essentially equivalent to
77
SUBSTPART depend on the setting of INFLAG.
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[!].
92
@c @unnumberedsec phony
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_}.
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.
77
The order of the items in the list may depend on the global flag @code{inflag}.
79
@code{args (@var{expr})} is equivalent to @code{substpart ("[", @var{expr}, 0)}.
80
See also @code{substpart}.
87
@defvr {Option variable} genindex
88
Default value: @code{i}
90
@code{genindex} is the alphabetic prefix used to generate the
95
91
next variable of summation when necessary.
99
@c @unnumberedsec phony
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.
107
@c @unnumberedsec phony
109
- real positive infinity.
113
@c @unnumberedsec phony
115
- complex infinity, an infinite magnitude of arbitrary phase
116
angle. (See also INF and MINF.)
120
@c @unnumberedsec phony
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
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
95
@defvr {Option variable} gensumnum
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.
104
@c NEEDS EXPANSION AND EXAMPLES
105
@defvr {Constant} inf
106
Real positive infinity.
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}.
117
@defvr {System variable} infolists
118
Default value: @code{[]}
120
@code{infolists} is a list of the names of all of the information
121
lists in Maxima. These are:
125
All bound @code{%i}, @code{%o}, and @code{%t} labels.
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 ??
131
All user-defined functions, created by @code{:=} or @code{define}.
133
All declared and undeclared arrays, created by @code{:}, @code{::}, or @code{:=}.
134
@c AREN'T THERE OTHER MEANS OF CREATING ARRAYS ??
136
All user-defined macro functions.
138
All options ever reset by the user (whether or not they
139
are later reset to their default values).
141
All user-defined pattern matching and simplification rules, created
142
by @code{tellsimp}, @code{tellsimpafter}, @code{defmatch}, or @code{defrule}.
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}
148
All atoms which have functional dependencies, created by the
149
@code{depends} or @code{gradef} functions.
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 ??
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.)
150
@c @unnumberedsec phony
151
@defun INTEGERP (exp)
152
is TRUE if exp is an integer else FALSE.
156
@c @unnumberedsec phony
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:
167
@deffn {Function} integerp (@var{expr})
168
Returns @code{true} if @var{expr} is a literal numeric integer, otherwise @code{false}.
170
@code{integerp} returns false if its argument is a symbol,
171
even if the argument is declared integer.
180
(%i3) integerp (-17);
182
(%i4) integerp (0.0);
184
(%i5) integerp (1.0);
186
(%i6) integerp (%pi);
190
(%i8) declare (n, integer);
198
@defvr {Option variable} m1pbranch
199
Default value: @code{false}
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:
205
@c REDRAW THIS AS A TABLE
166
210
(-1)^(1/4): (-1)^(1/4)
169
M1PBRANCH:FALSE(default) M1PBRANCH:TRUE
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
175
@c @unnumberedsec phony
177
is TRUE if exp is an integer, a rational number, a
178
floating point number or a bigfloat else FALSE.
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.
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.
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.
205
@c @unnumberedsec phony
207
associates with the atom a the property p with the
208
indicator i. This enables the user to give an atom any arbitrary
213
@c @unnumberedsec phony
214
@defun QPUT (a, p, i)
215
is similar to PUT but it doesn't have its arguments
220
@c @unnumberedsec phony
222
removes the property indicated by i from the atom a.
226
@c @unnumberedsec phony
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
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.
255
@c @unnumberedsec phony
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.
265
@c @unnumberedsec phony
266
@defun RNCOMBINE (exp)
267
transforms exp by combining all terms of exp that have
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}.
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},
227
even, odd, integer, rational, irrational, real, imaginary, or complex.
234
(%i2) numberp (-13/19);
236
(%i3) numberp (3.14159);
238
(%i4) numberp (-1729b-4);
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);
245
(%i7) map (numberp, [a, b, c, d, e, f, g, h]);
246
(%o7) [false, false, false, false, false, false, false, false]
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}.
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.
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.
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.
286
@code{put} evaluates its arguments.
287
@code{put} returns @var{value}.
292
(%i1) put (foo, (a+b)^5, expr);
295
(%i2) put (foo, "Hello", str);
297
(%i3) properties (foo);
298
(%o3) [[user properties, str, expr]]
299
(%i4) get (foo, expr);
302
(%i5) get (foo, str);
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.
319
(%i4) put (foo, bar, baz);
321
(%i5) properties (aa);
322
(%o5) [[user properties, cc]]
325
(%i7) qput (foo, bar, baz);
327
(%i8) properties (foo);
328
(%o8) [value, [user properties, baz]]
329
(%i9) get ('foo, 'baz);
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}.
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.
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}.
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.
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.
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.
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.
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.
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}.
386
@c IN SERIOUS NEED OF EXAMPLES HERE
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.
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).
399
See also @code{values}.
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.
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.
279
@c @unnumberedsec phony
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
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.
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
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.
426
@deffn {Function} setup_autoload (@var{filename}, @var{function_1}, ..., @var{function_n})
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.
433
@code{setup_autoload} does not work for array functions.
435
@code{setup_autoload} quotes its arguments.
318
SETUP_AUTOLOAD("bessel")$ J1(0.0); .
319
Note: SETUP_AUTOLOAD does not work for array functions.
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);
446
(%i1) legendre_p (1, %pi);
447
(%o1) legendre_p(1, %pi)
448
(%i2) setup_autoload ("specfun.mac", legendre_p, ultraspherical);
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
455
(%o3) ------------ + 3 (%pi - 1) + 1
457
(%i4) legendre_p (1, %pi);
459
(%i5) legendre_q (1, %pi);
463
(%o5) ---------------- - 1