~ubuntu-branches/ubuntu/karmic/maxima/karmic

« back to all changes in this revision

Viewing changes to doc/info/maxima_5.html

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Sauthier
  • Date: 2009-07-13 15:38:41 UTC
  • mfrom: (3.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090713153841-gtux06oun30kuuo7
Tags: 5.17.1-1ubuntu1
* Merge from debian unstable, remaining changes (LP: #296643, LP: #242243):
   - debian/maxima-doc.doc-base.{tips, plotting}:
    + Use .shtml instead of .html to fix lintian errors.
   - debian/maxima-emacs.emacsen-install:
    + Install symlinks for source files rather than copying them.  This
      makes find-function work.
    + Install symlink for *.lisp so that we don't need to add
      /usr/share/emacs/site-lisp/maxima to load-path.
  - debian/maxima-emacs.emacsen-startup:
    + Remove use of /usr/share/emacs/site-lisp/maxima, since this
      causes load-path shadows and is not needed anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
2
2
<html>
3
 
<!-- Created on August, 25 2007 by texi2html 1.76 -->
 
3
<!-- Created on December, 14 2008 by texi2html 1.76 -->
4
4
<!--
5
5
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
6
6
            Karl Berry  <karl@freefriends.org>
11
11
 
12
12
-->
13
13
<head>
14
 
<title>Maxima Manual: 5. Operators</title>
 
14
<title>Maxima 5.17.1 Manual: 5. Operators</title>
15
15
 
16
 
<meta name="description" content="Maxima Manual: 5. Operators">
17
 
<meta name="keywords" content="Maxima Manual: 5. Operators">
 
16
<meta name="description" content="Maxima 5.17.1 Manual: 5. Operators">
 
17
<meta name="keywords" content="Maxima 5.17.1 Manual: 5. Operators">
18
18
<meta name="resource-type" content="document">
19
19
<meta name="distribution" content="global">
20
20
<meta name="Generator" content="texi2html 1.76">
125
125
div.categorybox
126
126
{
127
127
    border: 1px solid gray;
128
 
    padding-top: 1em;
129
 
    padding-bottom: 1em;
 
128
    padding-top: 0px;
 
129
    padding-bottom: 0px;
130
130
    padding-left: 1em;
131
131
    padding-right: 1em;
132
132
    background: rgb(247,242,220);
156
156
<td valign="middle" align="left"> &nbsp; </td>
157
157
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
158
158
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
159
 
<td valign="middle" align="left">[<a href="maxima_77.html#SEC300" title="Index">Index</a>]</td>
 
159
<td valign="middle" align="left">[<a href="maxima_79.html#SEC320" title="Index">Index</a>]</td>
160
160
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
161
161
</tr></table>
162
162
<h1 class="chapter"> 5. Operators </h1>
179
179
</table>
180
180
 
181
181
 
182
 
<hr size="6">
 
182
<p><a name="Item_003a-nary"></a>
 
183
</p><hr size="6">
183
184
<a name="nary"></a>
184
185
<a name="SEC13"></a>
185
186
<table cellpadding="1" cellspacing="1" border="0">
195
196
<td valign="middle" align="left"> &nbsp; </td>
196
197
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
197
198
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
198
 
<td valign="middle" align="left">[<a href="maxima_77.html#SEC300" title="Index">Index</a>]</td>
 
199
<td valign="middle" align="left">[<a href="maxima_79.html#SEC320" title="Index">Index</a>]</td>
199
200
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
200
201
</tr></table>
201
202
<h2 class="section"> 5.1 nary </h2>
202
203
<p>An <code>nary</code> operator is used to denote a function of any number of
203
204
arguments, each of which is separated by an occurrence of the
204
205
operator, e.g. A+B or A+B+C.  The <code>nary(&quot;x&quot;)</code> function is a syntax
205
 
extension function to declare x to be an <code>nary</code> operator.
 
206
extension function to declare <code>x</code> to be an <code>nary</code> operator.
206
207
Functions may be declared to be
207
208
<code>nary</code>.  If <code>declare(j,nary);</code> is done, this tells the simplifier to
208
209
simplify, e.g. <code>j(j(a,b),j(c,d))</code> to <code>j(a, b, c, d)</code>.
209
210
</p>
210
 
<p>See also <code>syntax</code>.
211
 
</p>
212
 
<hr size="6">
 
211
<p>See also <code>Syntax</code>.
 
212
</p>
 
213
<div class=categorybox>
 
214
 
 
215
 
 
216
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
217
 &middot;
 
218
<a href="maxima_93.html#Category_003a-Syntax">Syntax</a>
 
219
</p>
 
220
</div>
 
221
 
 
222
 
 
223
<p><a name="Item_003a-nofix"></a>
 
224
</p><hr size="6">
213
225
<a name="nofix"></a>
214
226
<a name="SEC14"></a>
215
227
<table cellpadding="1" cellspacing="1" border="0">
225
237
<td valign="middle" align="left"> &nbsp; </td>
226
238
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
227
239
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
228
 
<td valign="middle" align="left">[<a href="maxima_77.html#SEC300" title="Index">Index</a>]</td>
 
240
<td valign="middle" align="left">[<a href="maxima_79.html#SEC320" title="Index">Index</a>]</td>
229
241
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
230
242
</tr></table>
231
243
<h2 class="section"> 5.2 nofix </h2>
234
246
corresponding function to be evaluated.  For example, when one types
235
247
&quot;exit;&quot; to exit from a Maxima break, &quot;exit&quot; is behaving similar to a
236
248
<code>nofix</code> operator.  The function <code>nofix(&quot;x&quot;)</code> is a syntax extension
237
 
function which declares x to be a <code>nofix</code> operator. 
238
 
</p>
239
 
<p>See also <code>syntax</code>.
240
 
</p>
241
 
<hr size="6">
 
249
function which declares <code>x</code> to be a <code>nofix</code> operator. 
 
250
</p>
 
251
<p>See also <code>Syntax</code>.
 
252
</p>
 
253
<div class=categorybox>
 
254
 
 
255
 
 
256
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
257
 &middot;
 
258
<a href="maxima_93.html#Category_003a-Syntax">Syntax</a>
 
259
</p>
 
260
</div>
 
261
 
 
262
 
 
263
<p><a name="Item_003a-postfix"></a>
 
264
</p><hr size="6">
242
265
<a name="postfix"></a>
243
266
<a name="SEC15"></a>
244
267
<table cellpadding="1" cellspacing="1" border="0">
254
277
<td valign="middle" align="left"> &nbsp; </td>
255
278
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
256
279
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
257
 
<td valign="middle" align="left">[<a href="maxima_77.html#SEC300" title="Index">Index</a>]</td>
 
280
<td valign="middle" align="left">[<a href="maxima_79.html#SEC320" title="Index">Index</a>]</td>
258
281
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
259
282
</tr></table>
260
283
<h2 class="section"> 5.3 postfix </h2>
261
284
<p><code>postfix</code> operators like the <code>prefix</code> variety denote functions
262
285
of a single argument, but in this case the argument immediately
263
286
precedes an occurrence of the operator in the input string, e.g. 3! .
264
 
The <code>postfix(&quot;x&quot;)</code> function is a syntax extension function to declare x
 
287
The <code>postfix(&quot;x&quot;)</code> function is a syntax extension function to declare <code>x</code>
265
288
to be a <code>postfix</code> operator.
266
289
</p>
267
 
<p>See also <code>syntax</code>.
268
 
</p>
269
 
<hr size="6">
 
290
<p>See also <code>Syntax</code>.
 
291
</p>
 
292
<div class=categorybox>
 
293
 
 
294
 
 
295
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
296
 &middot;
 
297
<a href="maxima_93.html#Category_003a-Syntax">Syntax</a>
 
298
</p>
 
299
</div>
 
300
 
 
301
 
 
302
<p><a name="Item_003a-prefix"></a>
 
303
</p><hr size="6">
270
304
<a name="prefix"></a>
271
305
<a name="SEC16"></a>
272
306
<table cellpadding="1" cellspacing="1" border="0">
282
316
<td valign="middle" align="left"> &nbsp; </td>
283
317
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
284
318
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
285
 
<td valign="middle" align="left">[<a href="maxima_77.html#SEC300" title="Index">Index</a>]</td>
 
319
<td valign="middle" align="left">[<a href="maxima_79.html#SEC320" title="Index">Index</a>]</td>
286
320
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
287
321
</tr></table>
288
322
<h2 class="section"> 5.4 prefix </h2>
289
323
<p>A <code>prefix</code> operator is one which signifies a function of one
290
324
argument, which argument immediately follows an occurrence of the
291
 
operator.  <code>prefix(&quot;x&quot;)</code> is a syntax extension function to declare x to
 
325
operator.  <code>prefix(&quot;x&quot;)</code> is a syntax extension function to declare <code>x</code> to
292
326
be a <code>prefix</code> operator.
293
327
</p>
294
 
<p>See also <code>syntax</code>.
295
 
</p>
296
 
<hr size="6">
 
328
<p>See also <code>Syntax</code>.
 
329
</p>
 
330
<div class=categorybox>
 
331
 
 
332
 
 
333
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
334
 &middot;
 
335
<a href="maxima_93.html#Category_003a-Syntax">Syntax</a>
 
336
</p>
 
337
</div>
 
338
 
 
339
 
 
340
<p><a name="Item_003a-Arithmetic-operators"></a>
 
341
</p><hr size="6">
297
342
<a name="Arithmetic-operators"></a>
298
343
<a name="SEC17"></a>
299
344
<table cellpadding="1" cellspacing="1" border="0">
309
354
<td valign="middle" align="left"> &nbsp; </td>
310
355
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
311
356
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
312
 
<td valign="middle" align="left">[<a href="maxima_77.html#SEC300" title="Index">Index</a>]</td>
 
357
<td valign="middle" align="left">[<a href="maxima_79.html#SEC320" title="Index">Index</a>]</td>
313
358
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
314
359
</tr></table>
315
360
<h2 class="section"> 5.5 Arithmetic operators </h2>
316
361
 
317
 
<dl>
 
362
<p><a name="Item_003a-_002b"></a>
 
363
</p><dl>
318
364
<dt><u>Operator:</u> <b>+</b>
319
365
<a name="IDX56"></a>
320
366
</dt>
332
378
</dt>
333
379
<dd><p>The symbols <code>+</code> <code>*</code> <code>/</code> and <code>^</code> represent
334
380
addition, multiplication, division, and exponentiation, respectively.
335
 
The name of these operators are <code>&quot;+&quot;</code> <code>&quot;*&quot;</code> <code>&quot;//&quot;</code> and <code>&quot;^&quot;</code>,
 
381
The names of these operators are <code>&quot;+&quot;</code> <code>&quot;*&quot;</code> <code>&quot;/&quot;</code> and <code>&quot;^&quot;</code>,
336
382
which may appear where the name of a function or operator is required.
337
383
</p>
338
384
<p>The symbols <code>+</code> and <code>-</code> represent unary addition and negation, respectively,
345
391
</p>
346
392
<p>Division <code>a / b</code> is represented within Maxima as multiplication, <code>a * b^(- 1)</code>.
347
393
Expressions such as <code>a * b^(- 1)</code> are displayed as division.
348
 
Maxima recognizes <code>&quot;//&quot;</code> as the name of the division operator.
 
394
Maxima recognizes <code>&quot;/&quot;</code> as the name of the division operator.
349
395
</p>
350
396
<p>Addition and multiplication are n-ary, commutative operators.
351
397
Division and exponentiation are binary, noncommutative operators.
397
443
(%o6)                       144 a  x
398
444
</pre>
399
445
<p>Division and exponentiation are binary, noncommutative operators.
400
 
The names of these operators are <code>&quot;//&quot;</code> and <code>&quot;^&quot;</code>.
 
446
The names of these operators are <code>&quot;/&quot;</code> and <code>&quot;^&quot;</code>.
401
447
</p>
402
448
<pre class="example">(%i1) [a / b, a ^ b];
403
449
                              a   b
404
450
(%o1)                        [-, a ]
405
451
                              b
406
452
(%i2) [map (op, %), map (args, %)];
407
 
(%o2)              [[//, ^], [[a, b], [a, b]]]
408
 
(%i3) [apply (&quot;//&quot;, [a, b]), apply (&quot;^&quot;, [a, b])];
 
453
(%o2)              [[/, ^], [[a, b], [a, b]]]
 
454
(%i3) [apply (&quot;/&quot;, [a, b]), apply (&quot;^&quot;, [a, b])];
409
455
                              a   b
410
456
(%o3)                        [-, a ]
411
457
                              b
474
520
                          x   x   x   x
475
521
(%o8)                   [a , c , m , t ]
476
522
</pre>
 
523
<div class=categorybox>
 
524
 
 
525
 
 
526
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
527
</p>
 
528
</div>
 
529
 
 
530
 
477
531
</dd></dl>
478
532
 
479
 
<dl>
 
533
<p><a name="Item_003a-_002a_002a"></a>
 
534
</p><dl>
480
535
<dt><u>Operator:</u> <b>**</b>
481
536
<a name="IDX61"></a>
482
537
</dt>
501
556
      x**z+x**y
502
557
(%o4)                         done
503
558
</pre>
 
559
<div class=categorybox>
 
560
 
 
561
 
 
562
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
563
</p>
 
564
</div>
 
565
 
 
566
 
504
567
</dd></dl>
505
568
 
506
 
<hr size="6">
 
569
<p><a name="Item_003a-Relational-operators"></a>
 
570
</p><hr size="6">
507
571
<a name="Relational-operators"></a>
508
572
<a name="SEC18"></a>
509
573
<table cellpadding="1" cellspacing="1" border="0">
519
583
<td valign="middle" align="left"> &nbsp; </td>
520
584
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
521
585
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
522
 
<td valign="middle" align="left">[<a href="maxima_77.html#SEC300" title="Index">Index</a>]</td>
 
586
<td valign="middle" align="left">[<a href="maxima_79.html#SEC320" title="Index">Index</a>]</td>
523
587
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
524
588
</tr></table>
525
589
<h2 class="section"> 5.6 Relational operators </h2>
526
590
 
527
 
<dl>
 
591
<p><a name="Item_003a-_003c"></a>
 
592
</p><dl>
528
593
<dt><u>Operator:</u> <b>&lt;</b>
529
594
<a name="IDX62"></a>
530
595
</dt>
537
602
<dt><u>Operator:</u> <b>&gt;</b>
538
603
<a name="IDX65"></a>
539
604
</dt>
540
 
</dl>
541
 
 
542
 
<hr size="6">
 
605
<dd><p>The symbols <code>&lt;</code> <code>&lt;=</code> <code>&gt;=</code> and <code>&gt;</code> represent
 
606
less than, less than or equal, greater than or equal, and greater than, respectively.
 
607
The names of these operators are <code>&quot;&lt;&quot;</code> <code>&quot;&lt;=&quot;</code> <code>&quot;&gt;=&quot;</code> and <code>&quot;&gt;&quot;</code>,
 
608
which may appear where the name of a function or operator is required.
 
609
</p>
 
610
<p>These relational operators are all binary operators;
 
611
constructs such as <code>a &lt; b &lt; c</code> are not recognized by Maxima.
 
612
</p>
 
613
<p>Relational expressions are evaluated to Boolean values
 
614
by the functions <code>is</code> and <code>maybe</code>,
 
615
and the programming constructs <code>if</code>, <code>while</code>, and <code>unless</code>.
 
616
Relational expressions are not otherwise evaluated or simplified to Boolean values,
 
617
although the arguments of relational expressions are evaluated
 
618
(when evaluation is not otherwise prevented by quotation).
 
619
</p>
 
620
<p>When a relational expression cannot be evaluated to <code>true</code> or <code>false</code>,
 
621
the behavior of <code>is</code> and <code>if</code> are governed by the global flag <code>prederror</code>.
 
622
When <code>prederror</code> is <code>true</code>,
 
623
<code>is</code> and <code>if</code> trigger an error.
 
624
When <code>prederror</code> is <code>false</code>,
 
625
<code>is</code> returns <code>unknown</code>,
 
626
and <code>if</code> returns a partially-evaluated conditional expression.
 
627
</p>
 
628
<p><code>maybe</code> always behaves as if <code>prederror</code> were <code>false</code>,
 
629
and <code>while</code> and <code>unless</code> always behave as if <code>prederror</code> were <code>true</code>.
 
630
</p>
 
631
<p>Relational operators do not distribute over lists or other aggregates.
 
632
</p>
 
633
<p>See also <code>=</code> <code>#</code> <code>equal</code> and <code>notequal</code>.
 
634
</p>
 
635
<p>Examples:
 
636
</p>
 
637
<p>Relational expressions are evaluated to Boolean values by some functions and programming constructs.
 
638
</p>
 
639
<pre class="example">(%i1) [x, y, z] : [123, 456, 789];
 
640
(%o1)                    [123, 456, 789]
 
641
(%i2) is (x &lt; y);
 
642
(%o2)                         true
 
643
(%i3) maybe (y &gt; z);
 
644
(%o3)                         false
 
645
(%i4) if x &gt;= z then 1 else 0;
 
646
(%o4)                           0
 
647
(%i5) block ([S], S : 0, for i:1 while i &lt;= 100 do S : S + i, return (S));
 
648
(%o5)                         5050
 
649
</pre>
 
650
<p>Relational expressions are not otherwise evaluated or simplified to Boolean values,
 
651
although the arguments of relational expressions are evaluated.
 
652
</p>
 
653
<pre class="example">(%o1)                    [123, 456, 789]
 
654
(%i2) [x &lt; y, y &lt;= z, z &gt;= y, y &gt; z];
 
655
(%o2)    [123 &lt; 456, 456 &lt;= 789, 789 &gt;= 456, 456 &gt; 789]
 
656
(%i3) map (is, %);
 
657
(%o3)               [true, true, true, false]
 
658
</pre>
 
659
<div class=categorybox>
 
660
 
 
661
 
 
662
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
663
</p>
 
664
</div>
 
665
 
 
666
</dd></dl>
 
667
 
 
668
<p><a name="Item_003a-General-operators"></a>
 
669
</p><hr size="6">
543
670
<a name="General-operators"></a>
544
671
<a name="SEC19"></a>
545
672
<table cellpadding="1" cellspacing="1" border="0">
555
682
<td valign="middle" align="left"> &nbsp; </td>
556
683
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
557
684
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
558
 
<td valign="middle" align="left">[<a href="maxima_77.html#SEC300" title="Index">Index</a>]</td>
 
685
<td valign="middle" align="left">[<a href="maxima_79.html#SEC320" title="Index">Index</a>]</td>
559
686
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
560
687
</tr></table>
561
688
<h2 class="section"> 5.7 General operators </h2>
562
689
 
563
 
<dl>
 
690
<p><a name="Item_003a-_005e_005e"></a>
 
691
</p><dl>
564
692
<dt><u>Operator:</u> <b>^^</b>
565
693
<a name="IDX66"></a>
566
694
</dt>
579
707
(%i2) string (a . a . b . b . b + a * a * a * b * b);
580
708
(%o2)                  a^3*b^2+a^^2 . b^^3
581
709
</pre>
 
710
<div class=categorybox>
 
711
 
 
712
 
 
713
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
714
</p>
 
715
</div>
 
716
 
 
717
 
582
718
</dd></dl>
583
719
 
584
 
<dl>
 
720
<p><a name="Item_003a-_0021"></a>
 
721
</p><dl>
585
722
<dt><u>Operator:</u> <b>!</b>
586
723
<a name="IDX67"></a>
587
724
</dt>
643
780
               16
644
781
                                             2432902008176640000]
645
782
</pre>
 
783
<div class=categorybox>
 
784
 
 
785
 
 
786
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Gamma-and-factorial-functions">Gamma and factorial functions</a>
 
787
 &middot;
 
788
<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
789
</p>
 
790
</div>
 
791
 
 
792
 
646
793
</dd></dl>
647
794
 
648
 
<dl>
 
795
<p><a name="Item_003a-_0021_0021"></a>
 
796
</p><dl>
649
797
<dt><u>Operator:</u> <b>!!</b>
650
798
<a name="IDX68"></a>
651
799
</dt>
664
812
<p>For an argument <code>n</code> which is not an integer, float, or rational,
665
813
<code>n!!</code> yields a noun form <code>genfact (n, n/2, 2)</code>.
666
814
</p>
 
815
<div class=categorybox>
 
816
 
 
817
 
 
818
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Gamma-and-factorial-functions">Gamma and factorial functions</a>
 
819
 &middot;
 
820
<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
821
</p>
 
822
</div>
 
823
 
 
824
 
667
825
</dd></dl>
668
826
 
669
 
<dl>
 
827
<p><a name="Item_003a-_0023"></a>
 
828
</p><dl>
670
829
<dt><u>Operator:</u> <b>#</b>
671
830
<a name="IDX69"></a>
672
831
</dt>
692
851
(%i6) is (not a = b);
693
852
(%o6)                         true
694
853
</pre>
 
854
<div class=categorybox>
 
855
 
 
856
 
 
857
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
858
</p>
 
859
</div>
 
860
 
 
861
 
695
862
</dd></dl>
696
863
 
697
 
<dl>
 
864
<p><a name="Item_003a-_002e"></a>
 
865
</p><dl>
698
866
<dt><u>Operator:</u> <b>.</b>
699
867
<a name="IDX70"></a>
700
868
</dt>
701
869
<dd><p>The dot operator, for matrix (non-commutative) multiplication.
702
 
When &quot;.&quot; is used in this way, spaces should be left on both sides of
703
 
it, e.g. A . B.  This distinguishes it plainly from a decimal point in
 
870
When <code>&quot;.&quot;</code> is used in this way, spaces should be left on both sides of
 
871
it, e.g. <code>A . B</code>.  This distinguishes it plainly from a decimal point in
704
872
a floating point number.
705
873
</p>
706
874
<p>See also
716
884
and
717
885
<code>dotscrules</code>.
718
886
</p>
 
887
<div class=categorybox>
 
888
 
 
889
 
 
890
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
891
</p>
 
892
</div>
 
893
 
 
894
 
719
895
</dd></dl>
720
896
 
721
 
<dl>
 
897
<p><a name="Item_003a-_003a"></a>
 
898
</p><dl>
722
899
<dt><u>Operator:</u> <b>:</b>
723
900
<a name="IDX71"></a>
724
901
</dt>
725
 
<dd><p>The assignment operator.  E.g. A:3 sets the variable A to 3.
726
 
</p>
 
902
<dd><p>Assignment operator.
 
903
</p>
 
904
<p>When the left-hand side is a simple variable (not subscripted),
 
905
<code>:</code> evaluates its right-hand side
 
906
and associates that value with the left-hand side.
 
907
</p>
 
908
<p>When the left-hand side is a subscripted element of a list, matrix, declared Maxima array, or Lisp array,
 
909
the right-hand side is assigned to that element.
 
910
The subscript must name an existing element;
 
911
such objects cannot be extended by naming nonexistent elements.
 
912
</p>
 
913
<p>When the left-hand side is a subscripted element of an undeclared Maxima array,
 
914
the right-hand side is assigned to that element, if it already exists,
 
915
or a new element is allocated, if it does not already exist.
 
916
</p>
 
917
<p>When the left-hand side is a list of simple and/or subscripted variables,
 
918
the right-hand side must evaluate to a list,
 
919
and the elements of the right-hand side are assigned to the elements of the left-hand side,
 
920
in parallel.
 
921
</p>
 
922
<p>See also <code>kill</code> and <code>remvalue</code>,
 
923
which undo the association between the left-hand side and its value.
 
924
</p>
 
925
<p>Examples:
 
926
</p>
 
927
<p>Assignment to a simple variable.
 
928
</p>
 
929
<pre class="example">(%i1) a;
 
930
(%o1)                           a
 
931
(%i2) a : 123;
 
932
(%o2)                          123
 
933
(%i3) a;
 
934
(%o3)                          123
 
935
</pre>
 
936
<p>Assignment to an element of a list.
 
937
</p>
 
938
<pre class="example">(%i1) b : [1, 2, 3];
 
939
(%o1)                       [1, 2, 3]
 
940
(%i2) b[3] : 456;
 
941
(%o2)                          456
 
942
(%i3) b;
 
943
(%o3)                      [1, 2, 456]
 
944
</pre>
 
945
<p>Assignment creates an undeclared array.
 
946
</p>
 
947
<pre class="example">(%i1) c[99] : 789;
 
948
(%o1)                          789
 
949
(%i2) c[99];
 
950
(%o2)                          789
 
951
(%i3) c;
 
952
(%o3)                           c
 
953
(%i4) arrayinfo (c);
 
954
(%o4)                   [hashed, 1, [99]]
 
955
(%i5) listarray (c);
 
956
(%o5)                         [789]
 
957
</pre>
 
958
<p>Multiple assignment.
 
959
</p>
 
960
<pre class="example">(%i1) [a, b, c] : [45, 67, 89];
 
961
(%o1)                     [45, 67, 89]
 
962
(%i2) a;
 
963
(%o2)                          45
 
964
(%i3) b;
 
965
(%o3)                          67
 
966
(%i4) c;
 
967
(%o4)                          89
 
968
</pre>
 
969
<p>Multiple assignment is carried out in parallel.
 
970
The values of <code>a</code> and <code>b</code> are exchanged in this example.
 
971
</p>
 
972
<pre class="example">(%i1) [a, b] : [33, 55];
 
973
(%o1)                       [33, 55]
 
974
(%i2) [a, b] : [b, a];
 
975
(%o2)                       [55, 33]
 
976
(%i3) a;
 
977
(%o3)                          55
 
978
(%i4) b;
 
979
(%o4)                          33
 
980
</pre>
 
981
<div class=categorybox>
 
982
 
 
983
 
 
984
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Evaluation">Evaluation</a>
 
985
 &middot;
 
986
<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
987
</p>
 
988
</div>
 
989
 
727
990
</dd></dl>
728
991
 
729
 
<dl>
 
992
<p><a name="Item_003a-_003a_003a"></a>
 
993
</p><dl>
730
994
<dt><u>Operator:</u> <b>::</b>
731
995
<a name="IDX72"></a>
732
996
</dt>
733
 
<dd><p>Assignment operator.  :: assigns the value of the expression
734
 
on its right to the value of the quantity on its left, which must
735
 
evaluate to an atomic variable or subscripted variable.
736
 
</p>
 
997
<dd><p>Assignment operator.
 
998
</p>
 
999
<p><code>::</code> is the same as <code>:</code> (which see)
 
1000
except that <code>::</code> evaluates its left-hand side as well as its right-hand side.
 
1001
</p>
 
1002
<p>Examples:
 
1003
</p>
 
1004
<pre class="example">(%i1) x : 'foo;
 
1005
(%o1)                          foo
 
1006
(%i2) x :: 123;
 
1007
(%o2)                          123
 
1008
(%i3) foo;
 
1009
(%o3)                          123
 
1010
(%i4) x : '[a, b, c];
 
1011
(%o4)                       [a, b, c]
 
1012
(%i5) x :: [11, 22, 33];
 
1013
(%o5)                     [11, 22, 33]
 
1014
(%i6) a;
 
1015
(%o6)                          11
 
1016
(%i7) b;
 
1017
(%o7)                          22
 
1018
(%i8) c;
 
1019
(%o8)                          33
 
1020
</pre>
 
1021
<div class=categorybox>
 
1022
 
 
1023
 
 
1024
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Evaluation">Evaluation</a>
 
1025
 &middot;
 
1026
<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
1027
</p>
 
1028
</div>
 
1029
 
737
1030
</dd></dl>
738
1031
 
739
 
<dl>
 
1032
<p><a name="Item_003a-_003a_003a_003d"></a>
 
1033
</p><dl>
740
1034
<dt><u>Operator:</u> <b>::=</b>
741
1035
<a name="IDX73"></a>
742
1036
</dt>
827
1121
x is equal to 1234 - 1729 w 
828
1122
(%o7)                     1234 - 1729 w
829
1123
</pre>
 
1124
<div class=categorybox>
 
1125
 
 
1126
 
 
1127
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Function-definition">Function definition</a>
 
1128
 &middot;
 
1129
<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
1130
</p>
 
1131
</div>
 
1132
 
 
1133
 
830
1134
</dd></dl>
831
1135
 
832
 
<dl>
 
1136
<p><a name="Item_003a-_003a_003d"></a>
 
1137
</p><dl>
833
1138
<dt><u>Operator:</u> <b>:=</b>
834
1139
<a name="IDX74"></a>
835
1140
</dt>
847
1152
</p>
848
1153
<p>All function definitions appear in the same namespace;
849
1154
defining a function <code>f</code> within another function <code>g</code>
850
 
does not limit the scope of <code>f</code> to <code>g</code>.
 
1155
does not automatically limit the scope of <code>f</code> to <code>g</code>.
 
1156
However, <code>local(f)</code> makes the definition of function <code>f</code>
 
1157
effective only within the block or other compound expression in which <code>local</code> appears.
851
1158
</p>
852
1159
<p>If some formal argument <var>x_k</var> is a quoted symbol,
853
1160
the function defined by <code>:=</code> does not evaluate the corresponding actual argument.
886
1193
(%i2) H (a, b, c);
887
1194
(%o2)                       c + b + a
888
1195
</pre>
 
1196
<p><code>local</code> makes a local function definition.
 
1197
</p>
 
1198
<pre class="example">(%i1) foo (x) := 1 - x;
 
1199
(%o1)                    foo(x) := 1 - x
 
1200
(%i2) foo (100);
 
1201
(%o2)                         - 99
 
1202
(%i3) block (local (foo), foo (x) := 2 * x, foo (100));
 
1203
(%o3)                          200
 
1204
(%i4) foo (100);
 
1205
(%o4)                         - 99
 
1206
</pre>
 
1207
<div class=categorybox>
 
1208
 
 
1209
 
 
1210
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Function-definition">Function definition</a>
 
1211
 &middot;
 
1212
<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
1213
</p>
 
1214
</div>
 
1215
 
 
1216
 
889
1217
</dd></dl>
890
1218
 
891
 
<dl>
 
1219
<p><a name="Item_003a-_003d"></a>
 
1220
</p><dl>
892
1221
<dt><u>Operator:</u> <b>=</b>
893
1222
<a name="IDX75"></a>
894
1223
</dt>
986
1315
(%i2) is (2 * x # 3 * x);
987
1316
(%o2)                         true
988
1317
</pre>
 
1318
<div class=categorybox>
 
1319
 
 
1320
 
 
1321
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
1322
</p>
 
1323
</div>
 
1324
 
 
1325
 
989
1326
</dd></dl>
990
1327
 
991
 
<dl>
 
1328
<p><a name="Item_003a-and"></a>
 
1329
</p><dl>
992
1330
<dt><u>Operator:</u> <b>and</b>
993
1331
<a name="IDX76"></a>
994
1332
</dt>
1013
1351
<p><code>and</code> is not commutative:
1014
1352
<code>a and b</code> might not be equal to <code>b and a</code> due to the treatment of indeterminate operands.
1015
1353
</p>
 
1354
<div class=categorybox>
 
1355
 
 
1356
 
 
1357
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
1358
</p>
 
1359
</div>
 
1360
 
 
1361
 
1016
1362
</dd></dl>
1017
1363
 
1018
 
<dl>
 
1364
<p><a name="Item_003a-or"></a>
 
1365
</p><dl>
1019
1366
<dt><u>Operator:</u> <b>or</b>
1020
1367
<a name="IDX77"></a>
1021
1368
</dt>
1040
1387
<p><code>or</code> is not commutative:
1041
1388
<code>a or b</code> might not be equal to <code>b or a</code> due to the treatment of indeterminate operands.
1042
1389
</p>
 
1390
<div class=categorybox>
 
1391
 
 
1392
 
 
1393
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
1394
</p>
 
1395
</div>
 
1396
 
 
1397
 
1043
1398
</dd></dl>
1044
1399
 
1045
 
<dl>
 
1400
<p><a name="Item_003a-not"></a>
 
1401
</p><dl>
1046
1402
<dt><u>Operator:</u> <b>not</b>
1047
1403
<a name="IDX78"></a>
1048
1404
</dt>
1058
1414
Otherwise, operands which do not evaluate to <code>true</code> or <code>false</code> are accepted,
1059
1415
and the result is a Boolean expression.
1060
1416
</p>
 
1417
<div class=categorybox>
 
1418
 
 
1419
 
 
1420
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
1421
</p>
 
1422
</div>
 
1423
 
 
1424
 
1061
1425
</dd></dl>
1062
1426
 
1063
 
<dl>
 
1427
<p><a name="Item_003a-abs"></a>
 
1428
</p><dl>
1064
1429
<dt><u>Function:</u> <b>abs</b><i> (<var>expr</var>)</i>
1065
1430
<a name="IDX79"></a>
1066
1431
</dt>
1067
1432
<dd><p>Returns the absolute value <var>expr</var>.  If <var>expr</var> is complex, returns the complex
1068
1433
modulus of <var>expr</var>.
1069
1434
</p>
 
1435
<div class=categorybox>
 
1436
 
 
1437
 
 
1438
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Mathematical-functions">Mathematical functions</a>
 
1439
</p>
 
1440
</div>
 
1441
 
1070
1442
</dd></dl>
1071
1443
 
1072
 
<dl>
 
1444
<p><a name="Item_003a-additive"></a>
 
1445
</p><dl>
1073
1446
<dt><u>Keyword:</u> <b>additive</b>
1074
1447
<a name="IDX80"></a>
1075
1448
</dt>
1085
1458
This simplification does not occur when <code>f</code> is applied to expressions of
1086
1459
the form <code>sum(x[i],i,lower-limit,upper-limit)</code>.
1087
1460
</p>
 
1461
<div class=categorybox>
 
1462
 
 
1463
 
 
1464
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
1465
 &middot;
 
1466
<a href="maxima_93.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
 
1467
</p>
 
1468
</div>
 
1469
 
1088
1470
</dd></dl>
1089
1471
 
1090
 
<dl>
 
1472
<p><a name="Item_003a-allbut"></a>
 
1473
</p><dl>
1091
1474
<dt><u>Keyword:</u> <b>allbut</b>
1092
1475
<a name="IDX81"></a>
1093
1476
</dt>
1120
1503
</p>
1121
1504
</dd></dl>
1122
1505
 
1123
 
<dl>
 
1506
<p><a name="Item_003a-antisymmetric"></a>
 
1507
</p><dl>
1124
1508
<dt><u>Declaration:</u> <b>antisymmetric</b>
1125
1509
<a name="IDX82"></a>
1126
1510
</dt>
1130
1514
<code>symmetric</code> or <code>commutative</code>, where n is the number of interchanges of two
1131
1515
arguments necessary to convert it to that form.
1132
1516
</p>
 
1517
<div class=categorybox>
 
1518
 
 
1519
 
 
1520
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
1521
 &middot;
 
1522
<a href="maxima_93.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
 
1523
</p>
 
1524
</div>
 
1525
 
1133
1526
</dd></dl>
1134
1527
 
1135
 
<dl>
 
1528
<p><a name="Item_003a-cabs"></a>
 
1529
</p><dl>
1136
1530
<dt><u>Function:</u> <b>cabs</b><i> (<var>expr</var>)</i>
1137
1531
<a name="IDX83"></a>
1138
1532
</dt>
1139
1533
<dd><p>Returns the complex absolute value (the complex modulus) of
1140
1534
<var>expr</var>.
1141
1535
</p>
 
1536
<div class=categorybox>
 
1537
 
 
1538
 
 
1539
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Complex-variables">Complex variables</a>
 
1540
</p>
 
1541
</div>
 
1542
 
1142
1543
</dd></dl>
1143
1544
 
1144
 
<dl>
 
1545
<p><a name="Item_003a-ceiling"></a>
 
1546
</p><dl>
1145
1547
<dt><u>Function:</u> <b>ceiling</b><i> (<var>x</var>)</i>
1146
1548
<a name="IDX84"></a>
1147
1549
</dt>
1188
1590
(%i3) ceiling (f(x) - 1);
1189
1591
(%o3)                       f(x) - 1
1190
1592
</pre>
 
1593
<div class=categorybox>
 
1594
 
 
1595
 
 
1596
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Mathematical-functions">Mathematical functions</a>
 
1597
</p>
 
1598
</div>
 
1599
 
1191
1600
</dd></dl>
1192
1601
 
1193
 
<dl>
 
1602
<p><a name="Item_003a-charfun"></a>
 
1603
</p><dl>
1194
1604
<dt><u>Function:</u> <b>charfun</b><i> (<var>p</var>)</i>
1195
1605
<a name="IDX85"></a>
1196
1606
</dt>
1209
1619
(%i4) [subst (x = -1, e), subst (x = 0, e), subst (x = 1, e)];
1210
1620
(%o4)                       [0, 1, 0]
1211
1621
</pre>
 
1622
<div class=categorybox>
 
1623
 
 
1624
 
 
1625
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Mathematical-functions">Mathematical functions</a>
 
1626
</p>
 
1627
</div>
 
1628
 
1212
1629
</dd></dl>
1213
1630
 
1214
 
<dl>
 
1631
<p><a name="Item_003a-commutative"></a>
 
1632
</p><dl>
1215
1633
<dt><u>Declaration:</u> <b>commutative</b>
1216
1634
<a name="IDX86"></a>
1217
1635
</dt>
1219
1637
simplifier that <code>h</code> is a commutative function.  E.g. <code>h(x,z,y)</code> will
1220
1638
simplify to <code>h(x, y, z)</code>.  This is the same as <code>symmetric</code>.
1221
1639
</p>
 
1640
<div class=categorybox>
 
1641
 
 
1642
 
 
1643
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
1644
 &middot;
 
1645
<a href="maxima_93.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
 
1646
</p>
 
1647
</div>
 
1648
 
1222
1649
</dd></dl>
1223
1650
 
1224
 
<dl>
 
1651
<p><a name="Item_003a-compare"></a>
 
1652
</p><dl>
1225
1653
<dt><u>Function:</u> <b>compare</b><i> (<var>x</var>, <var>y</var>)</i>
1226
1654
<a name="IDX87"></a>
1227
1655
</dt>
1228
1656
<dd><p>Return a comparison operator <var>op</var>
1229
1657
(<code>&lt;</code>, <code>&lt;=</code>, <code>&gt;</code>, <code>&gt;=</code>, <code>=</code>, or <code>#</code>) such that
1230
 
<code>is (<var>x</var> <var>op</var> <var>y</var>)</code> evaluates to true;
 
1658
<code>is (<var>x</var> <var>op</var> <var>y</var>)</code> evaluates to <code>true</code>;
1231
1659
when either <var>x</var> or <var>y</var> depends on <code>%i</code> and
1232
1660
<code><var>x</var> # <var>y</var></code>, return <code>notcomparable</code>;
1233
1661
when there is no such operator or
1256
1684
</pre>
1257
1685
<p>The real domain of <code>acos (x^2 + 1)</code> is empty.
1258
1686
</p>
 
1687
<div class=categorybox>
 
1688
 
 
1689
 
 
1690
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
 
1691
</p>
 
1692
</div>
 
1693
 
1259
1694
</dd></dl>
1260
1695
 
1261
 
<dl>
 
1696
<p><a name="Item_003a-entier"></a>
 
1697
</p><dl>
1262
1698
<dt><u>Function:</u> <b>entier</b><i> (<var>x</var>)</i>
1263
1699
<a name="IDX88"></a>
1264
1700
</dt>
1265
1701
<dd><p>Returns the largest integer less than or equal to <var>x</var> where <var>x</var> is numeric.  <code>fix</code> (as in
1266
1702
<code>fixnum</code>) is a synonym for this, so <code>fix(<var>x</var>)</code> is precisely the same.
1267
1703
</p>
 
1704
<div class=categorybox>
 
1705
 
 
1706
 
 
1707
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Mathematical-functions">Mathematical functions</a>
 
1708
</p>
 
1709
</div>
 
1710
 
1268
1711
</dd></dl>
1269
1712
 
1270
 
<dl>
 
1713
<p><a name="Item_003a-equal"></a>
 
1714
</p><dl>
1271
1715
<dt><u>Function:</u> <b>equal</b><i> (<var>a</var>, <var>b</var>)</i>
1272
1716
<a name="IDX89"></a>
1273
1717
</dt>
1370
1814
(%i2) is (notequal (2*z, 2*z - 1));
1371
1815
(%o2)                         true
1372
1816
</pre>
 
1817
<div class=categorybox>
 
1818
 
 
1819
 
 
1820
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
1821
</p>
 
1822
</div>
 
1823
 
 
1824
 
1373
1825
</dd></dl>
1374
1826
 
1375
 
<dl>
 
1827
<p><a name="Item_003a-floor"></a>
 
1828
</p><dl>
1376
1829
<dt><u>Function:</u> <b>floor</b><i> (<var>x</var>)</i>
1377
1830
<a name="IDX90"></a>
1378
1831
</dt>
1381
1834
</p>
1382
1835
<p>If <var>x</var> is a constant expression (<code>10 * %pi</code>, for example), 
1383
1836
<code>floor</code> evaluates <var>x</var> using big floating point numbers, and 
1384
 
applies floor to the resulting big float. Because floor uses
 
1837
applies <code>floor</code> to the resulting big float. Because <code>floor</code> uses
1385
1838
floating point evaluation, it's possible, although unlikely, 
1386
1839
that <code>floor</code> could return  an erroneous value for constant 
1387
1840
inputs.  To guard against errors, the floating point evaluation
1419
1872
(%i3) ceiling (f(x) - 1);
1420
1873
(%o3)                       f(x) - 1
1421
1874
</pre>
 
1875
<div class=categorybox>
 
1876
 
 
1877
 
 
1878
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Mathematical-functions">Mathematical functions</a>
 
1879
</p>
 
1880
</div>
 
1881
 
1422
1882
</dd></dl>
1423
1883
 
1424
 
<dl>
 
1884
<p><a name="Item_003a-notequal"></a>
 
1885
</p><dl>
1425
1886
<dt><u>Function:</u> <b>notequal</b><i> (<var>a</var>, <var>b</var>)</i>
1426
1887
<a name="IDX91"></a>
1427
1888
</dt>
1450
1911
(%i10) maybe (notequal (a, b));
1451
1912
(%o10)                        true
1452
1913
</pre>
 
1914
<div class=categorybox>
 
1915
 
 
1916
 
 
1917
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Operators">Operators</a>
 
1918
</p>
 
1919
</div>
 
1920
 
 
1921
 
1453
1922
</dd></dl>
1454
1923
 
1455
 
<dl>
 
1924
<p><a name="Item_003a-eval"></a>
 
1925
</p><dl>
1456
1926
<dt><u>Operator:</u> <b>eval</b>
1457
1927
<a name="IDX92"></a>
1458
1928
</dt>
1460
1930
<code>eval</code> causes an extra evaluation of <var>expr</var>.
1461
1931
See <code>ev</code>.
1462
1932
</p>
 
1933
<div class=categorybox>
 
1934
 
 
1935
 
 
1936
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Evaluation-flags">Evaluation flags</a>
 
1937
</p>
 
1938
</div>
 
1939
 
1463
1940
</dd></dl>
1464
1941
 
1465
 
<dl>
 
1942
<p><a name="Item_003a-evenp"></a>
 
1943
</p><dl>
1466
1944
<dt><u>Function:</u> <b>evenp</b><i> (<var>expr</var>)</i>
1467
1945
<a name="IDX93"></a>
1468
1946
</dt>
1469
1947
<dd><p>Returns <code>true</code> if <var>expr</var> is an even integer.
1470
1948
<code>false</code> is returned in all other cases.
1471
1949
</p>
 
1950
<div class=categorybox>
 
1951
 
 
1952
 
 
1953
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Predicate-functions">Predicate functions</a>
 
1954
</p>
 
1955
</div>
 
1956
 
1472
1957
</dd></dl>
1473
1958
 
1474
 
<dl>
 
1959
<p><a name="Item_003a-fix"></a>
 
1960
</p><dl>
1475
1961
<dt><u>Function:</u> <b>fix</b><i> (<var>x</var>)</i>
1476
1962
<a name="IDX94"></a>
1477
1963
</dt>
1478
1964
<dd><p>A synonym for <code>entier (<var>x</var>)</code>.
1479
1965
</p>
 
1966
<div class=categorybox>
 
1967
 
 
1968
 
 
1969
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Mathematical-functions">Mathematical functions</a>
 
1970
</p>
 
1971
</div>
 
1972
 
1480
1973
</dd></dl>
1481
1974
 
1482
 
<dl>
 
1975
<p><a name="Item_003a-fullmap"></a>
 
1976
</p><dl>
1483
1977
<dt><u>Function:</u> <b>fullmap</b><i> (<var>f</var>, <var>expr_1</var>, ...)</i>
1484
1978
<a name="IDX95"></a>
1485
1979
</dt>
1501
1995
(%i3) map (g, %th(2));
1502
1996
(%o3)                     g(b c) + g(a)
1503
1997
</pre>
 
1998
<div class=categorybox>
 
1999
 
 
2000
 
 
2001
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Function-application">Function application</a>
 
2002
 &middot;
 
2003
<a href="maxima_93.html#Category_003a-Expressions">Expressions</a>
 
2004
</p>
 
2005
</div>
 
2006
 
1504
2007
</dd></dl>
1505
2008
 
1506
 
<dl>
 
2009
<p><a name="Item_003a-fullmapl"></a>
 
2010
</p><dl>
1507
2011
<dt><u>Function:</u> <b>fullmapl</b><i> (<var>f</var>, <var>list_1</var>, ...)</i>
1508
2012
<a name="IDX96"></a>
1509
2013
</dt>
1515
2019
<pre class="example">(%i1) fullmapl (&quot;+&quot;, [3, [4, 5]], [[a, 1], [0, -1.5]]);
1516
2020
(%o1)                [[a + 3, 4], [4, 3.5]]
1517
2021
</pre>
 
2022
<div class=categorybox>
 
2023
 
 
2024
 
 
2025
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Function-application">Function application</a>
 
2026
 &middot;
 
2027
<a href="maxima_93.html#Category_003a-Expressions">Expressions</a>
 
2028
</p>
 
2029
</div>
 
2030
 
1518
2031
</dd></dl>
1519
2032
 
1520
 
<dl>
 
2033
<p><a name="Item_003a-is"></a>
 
2034
</p><dl>
1521
2035
<dt><u>Function:</u> <b>is</b><i> (<var>expr</var>)</i>
1522
2036
<a name="IDX97"></a>
1523
2037
</dt>
1573
2087
(%i5) is (a &gt; 0);
1574
2088
(%o5)                        unknown
1575
2089
</pre>
 
2090
<div class=categorybox>
 
2091
 
 
2092
 
 
2093
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Predicate-functions">Predicate functions</a>
 
2094
 &middot;
 
2095
<a href="maxima_93.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
 
2096
</p>
 
2097
</div>
 
2098
 
1576
2099
</dd></dl>
1577
2100
 
1578
 
<dl>
 
2101
<p><a name="Item_003a-maybe"></a>
 
2102
</p><dl>
1579
2103
<dt><u>Function:</u> <b>maybe</b><i> (<var>expr</var>)</i>
1580
2104
<a name="IDX98"></a>
1581
2105
</dt>
1600
2124
(%i3) maybe (x &gt; 0);
1601
2125
(%o3)                         true
1602
2126
</pre>
 
2127
<div class=categorybox>
 
2128
 
 
2129
 
 
2130
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Predicate-functions">Predicate functions</a>
 
2131
 &middot;
 
2132
<a href="maxima_93.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
 
2133
</p>
 
2134
</div>
 
2135
 
1603
2136
</dd></dl>
1604
2137
 
1605
 
<dl>
 
2138
<p><a name="Item_003a-isqrt"></a>
 
2139
</p><dl>
1606
2140
<dt><u>Function:</u> <b>isqrt</b><i> (<var>x</var>)</i>
1607
2141
<a name="IDX99"></a>
1608
2142
</dt>
1610
2144
of the absolute value of <var>x</var>,
1611
2145
which is an integer.
1612
2146
</p>
 
2147
<div class=categorybox>
 
2148
 
 
2149
 
 
2150
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Mathematical-functions">Mathematical functions</a>
 
2151
</p>
 
2152
</div>
 
2153
 
1613
2154
</dd></dl>
1614
2155
 
1615
 
<dl>
 
2156
<p><a name="Item_003a-lmax"></a>
 
2157
</p><dl>
1616
2158
<dt><u>Function:</u> <b>lmax</b><i> (<var>L</var>)</i>
1617
2159
<a name="IDX100"></a>
1618
2160
</dt>
1619
2161
<dd><p>When <var>L</var> is a list or a set, return <code>apply ('max, args (<var>L</var>))</code>.  When <var>L</var> isn't a
1620
2162
list or a set, signal an error.
1621
2163
</p>
 
2164
<div class=categorybox>
 
2165
 
 
2166
 
 
2167
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Mathematical-functions">Mathematical functions</a>
 
2168
 &middot;
 
2169
<a href="maxima_93.html#Category_003a-Lists">Lists</a>
 
2170
 &middot;
 
2171
<a href="maxima_93.html#Category_003a-Sets">Sets</a>
 
2172
</p>
 
2173
</div>
 
2174
 
1622
2175
</dd></dl>
1623
2176
 
1624
 
<dl>
 
2177
<p><a name="Item_003a-lmin"></a>
 
2178
</p><dl>
1625
2179
<dt><u>Function:</u> <b>lmin</b><i> (<var>L</var>)</i>
1626
2180
<a name="IDX101"></a>
1627
2181
</dt>
1628
2182
<dd><p>When <var>L</var> is a list or a set, return <code>apply ('min, args (<var>L</var>))</code>. When <var>L</var> isn't a
1629
2183
list or a set, signal an error.
1630
2184
</p>
 
2185
<div class=categorybox>
 
2186
 
 
2187
 
 
2188
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Mathematical-functions">Mathematical functions</a>
 
2189
 &middot;
 
2190
<a href="maxima_93.html#Category_003a-Lists">Lists</a>
 
2191
 &middot;
 
2192
<a href="maxima_93.html#Category_003a-Sets">Sets</a>
 
2193
</p>
 
2194
</div>
 
2195
 
1631
2196
</dd></dl>
1632
2197
 
1633
 
<dl>
 
2198
<p><a name="Item_003a-max"></a>
 
2199
</p><dl>
1634
2200
<dt><u>Function:</u> <b>max</b><i> (<var>x_1</var>, ..., <var>x_n</var>)</i>
1635
2201
<a name="IDX102"></a>
1636
2202
</dt>
1641
2207
<code>max (x, 2*x, 3*x) --&gt; max (x, 3*x)</code>. To set the value of <code>trylevel</code> to 2, use
1642
2208
<code>put (trylevel, 2, maxmin)</code>.
1643
2209
</p>
 
2210
<div class=categorybox>
 
2211
 
 
2212
 
 
2213
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Mathematical-functions">Mathematical functions</a>
 
2214
</p>
 
2215
</div>
 
2216
 
1644
2217
</dd></dl>
1645
2218
 
1646
 
<dl>
 
2219
<p><a name="Item_003a-min"></a>
 
2220
</p><dl>
1647
2221
<dt><u>Function:</u> <b>min</b><i> (<var>x_1</var>, ..., <var>x_n</var>)</i>
1648
2222
<a name="IDX103"></a>
1649
2223
</dt>
1654
2228
<code>min (x, 2*x, 3*x) --&gt; min (x, 3*x)</code>. To set the value of <code>trylevel</code> to 2, use
1655
2229
<code>put (trylevel, 2, maxmin)</code>.
1656
2230
</p>
 
2231
<div class=categorybox>
 
2232
 
 
2233
 
 
2234
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Mathematical-functions">Mathematical functions</a>
 
2235
</p>
 
2236
</div>
 
2237
 
1657
2238
</dd></dl>
1658
2239
 
1659
 
<dl>
 
2240
<p><a name="Item_003a-polymod"></a>
 
2241
</p><dl>
1660
2242
<dt><u>Function:</u> <b>polymod</b><i> (<var>p</var>)</i>
1661
2243
<a name="IDX104"></a>
1662
2244
</dt>
1672
2254
</p>
1673
2255
<p>See <code>modulus</code>.
1674
2256
</p>
 
2257
<div class=categorybox>
 
2258
 
 
2259
 
 
2260
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Polynomials">Polynomials</a>
 
2261
</p>
 
2262
</div>
 
2263
 
1675
2264
</dd></dl>
1676
2265
 
1677
 
<dl>
 
2266
<p><a name="Item_003a-mod"></a>
 
2267
</p><dl>
1678
2268
<dt><u>Function:</u> <b>mod</b><i> (<var>x</var>, <var>y</var>)</i>
1679
2269
<a name="IDX106"></a>
1680
2270
</dt>
1705
2295
(%i3) mod (0, x);
1706
2296
(%o3)                           0
1707
2297
</pre>
 
2298
<div class=categorybox>
 
2299
 
 
2300
 
 
2301
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Mathematical-functions">Mathematical functions</a>
 
2302
</p>
 
2303
</div>
 
2304
 
1708
2305
</dd></dl>
1709
2306
 
1710
 
<dl>
 
2307
<p><a name="Item_003a-oddp"></a>
 
2308
</p><dl>
1711
2309
<dt><u>Function:</u> <b>oddp</b><i> (<var>expr</var>)</i>
1712
2310
<a name="IDX107"></a>
1713
2311
</dt>
1714
2312
<dd><p>is <code>true</code> if <var>expr</var> is an odd integer.
1715
2313
<code>false</code> is returned in all other cases.
1716
2314
</p>
 
2315
<div class=categorybox>
 
2316
 
 
2317
 
 
2318
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Predicate-functions">Predicate functions</a>
 
2319
</p>
 
2320
</div>
 
2321
 
1717
2322
</dd></dl>
1718
2323
 
1719
 
<dl>
 
2324
<p><a name="Item_003a-pred"></a>
 
2325
</p><dl>
1720
2326
<dt><u>Operator:</u> <b>pred</b>
1721
2327
<a name="IDX108"></a>
1722
2328
</dt>
1725
2331
or <code>false</code>) to be evaluated.
1726
2332
See <code>ev</code>.
1727
2333
</p>
 
2334
<div class=categorybox>
 
2335
 
 
2336
 
 
2337
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Evaluation-flags">Evaluation flags</a>
 
2338
</p>
 
2339
</div>
 
2340
 
1728
2341
</dd></dl>
1729
2342
 
1730
 
<dl>
 
2343
<p><a name="Item_003a-make_005frandom_005fstate"></a>
 
2344
</p><dl>
1731
2345
<dt><u>Function:</u> <b>make_random_state</b><i> (<var>n</var>)</i>
1732
2346
<a name="IDX109"></a>
1733
2347
</dt>
1757
2371
<p><code>make_random_state (false)</code> returns a copy of the current state
1758
2372
of the random number generator.
1759
2373
</p>
 
2374
<div class=categorybox>
 
2375
 
 
2376
 
 
2377
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Random-numbers">Random numbers</a>
 
2378
</p>
 
2379
</div>
 
2380
 
1760
2381
</dd></dl>
1761
2382
 
1762
 
<dl>
 
2383
<p><a name="Item_003a-set_005frandom_005fstate"></a>
 
2384
</p><dl>
1763
2385
<dt><u>Function:</u> <b>set_random_state</b><i> (<var>s</var>)</i>
1764
2386
<a name="IDX113"></a>
1765
2387
</dt>
1767
2389
</p>
1768
2390
<p><code>set_random_state</code> always returns <code>done</code>.
1769
2391
</p>
 
2392
<div class=categorybox>
 
2393
 
 
2394
 
 
2395
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Random-numbers">Random numbers</a>
 
2396
</p>
 
2397
</div>
 
2398
 
1770
2399
</dd></dl>
1771
2400
 
1772
 
<dl>
 
2401
<p><a name="Item_003a-random"></a>
 
2402
</p><dl>
1773
2403
<dt><u>Function:</u> <b>random</b><i> (<var>x</var>)</i>
1774
2404
<a name="IDX114"></a>
1775
2405
</dt>
1811
2441
(%i13) random (100.0);
1812
2442
(%o13)                  32.28666704056853
1813
2443
</pre>
 
2444
<div class=categorybox>
 
2445
 
 
2446
 
 
2447
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Random-numbers">Random numbers</a>
 
2448
 &middot;
 
2449
<a href="maxima_93.html#Category_003a-Numerical-methods">Numerical methods</a>
 
2450
</p>
 
2451
</div>
 
2452
 
 
2453
 
1814
2454
</dd></dl>
1815
2455
 
1816
 
<dl>
 
2456
<p><a name="Item_003a-rationalize"></a>
 
2457
</p><dl>
1817
2458
<dt><u>Function:</u> <b>rationalize</b><i> (<var>expr</var>)</i>
1818
2459
<a name="IDX115"></a>
1819
2460
</dt>
1890
2531
(%o7)                          --
1891
2532
                               37
1892
2533
</pre>
1893
 
</dd></dl>
1894
 
 
1895
 
<dl>
 
2534
<div class=categorybox>
 
2535
 
 
2536
 
 
2537
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Numerical-evaluation">Numerical evaluation</a>
 
2538
</p>
 
2539
</div>
 
2540
 
 
2541
</dd></dl>
 
2542
 
 
2543
<p><a name="Item_003a-round"></a>
 
2544
</p><dl>
 
2545
<dt><u>Function:</u> <b>round</b><i> (<var>x</var>)</i>
 
2546
<a name="IDX116"></a>
 
2547
</dt>
 
2548
<dd><p>When <var>x</var> is a real number, returns the closest integer 
 
2549
to <var>x</var>.  Multiples of 1/2 are rounded to the nearest 
 
2550
even integer.  Evaluation of <var>x</var> is similar to 
 
2551
<code>floor</code> and <code>ceiling</code>.
 
2552
</p>
 
2553
<div class=categorybox>
 
2554
 
 
2555
 
 
2556
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Mathematical-functions">Mathematical functions</a>
 
2557
</p>
 
2558
</div>
 
2559
 
 
2560
</dd></dl>
 
2561
 
 
2562
 
 
2563
<p><a name="Item_003a-sign"></a>
 
2564
</p><dl>
1896
2565
<dt><u>Function:</u> <b>sign</b><i> (<var>expr</var>)</i>
1897
 
<a name="IDX116"></a>
 
2566
<a name="IDX117"></a>
1898
2567
</dt>
1899
2568
<dd><p>Attempts to determine the sign of <var>expr</var>
1900
2569
on the basis of the facts in the current data base.  It returns one of
1902
2571
(positive or zero), <code>nz</code> (negative or zero), <code>pn</code> (positive or negative),
1903
2572
or <code>pnz</code> (positive, negative, or zero, i.e. nothing known).
1904
2573
</p>
 
2574
<div class=categorybox>
 
2575
 
 
2576
 
 
2577
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
 
2578
</p>
 
2579
</div>
 
2580
 
1905
2581
</dd></dl>
1906
2582
 
1907
 
<dl>
 
2583
<p><a name="Item_003a-signum"></a>
 
2584
</p><dl>
1908
2585
<dt><u>Function:</u> <b>signum</b><i> (<var>x</var>)</i>
1909
 
<a name="IDX117"></a>
 
2586
<a name="IDX118"></a>
1910
2587
</dt>
1911
2588
<dd><p>For numeric <var>x</var>, returns 0 if <var>x</var> is 0, otherwise returns -1 or +1
1912
2589
as <var>x</var> is less than or greater than 0, respectively.
1914
2591
<p>If <var>x</var> is not numeric then a simplified but equivalent form is returned.
1915
2592
For example, <code>signum(-x)</code> gives <code>-signum(x)</code>.
1916
2593
</p>
 
2594
<div class=categorybox>
 
2595
 
 
2596
 
 
2597
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Mathematical-functions">Mathematical functions</a>
 
2598
</p>
 
2599
</div>
 
2600
 
1917
2601
</dd></dl>
1918
2602
 
1919
 
<dl>
 
2603
<p><a name="Item_003a-sort"></a>
 
2604
</p><dl>
1920
2605
<dt><u>Function:</u> <b>sort</b><i> (<var>L</var>, <var>P</var>)</i>
1921
 
<a name="IDX118"></a>
 
2606
<a name="IDX119"></a>
1922
2607
</dt>
1923
2608
<dt><u>Function:</u> <b>sort</b><i> (<var>L</var>)</i>
1924
 
<a name="IDX119"></a>
 
2609
<a name="IDX120"></a>
1925
2610
</dt>
1926
2611
<dd><p>Sorts a list <var>L</var> according to a predicate <code>P</code> of two arguments,
1927
2612
such that <code><var>P</var> (<var>L</var>[k], <var>L</var>[k + 1])</code> is <code>true</code>
1973
2658
      reverse (b))));
1974
2659
(%o7) [[%pi, %e], [ee, cc], [zz, xx, mm, cc], [aa, hh, uu]]
1975
2660
</pre>
 
2661
<div class=categorybox>
 
2662
 
 
2663
 
 
2664
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Lists">Lists</a>
 
2665
</p>
 
2666
</div>
 
2667
 
1976
2668
</dd></dl>
1977
2669
 
1978
 
<dl>
 
2670
<p><a name="Item_003a-sqrt"></a>
 
2671
</p><dl>
1979
2672
<dt><u>Function:</u> <b>sqrt</b><i> (<var>x</var>)</i>
1980
 
<a name="IDX120"></a>
 
2673
<a name="IDX121"></a>
1981
2674
</dt>
1982
2675
<dd><p>The square root of <var>x</var>. It is represented internally by
1983
2676
<code><var>x</var>^(1/2)</code>.  See also <code>rootscontract</code>.
1986
2679
which are powers of n to be pulled outside of the radical, e.g.
1987
2680
<code>sqrt(16*x^2)</code> will become <code>4*x</code> only if <code>radexpand</code> is <code>true</code>.
1988
2681
</p>
 
2682
<div class=categorybox>
 
2683
 
 
2684
 
 
2685
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Mathematical-functions">Mathematical functions</a>
 
2686
</p>
 
2687
</div>
 
2688
 
1989
2689
</dd></dl>
1990
2690
 
1991
 
<dl>
 
2691
<p><a name="Item_003a-sqrtdispflag"></a>
 
2692
</p><dl>
1992
2693
<dt><u>Option variable:</u> <b>sqrtdispflag</b>
1993
 
<a name="IDX121"></a>
 
2694
<a name="IDX122"></a>
1994
2695
</dt>
1995
2696
<dd><p>Default value: <code>true</code>
1996
2697
</p>
1997
2698
<p>When <code>sqrtdispflag</code> is <code>false</code>,
1998
2699
causes <code>sqrt</code> to display with exponent 1/2.
1999
2700
</p>
 
2701
<div class=categorybox>
 
2702
 
 
2703
 
 
2704
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Mathematical-functions">Mathematical functions</a>
 
2705
 &middot;
 
2706
<a href="maxima_93.html#Category_003a-Display-flags-and-variables">Display flags and variables</a>
 
2707
</p>
 
2708
</div>
 
2709
 
 
2710
 
2000
2711
</dd></dl>
2001
2712
 
2002
 
<dl>
 
2713
<p><a name="Item_003a-sublis"></a>
 
2714
</p><dl>
2003
2715
<dt><u>Function:</u> <b>sublis</b><i> (<var>list</var>, <var>expr</var>)</i>
2004
 
<a name="IDX122"></a>
 
2716
<a name="IDX123"></a>
2005
2717
</dt>
2006
2718
<dd><p>Makes multiple parallel substitutions into an expression.
2007
2719
</p>
2013
2725
<pre class="example">(%i1) sublis ([a=b, b=a], sin(a) + cos(b));
2014
2726
(%o1)                    sin(b) + cos(a)
2015
2727
</pre>
 
2728
<div class=categorybox>
 
2729
 
 
2730
 
 
2731
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Expressions">Expressions</a>
 
2732
</p>
 
2733
</div>
 
2734
 
2016
2735
</dd></dl>
2017
2736
 
2018
 
<dl>
 
2737
<p><a name="Item_003a-sublist"></a>
 
2738
</p><dl>
2019
2739
<dt><u>Function:</u> <b>sublist</b><i> (<var>list</var>, <var>p</var>)</i>
2020
 
<a name="IDX123"></a>
 
2740
<a name="IDX124"></a>
2021
2741
</dt>
2022
2742
<dd><p>Returns the list of elements of <var>list</var> for which the
2023
2743
predicate <code>p</code> returns <code>true</code>.
2029
2749
(%i2) sublist (L, evenp);
2030
2750
(%o2)                       [2, 4, 6]
2031
2751
</pre>
 
2752
<div class=categorybox>
 
2753
 
 
2754
 
 
2755
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Lists">Lists</a>
 
2756
</p>
 
2757
</div>
 
2758
 
2032
2759
</dd></dl>
2033
2760
 
2034
 
<dl>
 
2761
<p><a name="Item_003a-sublis_005fapply_005flambda"></a>
 
2762
</p><dl>
2035
2763
<dt><u>Option variable:</u> <b>sublis_apply_lambda</b>
2036
 
<a name="IDX124"></a>
 
2764
<a name="IDX125"></a>
2037
2765
</dt>
2038
 
<dd><p>Default value: <code>true</code> - controls whether <code>lambda</code>'s
 
2766
<dd><p>Default value: <code>true</code>
 
2767
</p>
 
2768
<p>Controls whether <code>lambda</code>'s
2039
2769
substituted are applied in simplification after <code>sublis</code> is used or
2040
2770
whether you have to do an <code>ev</code> to get things to apply. <code>true</code> means do the
2041
2771
application.
2042
2772
</p>
 
2773
<div class=categorybox>
 
2774
 
 
2775
 
 
2776
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Expressions">Expressions</a>
 
2777
</p>
 
2778
</div>
 
2779
 
 
2780
 
2043
2781
</dd></dl>
2044
2782
 
2045
 
<dl>
 
2783
<p><a name="Item_003a-subst"></a>
 
2784
</p><dl>
2046
2785
<dt><u>Function:</u> <b>subst</b><i> (<var>a</var>, <var>b</var>, <var>c</var>)</i>
2047
 
<a name="IDX125"></a>
 
2786
<a name="IDX126"></a>
2048
2787
</dt>
2049
2788
<dd><p>Substitutes <var>a</var> for <var>b</var> in <var>c</var>.  <var>b</var> must be an atom or a
2050
2789
complete subexpression of <var>c</var>.  For example, <code>x+y+z</code> is a complete
2084
2823
 
2085
2824
<p>For further examples, do <code>example (subst)</code>.
2086
2825
</p>
 
2826
<div class=categorybox>
 
2827
 
 
2828
 
 
2829
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Expressions">Expressions</a>
 
2830
</p>
 
2831
</div>
 
2832
 
2087
2833
</dd></dl>
2088
2834
 
2089
 
<dl>
 
2835
<p><a name="Item_003a-substinpart"></a>
 
2836
</p><dl>
2090
2837
<dt><u>Function:</u> <b>substinpart</b><i> (<var>x</var>, <var>expr</var>, <var>n_1</var>, ..., <var>n_k</var>)</i>
2091
 
<a name="IDX126"></a>
 
2838
<a name="IDX127"></a>
2092
2839
</dt>
2093
2840
<dd><p>Similar to <code>substpart</code>, but <code>substinpart</code> works on the
2094
2841
internal representation of <var>expr</var>.
2107
2854
(%i3) substinpart (f1, f[1](x + 1), 0);
2108
2855
(%o3)                       f1(x + 1)
2109
2856
</pre>
2110
 
<p>If the last argument to a part function is a list of indices then
 
2857
<p>If the last argument to a <code>part</code> function is a list of indices then
2111
2858
several subexpressions are picked out, each one corresponding to an
2112
2859
index of the list.  Thus
2113
2860
</p>
2115
2862
(%o1)                         z + x
2116
2863
</pre>
2117
2864
<p><code>piece</code> holds the value of the last expression selected when using the
2118
 
part functions.  It is set during the execution of the function and
 
2865
<code>part</code> functions.  It is set during the execution of the function and
2119
2866
thus may be referred to in the function itself as shown below.
2120
2867
If <code>partswitch</code> is set to <code>true</code> then <code>end</code> is returned when a
2121
2868
selected part of an expression doesn't exist, otherwise an error
2144
2891
<p>Also, setting the option <code>inflag</code> to <code>true</code> and calling <code>part</code> or <code>substpart</code> is 
2145
2892
the same as calling <code>inpart</code> or <code>substinpart</code>.
2146
2893
</p>
 
2894
<div class=categorybox>
 
2895
 
 
2896
 
 
2897
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Expressions">Expressions</a>
 
2898
</p>
 
2899
</div>
 
2900
 
2147
2901
</dd></dl>
2148
2902
 
2149
 
<dl>
 
2903
<p><a name="Item_003a-substpart"></a>
 
2904
</p><dl>
2150
2905
<dt><u>Function:</u> <b>substpart</b><i> (<var>x</var>, <var>expr</var>, <var>n_1</var>, ..., <var>n_k</var>)</i>
2151
 
<a name="IDX127"></a>
 
2906
<a name="IDX128"></a>
2152
2907
</dt>
2153
2908
<dd><p>Substitutes <var>x</var> for the subexpression
2154
2909
picked out by the rest of the arguments as in <code>part</code>.  It returns the
2174
2929
<p>Also, setting the option <code>inflag</code> to <code>true</code> and calling <code>part</code> or <code>substpart</code> is 
2175
2930
the same as calling <code>inpart</code> or <code>substinpart</code>.
2176
2931
</p>
 
2932
<div class=categorybox>
 
2933
 
 
2934
 
 
2935
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Expressions">Expressions</a>
 
2936
</p>
 
2937
</div>
 
2938
 
2177
2939
</dd></dl>
2178
2940
 
2179
 
<dl>
 
2941
<p><a name="Item_003a-subvarp"></a>
 
2942
</p><dl>
2180
2943
<dt><u>Function:</u> <b>subvarp</b><i> (<var>expr</var>)</i>
2181
 
<a name="IDX128"></a>
 
2944
<a name="IDX129"></a>
2182
2945
</dt>
2183
2946
<dd><p>Returns <code>true</code> if <var>expr</var> is a subscripted variable, for example
2184
2947
<code>a[i]</code>.
2185
2948
</p>
 
2949
<div class=categorybox>
 
2950
 
 
2951
 
 
2952
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Predicate-functions">Predicate functions</a>
 
2953
</p>
 
2954
</div>
 
2955
 
2186
2956
</dd></dl>
2187
2957
 
2188
 
<dl>
 
2958
<p><a name="Item_003a-symbolp"></a>
 
2959
</p><dl>
2189
2960
<dt><u>Function:</u> <b>symbolp</b><i> (<var>expr</var>)</i>
2190
 
<a name="IDX129"></a>
 
2961
<a name="IDX130"></a>
2191
2962
</dt>
2192
2963
<dd><p>Returns <code>true</code> if <var>expr</var> is a symbol, else <code>false</code>.
2193
2964
In effect, <code>symbolp(x)</code> is equivalent to the predicate <code>atom(x) and not numberp(x)</code>.
2194
2965
</p>
2195
 
<p>See also <a href="maxima_6.html#SEC25">Identifiers</a>.
2196
 
</p>
 
2966
<p>See also <a href="maxima_6.html#SEC24">Identifiers</a>.
 
2967
</p>
 
2968
<div class=categorybox>
 
2969
 
 
2970
 
 
2971
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Predicate-functions">Predicate functions</a>
 
2972
</p>
 
2973
</div>
 
2974
 
2197
2975
</dd></dl>
2198
2976
 
2199
 
<dl>
 
2977
<p><a name="Item_003a-unorder"></a>
 
2978
</p><dl>
2200
2979
<dt><u>Function:</u> <b>unorder</b><i> ()</i>
2201
 
<a name="IDX130"></a>
 
2980
<a name="IDX131"></a>
2202
2981
</dt>
2203
2982
<dd><p>Disables the aliasing created by the last use of the ordering
2204
2983
commands <code>ordergreat</code> and <code>orderless</code>. <code>ordergreat</code> and <code>orderless</code> may not
2222
3001
                              2    2
2223
3002
(%o5)                        a  - a
2224
3003
</pre>
 
3004
<div class=categorybox>
 
3005
 
 
3006
 
 
3007
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Expressions">Expressions</a>
 
3008
</p>
 
3009
</div>
 
3010
 
2225
3011
</dd></dl>
2226
3012
 
2227
 
<dl>
 
3013
<p><a name="Item_003a-vectorpotential"></a>
 
3014
</p><dl>
2228
3015
<dt><u>Function:</u> <b>vectorpotential</b><i> (<var>givencurl</var>)</i>
2229
 
<a name="IDX131"></a>
 
3016
<a name="IDX132"></a>
2230
3017
</dt>
2231
3018
<dd><p>Returns the vector potential of a given
2232
3019
curl vector, in the current coordinate system.
2234
3021
the left-hand sides of the equations must be a cyclic permutation of
2235
3022
the coordinate variables.
2236
3023
</p>
 
3024
<div class=categorybox>
 
3025
 
 
3026
 
 
3027
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Package-vect">Package vect</a>
 
3028
</p>
 
3029
</div>
 
3030
 
2237
3031
</dd></dl>
2238
3032
 
2239
 
<dl>
 
3033
<p><a name="Item_003a-xthru"></a>
 
3034
</p><dl>
2240
3035
<dt><u>Function:</u> <b>xthru</b><i> (<var>expr</var>)</i>
2241
 
<a name="IDX132"></a>
 
3036
<a name="IDX133"></a>
2242
3037
</dt>
2243
3038
<dd><p>Combines all terms of <var>expr</var> (which should be a sum) over a
2244
3039
common denominator without expanding products and exponentiated sums
2264
3059
                                   20
2265
3060
                            (y + x)
2266
3061
</pre>
 
3062
<div class=categorybox>
 
3063
 
 
3064
 
 
3065
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Expressions">Expressions</a>
 
3066
</p>
 
3067
</div>
 
3068
 
2267
3069
</dd></dl>
2268
3070
 
2269
 
<dl>
 
3071
<p><a name="Item_003a-zeroequiv"></a>
 
3072
</p><dl>
2270
3073
<dt><u>Function:</u> <b>zeroequiv</b><i> (<var>expr</var>, <var>v</var>)</i>
2271
 
<a name="IDX133"></a>
 
3074
<a name="IDX134"></a>
2272
3075
</dt>
2273
3076
<dd><p>Tests whether the expression <var>expr</var> in the variable
2274
3077
<var>v</var> is equivalent to zero, returning <code>true</code>, <code>false</code>, or
2298
3101
On the other hand <code>zeroequiv (log(a*b) - log(a) - log(b), a)</code> returns <code>dontknow</code> because
2299
3102
of the presence of an extra parameter <code>b</code>.
2300
3103
</p>
 
3104
<div class=categorybox>
 
3105
 
 
3106
 
 
3107
<p>Categories:&nbsp;&nbsp;<a href="maxima_93.html#Category_003a-Predicate-functions">Predicate functions</a>
 
3108
</p>
 
3109
</div>
 
3110
 
2301
3111
</dd></dl>
2302
3112
 
2303
 
<hr size="6">
 
3113
<p><a name="Item_003a-Expressions"></a>
 
3114
</p><hr size="6">
2304
3115
<table cellpadding="1" cellspacing="1" border="0">
2305
3116
<tr><td valign="middle" align="left">[<a href="#SEC12" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
2306
3117
<td valign="middle" align="left">[<a href="maxima_6.html#SEC20" title="Next chapter"> &gt;&gt; </a>]</td>
2311
3122
<td valign="middle" align="left"> &nbsp; </td>
2312
3123
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
2313
3124
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
2314
 
<td valign="middle" align="left">[<a href="maxima_77.html#SEC300" title="Index">Index</a>]</td>
 
3125
<td valign="middle" align="left">[<a href="maxima_79.html#SEC320" title="Index">Index</a>]</td>
2315
3126
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
2316
3127
</tr></table>
2317
3128
<p>
2318
3129
 <font size="-1">
2319
 
  This document was generated by <em>Robert Dodier</em> on <em>August, 25 2007</em> using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
 
3130
  This document was generated by <em>Robert Dodier</em> on <em>December, 14 2008</em> using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
2320
3131
 </font>
2321
3132
 <br>
2322
3133