6 This chapter provides detailed information about the meaning of some error messages
7 or on how to recover from errors.
8 @node Error messages, Warning messages,,Error and warning messages
9 @section Error messages
11 * No such list element::
12 * argument must be a non-atomic expression::
13 * cannot assign to function::
14 * 0 to a negative exponent::
15 * Comma is not a prefix operator::
16 * Illegal use of delimiter::
17 * loadfile failed to load::
18 * makelist second argument must evaluate to a number::
19 * Only symbols can be bound::
20 * Operators of arguments must all be the same::
22 * part fell off the end::
23 * undefined variable during plotting::
24 * VTK is not installed::
28 @node No such list element, argument must be a non-atomic expression, Error messages, Error messages
29 @subsection apply: no such "list" element
30 One common cause for this error message is that square brackets operator
31 (@code{[ ]}) was used trying to access a list element that whose element
32 number was @code{< 1} or @code{> length(list)}.
33 @opencatbox{Categories:}
34 @category{Error messages}
38 @node argument must be a non-atomic expression, cannot assign to function, No such list element, Error messages
39 @subsection argument must be a non-atomic expression
40 This normally means that a list, a set or something else that consists of more than one
41 element was expected. One possible cause for this error message is a construct of the
54 append: argument must be a non-atomic expression; found 4
55 -- an error. To debug this try: debugmode(true);
58 The correct way to append variables or numbers to a list is to wrap them in a
59 single-element list first:
75 @opencatbox{Categories:}
76 @category{Error messages}
80 @node cannot assign to function, 0 to a negative exponent, argument must be a non-atomic expression, Error messages
81 @subsection assignment: cannot assign to @code{<function name>}
82 Maxima supports several assignment operators. When trying to define a function
83 @code{:=} has to be used.
84 @opencatbox{Categories:}
85 @category{Error messages}
89 @node 0 to a negative exponent, Comma is not a prefix operator, cannot assign to function, Error messages
90 @subsection expt: undefined: 0 to a negative exponent.
91 This message notifies about a classical division by zero error.
92 @opencatbox{Categories:}
93 @category{Error messages}
97 @node Comma is not a prefix operator, Illegal use of delimiter, 0 to a negative exponent, Error messages
98 @subsection incorrect syntax: , is not a prefix operator
99 This might be caused by a command starting with a comma (@code{,}) or by one comma
100 being directly followed by another one..
101 @opencatbox{Categories:}
102 @category{Error messages}
106 @node Illegal use of delimiter, loadfile failed to load, Comma is not a prefix operator, Error messages
107 @subsection incorrect syntax: Illegal use of delimiter )
108 Common reasons for this error appearing are a closing parenthesis without an
109 opening one or a closing parenthesis directly preceded by a comma.
110 @opencatbox{Categories:}
111 @category{Error messages}
115 @node loadfile failed to load, makelist second argument must evaluate to a number, Illegal use of delimiter, Error messages
116 @subsection loadfile: failed to load @code{<filename>}
117 This error message normally indicates that the file exists, but can not be read.
118 If the file is present and readable there is another possible for this error
119 message: Maxima can compile packages to native binary files in order to make them
120 run faster. If after compiling the file something in the system has changed in a
121 way that makes it incompatible with the binary the binary the file cannot be
122 loaded any more. Maxima normally puts binary files it creates from its own packages
123 in a folder named @code{binary} within the folder whose name it is printed after
130 (%i1) maxima_userdir;
131 (%o1) /home/gunter/.maxima
134 If this directory is missing maxima will recreate it again as soon as it has to
136 @opencatbox{Categories:}
137 @category{Error messages}
141 @node makelist second argument must evaluate to a number, Only symbols can be bound, loadfile failed to load, Error messages
142 @subsection makelist: second argument must evaluate to a number
143 @code{makelist} expects the second argument to be the name of the variable whose value is to
144 be stepped. This time instead of the name of a still-undefined variable maxima has found
145 something else, possibly a list or the name of a list.
147 @opencatbox{Categories:}
148 @category{Error messages}
152 @node Only symbols can be bound, Operators of arguments must all be the same, makelist second argument must evaluate to a number, Error messages
153 @subsection Only symbols can be bound
154 The most probable cause for this error is that there was an attempt to either
155 use a number or a variable whose numerical value is known as a loop
157 @opencatbox{Categories:}
158 @category{Error messages}
162 @node Operators of arguments must all be the same, out of memory, Only symbols can be bound, Error messages
163 @subsection operators of arguments must all be the same
164 One possible reason for this error message to appear is a try to use @mref{append} in order
165 to add an equation to a list:
172 (%i1) l:[a=1,b=2,c=3];
173 (%o1) [a = 1, b = 2, c = 3]
177 append: operators of arguments must all be the same.
178 -- an error. To debug this try: debugmode(true);
181 In order to add an equation to a list it has to be wrapped in a
182 single-element list first:
189 (%i1) l:[a=1,b=2,c=3];
190 (%o1) [a = 1, b = 2, c = 3]
193 (%i2) append(l,[d=5]);
194 (%o2) [a = 1, b = 2, c = 3, d = 5]
199 @opencatbox{Categories:}
200 @category{Error messages}
204 @node out of memory, part fell off the end, Operators of arguments must all be the same, Error messages
205 @subsection Out of memory
206 Lisp typically handles several types of memory containing at least one stack
207 and a heap that contains user objects. To avoid running out of memory several
208 approaches might be useful:
210 @item If possible, the best solution normally is to use an algorithm that is
211 more memory-efficient.
212 @item Compiling a function might drastically reduce the amount of memory it
214 @item Arrays of a fixed type might be more memory-efficient than lists.
215 @item If maxima is run by sbcl sbcl's memory limit might be set to a value
216 that is too low to solve the current problem. In this case the
217 command-line option @code{--dynamic-space-size <n>} allows to tell
218 sbcl to reserve @code{n} megabytes for the heap. It is to note, though,
219 that sbcl has to handle several distinct types of memory and therefore
220 might be able to only reserve about half of the available physical
221 memory. Also note that 32-bit processes might only be able to access
222 2GB of physical memory.
224 @opencatbox{Categories:}
225 @category{Error messages}
229 @node part fell off the end, undefined variable during plotting, out of memory, Error messages
230 @subsection part: fell off the end
231 @code{part()} was used to access the @code{n}th item in something that has less than
233 @opencatbox{Categories:}
234 @category{Error messages}
238 @node undefined variable during plotting, VTK is not installed, part fell off the end, Error messages
239 @subsection undefined variable (draw or plot)
240 A function could not be plotted since it still contained a variable maxima
241 doesn't know the value of.
243 In order to find out which variable this could be it is sometimes helpful to
244 temporarily replace the name of the drawing command (@code{draw2d}, @code{plot2d}
245 or similar) by a random name (for example @code{ddraw2d}) that doesn't coincide
246 with the name of an existing function to make maxima print out what parameters
247 the drawing command sees.
251 (%i2) f(x):=sin(omega*t);
252 (%o2) f(x) := sin(omega t)
259 draw2d (explicit): non defined variable
260 -- an error. To debug this try: debugmode(true);
267 (%o4) ddraw2d(explicit(sin(omega t), x, 1, 10))
270 @opencatbox{Categories:}
271 @category{Error messages}
275 @node VTK is not installed, , undefined variable during plotting, Error messages
276 @subsection VTK is not installed, which is required for Scene
278 This might either mean that VTK is actually not installed - or cannot be found by
279 maxima - or that Maxima has no write access to the temporary directory whose name is output
280 if the following maxima command is entered:
286 (%i1) maxima_tempdir;
291 Note: The @code{scene()} command requrires VTK with TCL/TK bindings.
293 @opencatbox{Categories:}
294 @category{Error messages}
298 @node Warning messages, ,Error messages, Error and warning messages
299 @section Warning messages
301 * undefined variable during translation::
305 @node undefined variable during translation, replaced x by y, Warning messages, Warning messages
306 @subsection Encountered undefined variable @code{<x>} in translation
307 A function was compiled but the type of the variable @code{x} was not known.
308 This means that the compiled command contains additional code that makes it
309 retain all the flexibility maxima provides in respect to this variable.
310 If @code{x} isn't meant as a variable name but just a named option to a
311 command prepending the named option by a single quote (@code{'}) should
313 @opencatbox{Categories:}
314 @category{Error messages}
318 @node replaced x by y, Command-line options, undefined variable during translation, Warning messages
319 @subsection Rat: replaced @code{<x>} by @code{<y> = <z>}
320 Floating-point numbers provide a maximum number of digits that is typically high,
321 but still limited. Good examples that this limitation might be too low
322 even for harmless-looking examples include
323 @uref{https://en.wikipedia.org/wiki/Wilkinson%27s_polynomial, Wilkinson's Polynomial},
324 The Rump polynomial and the fact that an exact 1/10 cannot be expressed as a binary
325 floating-point number.
326 In places where the floating-point error might add up or hinder terms from
327 cancelling each other out maxima therefore by default replaces them with exact
329 See also @code{ratprint}, @code{ratepsilon}, @code{bftorat}, @code{fpprintprec}
330 and @code{rationalize}.
331 @opencatbox{Categories:}
332 @category{Warning messages}