/usr/share/doc/maxima-doc/html/maxima_4.html is in maxima-doc 5.32.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on January, 10 2014 by texi2html 1.76 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>
-->
<head>
<title>Maxima 5.32.1 Manual: 4. Command Line</title>
<meta name="description" content="Maxima 5.32.1 Manual: 4. Command Line">
<meta name="keywords" content="Maxima 5.32.1 Manual: 4. Command Line">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.76">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
body
{
color: black;
background: white;
margin-left: 8%;
margin-right: 13%;
}
h1
{
margin-left: +8%;
font-size: 150%;
font-family: sans-serif
}
h2
{
font-size: 125%;
font-family: sans-serif
}
h3
{
font-size: 100%;
font-family: sans-serif
}
h2,h3,h4,h5,h6 { margin-left: +4%; }
div.textbox
{
border: solid;
border-width: thin;
/* width: 100%; */
padding-top: 1em;
padding-bottom: 1em;
padding-left: 2em;
padding-right: 2em
}
div.titlebox
{
border: none;
padding-top: 1em;
padding-bottom: 1em;
padding-left: 2em;
padding-right: 2em;
background: rgb(200,255,255);
font-family: sans-serif
}
div.synopsisbox
{
border: none;
padding-top: 1em;
padding-bottom: 1em;
padding-left: 2em;
padding-right: 2em;
background: rgb(255,220,255);
/*background: rgb(200,255,255); */
/* font-family: fixed */
}
pre.example
{
border: 1px solid gray;
padding-top: 1em;
padding-bottom: 1em;
padding-left: 1em;
padding-right: 1em;
/* background: rgb(247,242,180); */ /* kind of sandy */
/* background: rgb(200,255,255); */ /* sky blue */
background-color: #F1F5F9; /* light blue-gray */
/* font-family: "Lucida Console", monospace */
}
div.spacerbox
{
border: none;
padding-top: 2em;
padding-bottom: 2em
}
div.image
{
margin: 0;
padding: 1em;
text-align: center;
}
div.categorybox
{
border: 1px solid gray;
padding-top: 0px;
padding-bottom: 0px;
padding-left: 1em;
padding-right: 1em;
background: rgb(247,242,220);
}
-->
</style>
<link rel="icon" href="http://maxima.sourceforge.net/favicon.ico"/>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Command-Line"></a>
<a name="SEC7"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="maxima_3.html#SEC6" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC8" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima_3.html#SEC4" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_5.html#SEC11" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 4. Command Line </h1>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC8">4.1 Introduction to Command Line</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC9">4.2 Functions and Variables for Command Line</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC10">4.3 Functions and Variables for Display</a></td><td> </td><td align="left" valign="top">
</td></tr>
</table>
<p><a name="Item_003a-Introduction-to-Command-Line"></a>
</p><hr size="6">
<a name="Introduction-to-Command-Line"></a>
<a name="SEC8"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC7" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC9" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_5.html#SEC11" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.1 Introduction to Command Line </h2>
<p><a name="Item_003a-Functions-and-Variables-for-Command-Line"></a>
</p><hr size="6">
<a name="Functions-and-Variables-for-Command-Line"></a>
<a name="SEC9"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC8" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC10" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_5.html#SEC11" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.2 Functions and Variables for Command Line </h2>
<p><a name="g_t_005f_005f"></a>
<a name="Item_003a-_005f_005f"></a>
</p><dl>
<dt><u>System variable:</u> <b>__</b>
<a name="IDX13"></a>
</dt>
<dd><p><code>__</code> is the input expression currently being evaluated. That is, while an
input expression <var>expr</var> is being evaluated, <code>__</code> is <var>expr</var>.
</p>
<p><code>__</code> is assigned the input expression before the input is simplified or
evaluated. However, the value of <code>__</code> is simplified (but not evaluated)
when it is displayed.
</p>
<p><code>__</code> is recognized by <code><a href="maxima_13.html#batch">batch</a></code> and <code><a href="maxima_13.html#load">load</a></code>. In a file processed
by <code>batch</code>, <code>__</code> has the same meaning as at the interactive prompt.
In a file processed by <code>load</code>, <code>__</code> is bound to the input expression
most recently entered at the interactive prompt or in a batch file; <code>__</code>
is not bound to the input expressions in the file being processed. In
particular, when <code>load (<var>filename</var>)</code> is called from the interactive
prompt, <code>__</code> is bound to <code>load (<var>filename</var>)</code> while the file is
being processed.
</p>
<p>See also <code><a href="#g_t_005f">_</a></code> and <code><a href="#g_t_0025">%</a></code>.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) print ("I was called as", __);
I was called as print(I was called as, __)
(%o1) print(I was called as, __)
(%i2) foo (__);
(%o2) foo(foo(__))
(%i3) g (x) := (print ("Current input expression =", __), 0);
(%o3) g(x) := (print("Current input expression =", __), 0)
(%i4) [aa : 1, bb : 2, cc : 3];
(%o4) [1, 2, 3]
(%i5) (aa + bb + cc)/(dd + ee + g(x));
cc + bb + aa
Current input expression = --------------
g(x) + ee + dd
6
(%o5) -------
ee + dd
</pre>
<div class=categorybox>
·
<p>@ref{Category: Global variables}
</div>
</p></dd></dl>
<p><a name="g_t_005f"></a>
<a name="Item_003a-_005f"></a>
</p><dl>
<dt><u>System variable:</u> <b>_</b>
<a name="IDX14"></a>
</dt>
<dd><p><code>_</code> is the most recent input expression (e.g., <code>%i1</code>, <code>%i2</code>,
<code>%i3</code>, …).
</p>
<p><code>_</code> is assigned the input expression before the input is simplified or
evaluated. However, the value of <code>_</code> is simplified (but not evaluated)
when it is displayed.
</p>
<p><code>_</code> is recognized by <code><a href="maxima_13.html#batch">batch</a></code> and <code><a href="maxima_13.html#load">load</a></code>. In a file processed
by <code>batch</code>, <code>_</code> has the same meaning as at the interactive prompt.
In a file processed by <code>load</code>, <code>_</code> is bound to the input expression
most recently evaluated at the interactive prompt or in a batch file; <code>_</code>
is not bound to the input expressions in the file being processed.
</p>
<p>See also <code><a href="#g_t_005f_005f">__</a></code> and <code><a href="#g_t_0025">%</a></code>.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) 13 + 29;
(%o1) 42
(%i2) :lisp $_
((MPLUS) 13 29)
(%i2) _;
(%o2) 42
(%i3) sin (%pi/2);
(%o3) 1
(%i4) :lisp $_
((%SIN) ((MQUOTIENT) $%PI 2))
(%i4) _;
(%o4) 1
(%i5) a: 13$
(%i6) b: 29$
(%i7) a + b;
(%o7) 42
(%i8) :lisp $_
((MPLUS) $A $B)
(%i8) _;
(%o8) b + a
(%i9) a + b;
(%o9) 42
(%i10) ev (_);
(%o10) 42
</pre>
<div class=categorybox>
·
<p>@ref{Category: Console interaction} ·
@ref{Category: Global variables}
</div>
</p></dd></dl>
<p><a name="g_t_0025"></a>
<a name="Item_003a-_0025"></a>
</p><dl>
<dt><u>System variable:</u> <b>%</b>
<a name="IDX15"></a>
</dt>
<dd><p><code>%</code> is the output expression (e.g., <code>%o1</code>, <code>%o2</code>, <code>%o3</code>,
…) most recently computed by Maxima, whether or not it was displayed.
</p>
<p><code>%</code> is recognized by <code><a href="maxima_13.html#batch">batch</a></code> and <code><a href="maxima_13.html#load">load</a></code>. In a file processed
by <code>batch</code>, <code>%</code> has the same meaning as at the interactive prompt.
In a file processed by <code>load</code>, <code>%</code> is bound to the output expression
most recently computed at the interactive prompt or in a batch file; <code>%</code>
is not bound to output expressions in the file being processed.
</p>
<p>See also <code><a href="#g_t_005f">_</a></code>, <code><a href="#g_t_0025_0025">%%</a></code>, and <code><a href="#g_t_0025th">%th</a></code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Console interaction} ·
@ref{Category: Global variables}
</div>
</p></dd></dl>
<p><a name="g_t_0025_0025"></a>
<a name="Item_003a-_0025_0025"></a>
</p><dl>
<dt><u>System variable:</u> <b>%%</b>
<a name="IDX16"></a>
</dt>
<dd><p>In compound statements, namely <code><a href="maxima_36.html#block">block</a></code>, <code><a href="maxima_36.html#lambda">lambda</a></code>, or
<code>(<var>s_1</var>, ..., <var>s_n</var>)</code>, <code>%%</code> is the value of the previous
statement.
</p>
<p>At the first statement in a compound statement, or outside of a compound
statement, <code>%%</code> is undefined.
</p>
<p><code>%%</code> is recognized by <code><a href="maxima_13.html#batch">batch</a></code> and <code><a href="maxima_13.html#load">load</a></code>, and it has the
same meaning as at the interactive prompt.
</p>
<p>See also <code><a href="#g_t_0025">%</a></code>.
</p>
<p>Examples:
</p>
<p>The following two examples yield the same result.
</p>
<pre class="example">(%i1) block (integrate (x^5, x), ev (%%, x=2) - ev (%%, x=1));
21
(%o1) --
2
(%i2) block ([prev], prev: integrate (x^5, x),
ev (prev, x=2) - ev (prev, x=1));
21
(%o2) --
2
</pre>
<p>A compound statement may comprise other compound statements. Whether a
statement be simple or compound, <code>%%</code> is the value of the previous
statement.
</p>
<pre class="example">(%i3) block (block (a^n, %%*42), %%/6);
n
(%o3) 7 a
</pre>
<p>Within a compound statement, the value of <code>%%</code> may be inspected at a break
prompt, which is opened by executing the <code><a href="maxima_36.html#break">break</a></code> function. For example,
entering <code>%%;</code> in the following example yields <code>42</code>.
</p>
<pre class="example">(%i4) block (a: 42, break ())$
Entering a Maxima break point. Type 'exit;' to resume.
_%%;
42
_
</pre>
<div class=categorybox>
·
<p>@ref{Category: Global variables}
</div>
</p></dd></dl>
<p><a name="g_t_0025th"></a>
<a name="Item_003a-_0025th"></a>
</p><dl>
<dt><u>Function:</u> <b>%th</b><i> (<var>i</var>)</i>
<a name="IDX17"></a>
</dt>
<dd><p>The value of the <var>i</var>'th previous output expression. That is, if the next
expression to be computed is the <var>n</var>'th output, <code>%th (<var>m</var>)</code> is the
(<var>n</var> - <var>m</var>)'th output.
</p>
<p><code>%th</code> is recognized by <code><a href="maxima_13.html#batch">batch</a></code> and <code><a href="maxima_13.html#load">load</a></code>. In a file processed
by <code>batch</code>, <code>%th</code> has the same meaning as at the interactive prompt.
In a file processed by <code>load</code>, <code>%th</code> refers to output expressions most
recently computed at the interactive prompt or in a batch file; <code>%th</code> does
not refer to output expressions in the file being processed.
</p>
<p>See also <code><a href="#g_t_0025">%</a></code> and <code><a href="#g_t_0025_0025">%%</a></code>.
</p>
<p>Example:
</p>
<p><code>%th</code> is useful in <code>batch</code> files or for referring to a group of
output expressions. This example sets <code>s</code> to the sum of the last five
output expressions.
</p>
<pre class="example">(%i1) 1;2;3;4;5;
(%o1) 1
(%o2) 2
(%o3) 3
(%o4) 4
(%o5) 5
(%i6) block (s: 0, for i:1 thru 5 do s: s + %th(i), s);
(%o6) 15
</pre>
<div class=categorybox>
·
<p>@ref{Category: Console interaction}
</div>
</p></dd></dl>
<p><a name="g_t_003f"></a>
<a name="Item_003a-_003f"></a>
</p><dl>
<dt><u>Special symbol:</u> <b>?</b>
<a name="IDX18"></a>
</dt>
<dd><p>As prefix to a function or variable name, <code>?</code> signifies that the name is a
Lisp name, not a Maxima name. For example, <code>?round</code> signifies the Lisp
function <code>ROUND</code>. See <a href="maxima_37.html#SEC201">Lisp and Maxima</a> for more on this point.
</p>
<p>The notation <code>? word</code> (a question mark followed a word, separated by
whitespace) is equivalent to <code>describe("word")</code>. The question mark must
occur at the beginning of an input line; otherwise it is not recognized as a
request for documentation. See also <code><a href="maxima_3.html#describe">describe</a></code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Help} ·
@ref{Category: Console interaction}
</div>
</p></dd></dl>
<p><a name="g_t_003f_003f"></a>
<a name="Item_003a-_003f_003f"></a>
</p><dl>
<dt><u>Special symbol:</u> <b>??</b>
<a name="IDX19"></a>
</dt>
<dd><p>The notation <code>?? word</code> (<code>??</code> followed a word, separated by whitespace)
is equivalent to <code>describe("word", inexact)</code>. The question mark must occur
at the beginning of an input line; otherwise it is not recognized as a request
for documentation. See also <code><a href="maxima_3.html#describe">describe</a></code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Help} ·
@ref{Category: Console interaction}
</div>
</p></dd></dl>
<p><a name="inchar"></a>
<a name="Item_003a-inchar"></a>
</p><dl>
<dt><u>Option variable:</u> <b>inchar</b>
<a name="IDX20"></a>
</dt>
<dd><p>Default value: <code>%i</code>
</p>
<p><code>inchar</code> is the prefix of the labels of expressions entered by the user.
Maxima automatically constructs a label for each input expression by
concatenating <code>inchar</code> and <code><a href="#linenum">linenum</a></code>.
</p>
<p><code>inchar</code> may be assigned any string or symbol, not necessarily a single
character. Because Maxima internally takes into account only the first char of
the prefix, the prefixes <code>inchar</code>, <code><a href="#outchar">outchar</a></code>, and
<code><a href="#linechar">linechar</a></code> should have a different first char. Otherwise some commands
like <code>kill(inlables)</code> do not work as expected.
</p>
<p>See also <code>labels</code>.
</p>
<p>Example:
</p>
<pre class="example">(%i1) inchar: "input";
(%o1) input
(input2) expand((a+b)^3);
3 2 2 3
(%o2) b + 3 a b + 3 a b + a
(input3)
</pre>
<div class=categorybox>
·
<p>@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="infolists"></a>
<a name="Item_003a-infolists"></a>
</p><dl>
<dt><u>System variable:</u> <b>infolists</b>
<a name="IDX21"></a>
</dt>
<dd><p>Default value: <code>[]</code>
</p>
<p><code>infolists</code> is a list of the names of all of the information
lists in Maxima. These are:
</p>
<dl compact="compact">
<dt> <code>labels</code></dt>
<dd><p>All bound <code>%i</code>, <code>%o</code>, and <code>%t</code> labels.
</p></dd>
<dt> <code>values</code></dt>
<dd><p>All bound atoms which are user variables, not Maxima options or switches,
created by <code><a href="maxima_7.html#g_t_003a">:</a></code> or <code><a href="maxima_7.html#g_t_003a_003a">::</a></code> or functional binding.
</p></dd>
<dt> <code>functions</code></dt>
<dd><p>All user-defined functions, created by <code><a href="maxima_7.html#g_t_003a_003d">:=</a></code> or <code><a href="maxima_36.html#define">define</a></code>.
</p></dd>
<dt> <code>arrays</code></dt>
<dd><p>All declared and undeclared arrays, created by <code>:</code>, <code>::</code>, or
<code>:=</code>.
</p></dd>
<dt> <code>macros</code></dt>
<dd><p>All user-defined macro functions, created by <code><a href="maxima_7.html#g_t_003a_003a_003d">::=</a></code>.
</p></dd>
<dt> <code>myoptions</code></dt>
<dd><p>All options ever reset by the user (whether or not they
are later reset to their default values).
</p></dd>
<dt> <code>rules</code></dt>
<dd><p>All user-defined pattern matching and simplification rules, created
by <code><a href="maxima_34.html#tellsimp">tellsimp</a></code>, <code><a href="maxima_34.html#tellsimpafter">tellsimpafter</a></code>, <code><a href="maxima_34.html#defmatch">defmatch</a></code>, or
<code><a href="maxima_34.html#defrule">defrule</a></code>.
</p></dd>
<dt> <code>aliases</code></dt>
<dd><p>All atoms which have a user-defined alias, created by the <code><a href="maxima_6.html#alias">alias</a></code>,
<code><a href="maxima_6.html#ordergreat">ordergreat</a></code>, <code><a href="maxima_6.html#orderless">orderless</a></code> functions or by declaring the atom as a
<code><a href="maxima_6.html#noun">noun</a></code> with <code><a href="maxima_11.html#declare">declare</a></code>.
</p></dd>
<dt> <code>dependencies</code></dt>
<dd><p>All atoms which have functional dependencies, created by the
<code><a href="maxima_18.html#depends">depends</a></code>, <code><a href="maxima_18.html#dependencies">dependencies</a></code>, or <code><a href="maxima_18.html#gradef">gradef</a></code> functions.
</p></dd>
<dt> <code>gradefs</code></dt>
<dd><p>All functions which have user-defined derivatives, created by the
<code><a href="maxima_18.html#gradef">gradef</a></code> function.
</p></dd>
<dt> <code>props</code></dt>
<dd><p>All atoms which have any property other than those mentioned above, such as
properties established by <code><a href="maxima_18.html#atvalue">atvalue</a></code> or <code><a href="maxima_34.html#matchdeclare">matchdeclare</a></code>, etc.,
as well as properties established in the <code><a href="maxima_11.html#declare">declare</a></code> function.
</p></dd>
<dt> <code>let_rule_packages</code></dt>
<dd><p>All user-defined <code><a href="maxima_34.html#let">let</a></code> rule packages
plus the special package <code><a href="maxima_34.html#default_005flet_005frule_005fpackage">default_let_rule_package</a></code>.
(<code>default_let_rule_package</code> is the name of the rule package used when
one is not explicitly set by the user.)
</p></dd>
</dl>
<div class=categorybox>
·
<p>@ref{Category: Declarations and inferences} ·
@ref{Category: Global variables}
</div>
</p></dd></dl>
<p><a name="kill"></a>
<a name="Item_003a-kill"></a>
</p><dl>
<dt><u>Function:</u> <b>kill</b><i> (<var>a_1</var>, …, <var>a_n</var>)</i>
<a name="IDX22"></a>
</dt>
<dt><u>Function:</u> <b>kill</b><i> (labels)</i>
<a name="IDX23"></a>
</dt>
<dt><u>Function:</u> <b>kill</b><i> (inlabels, outlabels, linelabels)</i>
<a name="IDX24"></a>
</dt>
<dt><u>Function:</u> <b>kill</b><i> (<var>n</var>)</i>
<a name="IDX25"></a>
</dt>
<dt><u>Function:</u> <b>kill</b><i> ([<var>m</var>, <var>n</var>])</i>
<a name="IDX26"></a>
</dt>
<dt><u>Function:</u> <b>kill</b><i> (values, functions, arrays, …)</i>
<a name="IDX27"></a>
</dt>
<dt><u>Function:</u> <b>kill</b><i> (all)</i>
<a name="IDX28"></a>
</dt>
<dt><u>Function:</u> <b>kill</b><i> (allbut (<var>a_1</var>, …, <var>a_n</var>))</i>
<a name="IDX29"></a>
</dt>
<dd><p>Removes all bindings (value, function, array, or rule) from the arguments
<var>a_1</var>, …, <var>a_n</var>. An argument <var>a_k</var> may be a symbol or a
single array element. When <var>a_k</var> is a single array element, <code>kill</code>
unbinds that element without affecting any other elements of the array.
</p>
<p>Several special arguments are recognized. Different kinds of arguments
may be combined, e.g., <code>kill (inlabels, functions, allbut (foo, bar))</code>.
</p>
<p><code>kill (labels)</code> unbinds all input, output, and intermediate expression
labels created so far. <code>kill (inlabels)</code> unbinds only input labels which
begin with the current value of <code><a href="#inchar">inchar</a></code>. Likewise,
<code>kill (outlabels)</code> unbinds only output labels which begin with the current
value of <code><a href="#outchar">outchar</a></code>, and <code>kill (linelabels)</code> unbinds only
intermediate expression labels which begin with the current value of
<code><a href="#linechar">linechar</a></code>.
</p>
<p><code>kill (<var>n</var>)</code>, where <var>n</var> is an integer,
unbinds the <var>n</var> most recent input and output labels.
</p>
<p><code>kill ([<var>m</var>, <var>n</var>])</code> unbinds input and output labels <var>m</var> through
<var>n</var>.
</p>
<p><code>kill (<var>infolist</var>)</code>, where <var>infolist</var> is any item in
<code>infolists</code> (such as <code><a href="#values">values</a></code>, <code><a href="maxima_36.html#functions">functions</a></code>, or
<code><a href="maxima_5.html#arrays">arrays</a></code>) unbinds all items in <var>infolist</var>.
See also <code><a href="#infolists">infolists</a></code>.
</p>
<p><code>kill (all)</code> unbinds all items on all infolists. <code>kill (all)</code> does
not reset global variables to their default values; see <code><a href="#reset">reset</a></code> on this
point.
</p>
<p><code>kill (allbut (<var>a_1</var>, ..., <var>a_n</var>))</code> unbinds all items on all
infolists except for <var>a_1</var>, …, <var>a_n</var>.
<code>kill (allbut (<var>infolist</var>))</code> unbinds all items except for the ones on
<var>infolist</var>, where <var>infolist</var> is <code><a href="#values">values</a></code>,
<code><a href="maxima_36.html#functions">functions</a></code>, <code><a href="maxima_5.html#arrays">arrays</a></code>, etc.
</p>
<p>The memory taken up by a bound property is not released until all symbols are
unbound from it. In particular, to release the memory taken up by the value of
a symbol, one unbinds the output label which shows the bound value, as well as
unbinding the symbol itself.
</p>
<p><code>kill</code> quotes its arguments. The quote-quote operator <code>''</code>
defeats quotation.
</p>
<p><code>kill (<var>symbol</var>)</code> unbinds all properties of <var>symbol</var>. In contrast,
the functions <code><a href="maxima_33.html#remvalue">remvalue</a></code>, <code><a href="maxima_36.html#remfunction">remfunction</a></code>,
<code><a href="maxima_5.html#remarray">remarray</a></code>, and <code><a href="maxima_34.html#remrule">remrule</a></code> unbind a specific property.
</p>
<p><code>kill</code> always returns <code>done</code>, even if an argument has no binding.
</p>
<div class=categorybox>
·
<p>@ref{Category: Evaluation} ·
@ref{Category: Console interaction} ·
@ref{Category: Session management}
</div>
</p></dd></dl>
<p><a name="labels"></a>
<a name="Item_003a-labels"></a>
</p><dl>
<dt><u>Function:</u> <b>labels</b><i> (<var>symbol</var>)</i>
<a name="IDX30"></a>
</dt>
<dt><u>System variable:</u> <b>labels</b>
<a name="IDX31"></a>
</dt>
<dd><p>Returns the list of input, output, or intermediate expression labels which begin
with <var>symbol</var>. Typically <var>symbol</var> is the value of
<code><a href="#inchar">inchar</a></code>, <code><a href="#outchar">outchar</a></code>, or <code><a href="#linechar">linechar</a></code>.
If no labels begin with <var>symbol</var>, <code>labels</code> returns an empty list.
</p>
<p>The variable <code>labels</code> is the list of input, output, and intermediate
expression labels, including all previous labels if <code>inchar</code>,
<code>outchar</code>, or <code>linechar</code> were redefined.
</p>
<p>By default, Maxima displays the result of each user input expression, giving the
result an output label. The output display is suppressed by terminating the
input with <code>$</code> (dollar sign) instead of <code>;</code> (semicolon). An output
label is constructed and bound to the result, but not displayed, and the label
may be referenced in the same way as displayed output labels. See also
<code><a href="#g_t_0025">%</a></code>, <code><a href="#g_t_0025_0025">%%</a></code>, and <code><a href="#g_t_0025th">%th</a></code>.
</p>
<p>Intermediate expression labels can be generated by some functions. The option
variable <code><a href="maxima_20.html#programmode">programmode</a></code> controls whether <code><a href="maxima_20.html#solve">solve</a></code> and some other
functions generate intermediate expression labels instead of returning a list of
expressions. Some other functions, such as <code><a href="#ldisplay">ldisplay</a></code>, always generate
intermediate expression labels.
</p>
<p>See also <code><a href="#inchar">inchar</a></code>, <code><a href="#outchar">outchar</a></code>, <code><a href="#linechar">linechar</a></code>, and
<code><a href="#infolists">infolists</a></code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Display functions} ·
@ref{Category: Display flags and variables} ·
@ref{Category: Console interaction}
</div>
</p></dd></dl>
<p><a name="linechar"></a>
<a name="Item_003a-linechar"></a>
</p><dl>
<dt><u>Option variable:</u> <b>linechar</b>
<a name="IDX32"></a>
</dt>
<dd><p>Default value: <code>%t</code>
</p>
<p><code>linechar</code> is the prefix of the labels of intermediate expressions
generated by Maxima. Maxima constructs a label for each intermediate expression
(if displayed) by concatenating <code>linechar</code> and <code><a href="#linenum">linenum</a></code>.
</p>
<p><code>linechar</code> may be assigned any string or symbol, not necessarily a single
character. Because Maxima internally takes into account only the first char of
the prefix, the prefixes <code><a href="#inchar">inchar</a></code>, <code><a href="#outchar">outchar</a></code>, and
<code>linechar</code> should have a different first char. Otherwise some commands
like <code>kill(inlables)</code> do not work as expected.
</p>
<p>Intermediate expressions might or might not be displayed.
See <code><a href="maxima_20.html#programmode">programmode</a></code> and <code><a href="#labels">labels</a></code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="linenum"></a>
<a name="Item_003a-linenum"></a>
</p><dl>
<dt><u>System variable:</u> <b>linenum</b>
<a name="IDX33"></a>
</dt>
<dd><p>The line number of the current pair of input and output expressions.
</p>
<div class=categorybox>
·
<p>@ref{Category: Display flags and variables} ·
@ref{Category: Console interaction}
</div>
</p></dd></dl>
<p><a name="myoptions"></a>
<a name="Item_003a-myoptions"></a>
</p><dl>
<dt><u>System variable:</u> <b>myoptions</b>
<a name="IDX34"></a>
</dt>
<dd><p>Default value: <code>[]</code>
</p>
<p><code>myoptions</code> is the list of all options ever reset by the user,
whether or not they get reset to their default value.
</p>
<div class=categorybox>
·
<p>@ref{Category: Global variables} ·
@ref{Category: Session management} ·
@ref{Category: Console interaction}
</div>
</p></dd></dl>
<p><a name="nolabels"></a>
<a name="Item_003a-nolabels"></a>
</p><dl>
<dt><u>Option variable:</u> <b>nolabels</b>
<a name="IDX35"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>nolabels</code> is <code>true</code>, input and output result labels (<code>%i</code>
and <code>%o</code>, respectively) are displayed, but the labels are not bound to
results, and the labels are not appended to the <code><a href="#labels">labels</a></code> list. Since
labels are not bound to results, garbage collection can recover the memory taken
up by the results.
</p>
<p>Otherwise input and output result labels are bound to results, and the labels
are appended to the <code>labels</code> list.
</p>
<p>Intermediate expression labels (<code>%t</code>) are not affected by <code>nolabels</code>;
whether <code>nolabels</code> is <code>true</code> or <code>false</code>, intermediate expression
labels are bound and appended to the <code>labels</code> list.
</p>
<p>See also <code><a href="maxima_13.html#batch">batch</a></code>, <code><a href="maxima_13.html#load">load</a></code>, and <code><a href="#labels">labels</a></code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Global flags} ·
@ref{Category: Session management}
</div>
</p></dd></dl>
<p><a name="optionset"></a>
<a name="Item_003a-optionset"></a>
</p><dl>
<dt><u>Option variable:</u> <b>optionset</b>
<a name="IDX36"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>optionset</code> is <code>true</code>, Maxima prints out a message whenever a
Maxima option is reset. This is useful if the user is doubtful of the spelling
of some option and wants to make sure that the variable he assigned a value to
was truly an option variable.
</p>
<p>Example:
</p>
<pre class="example">(%i1) optionset:true;
assignment: assigning to option optionset
(%o1) true
(%i2) gamma_expand:true;
assignment: assigning to option gamma_expand
(%o2) true
</pre>
<div class=categorybox>
·
<p>@ref{Category: Global flags} ·
@ref{Category: Session management} ·
@ref{Category: Console interaction}
</div>
</p></dd></dl>
<p><a name="outchar"></a>
<a name="Item_003a-outchar"></a>
</p><dl>
<dt><u>Option variable:</u> <b>outchar</b>
<a name="IDX37"></a>
</dt>
<dd><p>Default value: <code>%o</code>
</p>
<p><code>outchar</code> is the prefix of the labels of expressions computed by Maxima.
Maxima automatically constructs a label for each computed expression by
concatenating <code>outchar</code> and <code><a href="#linenum">linenum</a></code>.
</p>
<p><code>outchar</code> may be assigned any string or symbol, not necessarily a single
character. Because Maxima internally takes into account only the first char of
the prefix, the prefixes <code><a href="#inchar">inchar</a></code>, <code>outchar</code> and
<code><a href="#linechar">linechar</a></code> should have a different first char. Otherwise some commands
like <code>kill(inlables)</code> do not work as expected.
</p>
<p>See also <code>labels</code>.
</p>
<p>Example:
</p>
<pre class="example">(%i1) outchar: "output";
(output1) output
(%i2) expand((a+b)^3);
3 2 2 3
(output2) b + 3 a b + 3 a b + a
(%i3)
</pre>
<div class=categorybox>
·
<p>@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="playback"></a>
<a name="Item_003a-playback"></a>
</p><dl>
<dt><u>Function:</u> <b>playback</b><i> ()</i>
<a name="IDX38"></a>
</dt>
<dt><u>Function:</u> <b>playback</b><i> (<var>n</var>)</i>
<a name="IDX39"></a>
</dt>
<dt><u>Function:</u> <b>playback</b><i> ([<var>m</var>, <var>n</var>])</i>
<a name="IDX40"></a>
</dt>
<dt><u>Function:</u> <b>playback</b><i> ([<var>m</var>])</i>
<a name="IDX41"></a>
</dt>
<dt><u>Function:</u> <b>playback</b><i> (input)</i>
<a name="IDX42"></a>
</dt>
<dt><u>Function:</u> <b>playback</b><i> (slow)</i>
<a name="IDX43"></a>
</dt>
<dt><u>Function:</u> <b>playback</b><i> (time)</i>
<a name="IDX44"></a>
</dt>
<dt><u>Function:</u> <b>playback</b><i> (grind)</i>
<a name="IDX45"></a>
</dt>
<dd><p>Displays input, output, and intermediate expressions, without recomputing them.
<code>playback</code> only displays the expressions bound to labels; any other output
(such as text printed by <code><a href="#print">print</a></code> or <code><a href="maxima_3.html#describe">describe</a></code>, or error messages)
is not displayed. See also <code><a href="#labels">labels</a></code>.
</p>
<p><code>playback</code> quotes its arguments. The quote-quote operator <code>''</code>
defeats quotation. <code>playback</code> always returns <code>done</code>.
</p>
<p><code>playback ()</code> (with no arguments) displays all input, output, and
intermediate expressions generated so far. An output expression is displayed
even if it was suppressed by the <code>$</code> terminator when it was originally
computed.
</p>
<p><code>playback (<var>n</var>)</code> displays the most recent <var>n</var> expressions.
Each input, output, and intermediate expression counts as one.
</p>
<p><code>playback ([<var>m</var>, <var>n</var>])</code> displays input, output, and intermediate
expressions with numbers from <var>m</var> through <var>n</var>, inclusive.
</p>
<p><code>playback ([<var>m</var>])</code> is equivalent to
<code>playback ([<var>m</var>, <var>m</var>])</code>; this usually prints one pair of input and
output expressions.
</p>
<p><code>playback (input)</code> displays all input expressions generated so far.
</p>
<p><code>playback (slow)</code> pauses between expressions and waits for the user to
press <code>enter</code>. This behavior is similar to <code><a href="maxima_3.html#demo">demo</a></code>.
<code>playback (slow)</code> is useful in conjunction with <code>save</code> or
<code><a href="maxima_13.html#stringout">stringout</a></code> when creating a secondary-storage file in order to pick out
useful expressions.
</p>
<p><code>playback (time)</code> displays the computation time for each expression.
</p>
<p><code>playback (grind)</code> displays input expressions in the same format as the
<code>grind</code> function. Output expressions are not affected by the <code>grind</code>
option. See <code><a href="#grind">grind</a></code>.
</p>
<p>Arguments may be combined, e.g., <code>playback ([5, 10], grind, time, slow)</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Display functions} ·
@ref{Category: Console interaction}
</div>
</p></dd></dl>
<p><a name="prompt"></a>
<a name="Item_003a-prompt"></a>
</p><dl>
<dt><u>Option variable:</u> <b>prompt</b>
<a name="IDX46"></a>
</dt>
<dd><p>Default value: <code>_</code>
</p>
<p><code>prompt</code> is the prompt symbol of the <code><a href="maxima_3.html#demo">demo</a></code> function,
<code>playback (slow)</code> mode, and the Maxima break loop (as invoked by
<code><a href="maxima_36.html#break">break</a></code>).
</p>
<div class=categorybox>
·
<p>@ref{Category: Global variables} ·
@ref{Category: Console interaction}
</div>
</p></dd></dl>
<p><a name="quit"></a>
<a name="Item_003a-quit"></a>
</p><dl>
<dt><u>Function:</u> <b>quit</b><i> ()</i>
<a name="IDX47"></a>
</dt>
<dd><p>Terminates the Maxima session. Note that the function must be invoked as
<code>quit();</code> or <code>quit()$</code>, not <code>quit</code> by itself.
</p>
<p>To stop a lengthy computation, type <code>control-C</code>. The default action is to
return to the Maxima prompt. If <code>*debugger-hook*</code> is <code>nil</code>,
<code>control-C</code> opens the Lisp debugger. See also <a href="maxima_38.html#SEC205">Debugging</a>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Console interaction}
</div>
</p></dd></dl>
<p><a name="read"></a>
<a name="Item_003a-read"></a>
</p><dl>
<dt><u>Function:</u> <b>read</b><i> (<var>expr_1</var>, …, <var>expr_n</var>)</i>
<a name="IDX48"></a>
</dt>
<dd><p>Prints <var>expr_1</var>, …, <var>expr_n</var>, then reads one expression from the
console and returns the evaluated expression. The expression is terminated with
a semicolon <code>;</code> or dollar sign <code>$</code>.
</p>
<p>See also <code><a href="#readonly">readonly</a></code>
</p>
<p>Example:
</p>
<pre class="example">(%i1) foo: 42$
(%i2) foo: read ("foo is", foo, " -- enter new value.")$
foo is 42 -- enter new value.
(a+b)^3;
(%i3) foo;
3
(%o3) (b + a)
</pre>
<div class=categorybox>
·
<p>@ref{Category: Console interaction}
</div>
</p></dd></dl>
<p><a name="readonly"></a>
<a name="Item_003a-readonly"></a>
</p><dl>
<dt><u>Function:</u> <b>readonly</b><i> (<var>expr_1</var>, …, <var>expr_n</var>)</i>
<a name="IDX49"></a>
</dt>
<dd><p>Prints <var>expr_1</var>, …, <var>expr_n</var>, then reads one expression from the
console and returns the expression (without evaluation). The expression is
terminated with a <code>;</code> (semicolon) or <code>$</code> (dollar sign).
</p>
<p>See also <code><a href="#read">read</a></code>.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) aa: 7$
(%i2) foo: readonly ("Enter an expression:");
Enter an expression:
2^aa;
aa
(%o2) 2
(%i3) foo: read ("Enter an expression:");
Enter an expression:
2^aa;
(%o3) 128
</pre>
<div class=categorybox>
·
<p>@ref{Category: Console interaction}
</div>
</p></dd></dl>
<p><a name="reset"></a>
<a name="Item_003a-reset"></a>
</p><dl>
<dt><u>Function:</u> <b>reset</b><i> ()</i>
<a name="IDX50"></a>
</dt>
<dd><p>Resets many global variables and options, and some other variables, to their
default values.
</p>
<p><code>reset</code> processes the variables on the Lisp list
<code>*variable-initial-values*</code>. The Lisp macro <code>defmvar</code> puts variables
on this list (among other actions). Many, but not all, global variables and
options are defined by <code>defmvar</code>, and some variables defined by
<code>defmvar</code> are not global variables or options.
</p>
<div class=categorybox>
·
<p>@ref{Category: Session management}
</div>
</p></dd></dl>
<p><a name="showtime"></a>
<a name="Item_003a-showtime"></a>
</p><dl>
<dt><u>Option variable:</u> <b>showtime</b>
<a name="IDX51"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>showtime</code> is <code>true</code>, the computation time and elapsed time is
printed with each output expression.
</p>
<p>The computation time is always recorded, so <code><a href="maxima_32.html#time">time</a></code> and <code><a href="#playback">playback</a></code> can
display the computation time even when <code>showtime</code> is <code>false</code>.
</p>
<p>See also <code><a href="maxima_38.html#timer">timer</a></code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Display flags and variables} ·
@ref{Category: Debugging}
</div>
</p></dd></dl>
<p><a name="to_005flisp"></a>
<a name="Item_003a-to_005flisp"></a>
</p><dl>
<dt><u>Function:</u> <b>to_lisp</b><i> ()</i>
<a name="IDX52"></a>
</dt>
<dd><p>Enters the Lisp system under Maxima. <code>(to-maxima)</code> returns to Maxima.
</p>
<p>Example:
</p>
<p>Define a function and enter the Lisp system under Maxima. The definition is
inspected on the property list, then the function definition is extracted,
factored and stored in the variable $result. The variable can be used in Maxima
after returning to Maxima.
</p>
<pre class="example">(%i1) f(x):=x^2+x;
2
(%o1) f(x) := x + x
(%i2) to_lisp();
Type (to-maxima) to restart, ($quit) to quit Maxima.
MAXIMA> (symbol-plist '$f)
(MPROPS (NIL MEXPR ((LAMBDA) ((MLIST) $X)
((MPLUS) ((MEXPT) $X 2) $X))))
MAXIMA> (setq $result ($factor (caddr (mget '$f 'mexpr))))
((MTIMES SIMP FACTORED) $X ((MPLUS SIMP IRREDUCIBLE) 1 $X))
MAXIMA> (to-maxima)
Returning to Maxima
(%o2) true
(%i3) result;
(%o3) x (x + 1)
</pre>
<div class=categorybox>
·
<p>@ref{Category: Console interaction}
</div>
</p></dd></dl>
<p><a name="values"></a>
<a name="Item_003a-values"></a>
</p><dl>
<dt><u>System variable:</u> <b>values</b>
<a name="IDX53"></a>
</dt>
<dd><p>Initial value: <code>[]</code>
</p>
<p><code>values</code> is a list of all bound user variables (not Maxima options or
switches). The list comprises symbols bound by <code><a href="maxima_7.html#g_t_003a">:</a></code>, or <code><a href="maxima_7.html#g_t_003a_003a">::</a></code>.
</p>
<p>If the value of a variable is removed with the commands <code>kill</code>,
<code><a href="maxima_11.html#remove">remove</a></code>, or <code><a href="maxima_33.html#remvalue">remvalue</a></code> the variable is deleted from
<code>values</code>.
</p>
<p>See <code><a href="maxima_36.html#functions">functions</a></code> for a list of user defined functions.
</p>
<p>Examples:
</p>
<p>First, <code>values</code> shows the symbols <code>a</code>, <code>b</code>, and <code>c</code>, but
not <code>d</code>, it is not bound to a value, and not the user function <code>f</code>.
The values are removed from the variables. <code>values</code> is the empty list.
</p>
<pre class="example">(%i1) [a:99, b::a-90, c:a-b, d, f(x):= x^2];
2
(%o1) [99, 9, 90, d, f(x) := x ]
(%i2) values;
(%o2) [a, b, c]
(%i3) [kill(a), remove(b,value), remvalue(c)];
(%o3) [done, done, [c]]
(%i4) values;
(%o4) []
</pre>
<div class=categorybox>
·
<p>@ref{Category: Evaluation} ·
@ref{Category: Global variables}
</div>
</p></dd></dl>
<p><a name="Item_003a-Functions-and-Variables-for-Display"></a>
</p><hr size="6">
<a name="Functions-and-Variables-for-Display"></a>
<a name="SEC10"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC9" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="maxima_5.html#SEC11" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC7" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_5.html#SEC11" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.3 Functions and Variables for Display </h2>
<p><a name="g_t_0025edispflag"></a>
<a name="Item_003a-_0025edispflag"></a>
</p><dl>
<dt><u>Option variable:</u> <b>%edispflag</b>
<a name="IDX54"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>%edispflag</code> is <code>true</code>, Maxima displays <code>%e</code> to a negative
exponent as a quotient. For example, <code>%e^-x</code> is displayed as
<code>1/%e^x</code>. See also <code><a href="#exptdispflag">exptdispflag</a></code>.
</p>
<p>Example:
</p>
<pre class="example">(%i1) %e^-10;
- 10
(%o1) %e
(%i2) %edispflag:true$
(%i3) %e^-10;
1
(%o3) ----
10
%e
</pre>
<div class=categorybox>
·
<p>@ref{Category: Exponential and logarithm functions} ·
@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="absboxchar"></a>
<a name="Item_003a-absboxchar"></a>
</p><dl>
<dt><u>Option variable:</u> <b>absboxchar</b>
<a name="IDX55"></a>
</dt>
<dd><p>Default value: <code>!</code>
</p>
<p><code>absboxchar</code> is the character used to draw absolute value
signs around expressions which are more than one line tall.
</p>
<p>Example:
</p>
<pre class="example">(%i1) abs((x^3+1));
! 3 !
(%o1) !x + 1!
</pre>
<div class=categorybox>
·
<p>@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="disp"></a>
<a name="Item_003a-disp"></a>
</p><dl>
<dt><u>Function:</u> <b>disp</b><i> (<var>expr_1</var>, <var>expr_2</var>, …)</i>
<a name="IDX56"></a>
</dt>
<dd><p>is like <code><a href="#display">display</a></code> but only the value of the arguments are displayed rather
than equations. This is useful for complicated arguments which don't have names
or where only the value of the argument is of interest and not the name.
</p>
<p>See also <code><a href="#ldisp">ldisp</a></code> and <code><a href="#print">print</a></code>.
</p>
<p>Example:
</p>
<pre class="example">(%i1) b[1,2]:x-x^2$
(%i2) x:123$
(%i3) disp(x, b[1,2], sin(1.0));
123
2
x - x
.8414709848078965
(%o3) done
</pre>
<div class=categorybox>
·
<p>@ref{Category: Display functions}
</div>
</p></dd></dl>
<p><a name="display"></a>
<a name="Item_003a-display"></a>
</p><dl>
<dt><u>Function:</u> <b>display</b><i> (<var>expr_1</var>, <var>expr_2</var>, …)</i>
<a name="IDX57"></a>
</dt>
<dd><p>Displays equations whose left side is <var>expr_i</var> unevaluated, and whose right
side is the value of the expression centered on the line. This function is
useful in blocks and <code><a href="maxima_37.html#for">for</a></code> statements in order to have intermediate results
displayed. The arguments to <code>display</code> are usually atoms, subscripted
variables, or function calls.
</p>
<p>See also <code><a href="#ldisplay">ldisplay</a></code>, <code><a href="#disp">disp</a></code>, and <code><a href="#ldisp">ldisp</a></code>.
</p>
<p>Example:
</p>
<pre class="example">(%i1) b[1,2]:x-x^2$
(%i2) x:123$
(%i3) display(x, b[1,2], sin(1.0));
x = 123
2
b = x - x
1, 2
sin(1.0) = .8414709848078965
(%o3) done
</pre>
<div class=categorybox>
·
<p>@ref{Category: Display functions}
</div>
</p></dd></dl>
<p><a name="display2d"></a>
<a name="Item_003a-display2d"></a>
</p><dl>
<dt><u>Option variable:</u> <b>display2d</b>
<a name="IDX58"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>display2d</code> is <code>false</code>, the console display is a string
(1-dimensional) form rather than a display (2-dimensional) form.
</p>
<p>See also <code><a href="#leftjust">leftjust</a></code> to switch between a left justified and a centered
display of equations.
</p>
<p>Example:
</p>
<pre class="example">(%i1) x/(x^2+1);
x
(%o1) ------
2
x + 1
(%i2) display2d:false$
(%i3) x/(x^2+1);
(%o3) x/(x^2+1)
</pre>
<div class=categorybox>
·
<p>@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="display_005fformat_005finternal"></a>
<a name="Item_003a-display_005fformat_005finternal"></a>
</p><dl>
<dt><u>Option variable:</u> <b>display_format_internal</b>
<a name="IDX59"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>display_format_internal</code> is <code>true</code>, expressions are displayed
without being transformed in ways that hide the internal mathematical
representation. The display then corresponds to what <code><a href="maxima_6.html#inpart">inpart</a></code> returns
rather than <code><a href="maxima_6.html#part">part</a></code>.
</p>
<p>Examples:
</p>
<pre class="example">User part inpart
a-b; a - b a + (- 1) b
a - 1
a/b; - a b
b
1/2
sqrt(x); sqrt(x) x
4 X 4
X*4/3; --- - X
3 3
</pre>
<div class=categorybox>
·
<p>@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="dispterms"></a>
<a name="Item_003a-dispterms"></a>
</p><dl>
<dt><u>Function:</u> <b>dispterms</b><i> (<var>expr</var>)</i>
<a name="IDX60"></a>
</dt>
<dd><p>Displays <var>expr</var> in parts one below the other. That is, first the operator
of <var>expr</var> is displayed, then each term in a sum, or factor in a product, or
part of a more general expression is displayed separately. This is useful if
<var>expr</var> is too large to be otherwise displayed. For example if <code>P1</code>,
<code>P2</code>, … are very large expressions then the display program may run
out of storage space in trying to display <code>P1 + P2 + ...</code> all at once.
However, <code>dispterms (P1 + P2 + ...)</code> displays <code>P1</code>, then below it
<code>P2</code>, etc. When not using <code>dispterms</code>, if an exponential expression
is too wide to be displayed as <code>A^B</code> it appears as <code>expt (A, B)</code> (or
as <code>ncexpt (A, B)</code> in the case of <code>A^^B</code>).
</p>
<p>Example:
</p>
<pre class="example">(%i1) dispterms(2*a*sin(x)+%e^x);
+
2 a sin(x)
x
%e
(%o1) done
</pre>
<div class=categorybox>
·
<p>@ref{Category: Display functions}
</div>
</p></dd></dl>
<p><a name="expt"></a>
<a name="ncexpt"></a>
<a name="Item_003a-expt"></a>
</p><dl>
<dt><u>Special symbol:</u> <b>expt</b><i> (<var>a</var>, <var>b</var>)</i>
<a name="IDX61"></a>
</dt>
<dt><u>Special symbol:</u> <b>ncexpt</b><i> (<var>a</var>, <var>b</var>)</i>
<a name="IDX62"></a>
</dt>
<dd><p>If an exponential expression is too wide to be displayed as
<code><var>a</var>^<var>b</var></code> it appears as <code>expt (<var>a</var>, <var>b</var>)</code> (or as
<code>ncexpt (<var>a</var>, <var>b</var>)</code> in the case of <code><var>a</var>^^<var>b</var></code>).
</p>
<p><code>expt</code> and <code>ncexpt</code> are not recognized in input.
</p></dd></dl>
<p><a name="exptdispflag"></a>
<a name="Item_003a-exptdispflag"></a>
</p><dl>
<dt><u>Option variable:</u> <b>exptdispflag</b>
<a name="IDX63"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>exptdispflag</code> is <code>true</code>, Maxima displays expressions
with negative exponents using quotients. See also <code><a href="#g_t_0025edispflag">%edispflag</a></code>.
</p>
<p>Example:
</p>
<pre class="example">(%i1) exptdispflag:true;
(%o1) true
(%i2) 10^-x;
1
(%o2) ---
x
10
(%i3) exptdispflag:false;
(%o3) false
(%i4) 10^-x;
- x
(%o4) 10
</pre>
<div class=categorybox>
·
<p>@ref{Category: Expressions} ·
@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="grind"></a>
<a name="Item_003a-grind"></a>
</p><dl>
<dt><u>Function:</u> <b>grind</b><i> (<var>expr</var>)</i>
<a name="IDX64"></a>
</dt>
<dt><u>Option variable:</u> <b>grind</b>
<a name="IDX65"></a>
</dt>
<dd><p>The function <code>grind</code> prints <var>expr</var> to the console in a form suitable
for input to Maxima. <code>grind</code> always returns <code>done</code>.
</p>
<p>When <var>expr</var> is the name of a function or macro, <code>grind</code> prints the
function or macro definition instead of just the name.
</p>
<p>See also <code><a href="maxima_5.html#string">string</a></code>, which returns a string instead of printing its
output. <code>grind</code> attempts to print the expression in a manner which makes
it slightly easier to read than the output of <code>string</code>.
</p>
<p>When the variable <code>grind</code> is <code>true</code>, the output of <code>string</code> and
<code><a href="maxima_13.html#stringout">stringout</a></code> has the same format as that of <code>grind</code>; otherwise no
attempt is made to specially format the output of those functions. The default
value of the variable <code>grind</code> is <code>false</code>.
</p>
<p><code>grind</code> can also be specified as an argument of <code><a href="#playback">playback</a></code>. When
<code>grind</code> is present, <code>playback</code> prints input expressions in the same
format as the <code>grind</code> function. Otherwise, no attempt is made to specially
format input expressions.
</p>
<p><code>grind</code> evaluates its argument.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) aa + 1729;
(%o1) aa + 1729
(%i2) grind (%);
aa+1729$
(%o2) done
(%i3) [aa, 1729, aa + 1729];
(%o3) [aa, 1729, aa + 1729]
(%i4) grind (%);
[aa,1729,aa+1729]$
(%o4) done
(%i5) matrix ([aa, 17], [29, bb]);
[ aa 17 ]
(%o5) [ ]
[ 29 bb ]
(%i6) grind (%);
matrix([aa,17],[29,bb])$
(%o6) done
(%i7) set (aa, 17, 29, bb);
(%o7) {17, 29, aa, bb}
(%i8) grind (%);
{17,29,aa,bb}$
(%o8) done
(%i9) exp (aa / (bb + 17)^29);
aa
-----------
29
(bb + 17)
(%o9) %e
(%i10) grind (%);
%e^(aa/(bb+17)^29)$
(%o10) done
(%i11) expr: expand ((aa + bb)^10);
10 9 2 8 3 7 4 6
(%o11) bb + 10 aa bb + 45 aa bb + 120 aa bb + 210 aa bb
5 5 6 4 7 3 8 2
+ 252 aa bb + 210 aa bb + 120 aa bb + 45 aa bb
9 10
+ 10 aa bb + aa
(%i12) grind (expr);
bb^10+10*aa*bb^9+45*aa^2*bb^8+120*aa^3*bb^7+210*aa^4*bb^6
+252*aa^5*bb^5+210*aa^6*bb^4+120*aa^7*bb^3+45*aa^8*bb^2
+10*aa^9*bb+aa^10$
(%o12) done
(%i13) string (expr);
(%o13) bb^10+10*aa*bb^9+45*aa^2*bb^8+120*aa^3*bb^7+210*aa^4*bb^6\
+252*aa^5*bb^5+210*aa^6*bb^4+120*aa^7*bb^3+45*aa^8*bb^2+10*aa^9*\
bb+aa^10
(%i14) cholesky (A):= block ([n : length (A), L : copymatrix (A),
p : makelist (0, i, 1, length (A))], for i thru n do
for j : i thru n do
(x : L[i, j], x : x - sum (L[j, k] * L[i, k], k, 1, i - 1),
if i = j then p[i] : 1 / sqrt(x) else L[j, i] : x * p[i]),
for i thru n do L[i, i] : 1 / p[i],
for i thru n do for j : i + 1 thru n do L[i, j] : 0, L)$
(%i15) grind (cholesky);
cholesky(A):=block(
[n:length(A),L:copymatrix(A),
p:makelist(0,i,1,length(A))],
for i thru n do
(for j from i thru n do
(x:L[i,j],x:x-sum(L[j,k]*L[i,k],k,1,i-1),
if i = j then p[i]:1/sqrt(x)
else L[j,i]:x*p[i])),
for i thru n do L[i,i]:1/p[i],
for i thru n do (for j from i+1 thru n do L[i,j]:0),L)$
(%o15) done
(%i16) string (fundef (cholesky));
(%o16) cholesky(A):=block([n:length(A),L:copymatrix(A),p:makelis\
t(0,i,1,length(A))],for i thru n do (for j from i thru n do (x:L\
[i,j],x:x-sum(L[j,k]*L[i,k],k,1,i-1),if i = j then p[i]:1/sqrt(x\
) else L[j,i]:x*p[i])),for i thru n do L[i,i]:1/p[i],for i thru \
n do (for j from i+1 thru n do L[i,j]:0),L)
</pre>
<div class=categorybox>
·
<p>@ref{Category: Display functions} ·
@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="ibase"></a>
<a name="Item_003a-ibase"></a>
</p><dl>
<dt><u>Option variable:</u> <b>ibase</b>
<a name="IDX66"></a>
</dt>
<dd><p>Default value: <code>10</code>
</p>
<p><code>ibase</code> is the base for integers read by Maxima.
</p>
<p><code>ibase</code> may be assigned any integer between 2 and 36 (decimal), inclusive.
When <code>ibase</code> is greater than 10,
the numerals comprise the decimal numerals 0 through 9
plus letters of the alphabet A, B, C, …,
as needed to make <code>ibase</code> digits in all.
Letters are interpreted as digits only if the first digit is 0 through 9.
Uppercase and lowercase letters are not distinguished.
The numerals for base 36, the largest acceptable base,
comprise 0 through 9 and A through Z.
</p>
<p>Whatever the value of <code>ibase</code>,
when an integer is terminated by a decimal point,
it is interpreted in base 10.
</p>
<p>See also <code><a href="#obase">obase</a></code>.
</p>
<p>Examples:
</p>
<p><code>ibase</code> less than 10.
</p>
<pre class="example">(%i1) ibase : 2 $
(%i2) obase;
(%o2) 10
(%i3) 1111111111111111;
(%o3) 65535
</pre>
<p><code>ibase</code> greater than 10.
Letters are interpreted as digits only if the first digit is 0 through 9.
</p>
<pre class="example">(%i1) ibase : 16 $
(%i2) obase;
(%o2) 10
(%i3) 1000;
(%o3) 4096
(%i4) abcd;
(%o4) abcd
(%i5) symbolp (abcd);
(%o5) true
(%i6) 0abcd;
(%o6) 43981
(%i7) symbolp (0abcd);
(%o7) false
</pre>
<p>When an integer is terminated by a decimal point,
it is interpreted in base 10.
</p>
<pre class="example">(%i1) ibase : 36 $
(%i2) obase;
(%o2) 10
(%i3) 1234;
(%o3) 49360
(%i4) 1234.;
(%o4) 1234
</pre>
<div class=categorybox>
·
<p>@ref{Category: Console interaction}
</div>
</p></dd></dl>
<p><a name="ldisp"></a>
<a name="Item_003a-ldisp"></a>
</p><dl>
<dt><u>Function:</u> <b>ldisp</b><i> (<var>expr_1</var>, …, <var>expr_n</var>)</i>
<a name="IDX67"></a>
</dt>
<dd><p>Displays expressions <var>expr_1</var>, …, <var>expr_n</var> to the console as
printed output. <code>ldisp</code> assigns an intermediate expression label to each
argument and returns the list of labels.
</p>
<p>See also <code><a href="#disp">disp</a></code>, <code><a href="#display">display</a></code>, and <code><a href="#ldisplay">ldisplay</a></code>.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) e: (a+b)^3;
3
(%o1) (b + a)
(%i2) f: expand (e);
3 2 2 3
(%o2) b + 3 a b + 3 a b + a
(%i3) ldisp (e, f);
3
(%t3) (b + a)
3 2 2 3
(%t4) b + 3 a b + 3 a b + a
(%o4) [%t3, %t4]
(%i4) %t3;
3
(%o4) (b + a)
(%i5) %t4;
3 2 2 3
(%o5) b + 3 a b + 3 a b + a
</pre>
<div class=categorybox>
·
<p>@ref{Category: Display functions}
</div>
</p></dd></dl>
<p><a name="ldisplay"></a>
<a name="Item_003a-ldisplay"></a>
</p><dl>
<dt><u>Function:</u> <b>ldisplay</b><i> (<var>expr_1</var>, …, <var>expr_n</var>)</i>
<a name="IDX68"></a>
</dt>
<dd><p>Displays expressions <var>expr_1</var>, …, <var>expr_n</var> to the console as
printed output. Each expression is printed as an equation of the form
<code>lhs = rhs</code> in which <code>lhs</code> is one of the arguments of <code>ldisplay</code>
and <code>rhs</code> is its value. Typically each argument is a variable.
<code><a href="#ldisp">ldisp</a></code> assigns an intermediate expression label to each equation and
returns the list of labels.
</p>
<p>See also <code><a href="#display">display</a></code>, <code><a href="#disp">disp</a></code>, and <code><a href="#ldisp">ldisp</a></code>.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) e: (a+b)^3;
3
(%o1) (b + a)
(%i2) f: expand (e);
3 2 2 3
(%o2) b + 3 a b + 3 a b + a
(%i3) ldisplay (e, f);
3
(%t3) e = (b + a)
3 2 2 3
(%t4) f = b + 3 a b + 3 a b + a
(%o4) [%t3, %t4]
(%i4) %t3;
3
(%o4) e = (b + a)
(%i5) %t4;
3 2 2 3
(%o5) f = b + 3 a b + 3 a b + a
</pre>
<div class=categorybox>
·
<p>@ref{Category: Display functions}
</div>
</p></dd></dl>
<p><a name="leftjust"></a>
<a name="Item_003a-leftjust"></a>
</p><dl>
<dt><u>Option variable:</u> <b>leftjust</b>
<a name="IDX69"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>leftjust</code> is <code>true</code>, equations in 2D-display are drawn left
justified rather than centered.
</p>
<p>See also <code><a href="#display2d">display2d</a></code> to switch between 1D- and 2D-display.
</p>
<p>Example:
</p>
<pre class="example">(%i1) expand((x+1)^3);
3 2
(%o1) x + 3 x + 3 x + 1
(%i2) leftjust:true$
(%i3) expand((x+1)^3);
3 2
(%o3) x + 3 x + 3 x + 1
</pre>
<div class=categorybox>
·
<p>@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="linel"></a>
<a name="Item_003a-linel"></a>
</p><dl>
<dt><u>Option variable:</u> <b>linel</b>
<a name="IDX70"></a>
</dt>
<dd><p>Default value: <code>79</code>
</p>
<p><code>linel</code> is the assumed width (in characters) of the console display for the
purpose of displaying expressions. <code>linel</code> may be assigned any value by
the user, although very small or very large values may be impractical. Text
printed by built-in Maxima functions, such as error messages and the output of
<code><a href="maxima_3.html#describe">describe</a></code>, is not affected by <code>linel</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="lispdisp"></a>
<a name="Item_003a-lispdisp"></a>
</p><dl>
<dt><u>Option variable:</u> <b>lispdisp</b>
<a name="IDX71"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>lispdisp</code> is <code>true</code>, Lisp symbols are displayed with a leading
question mark <code>?</code>. Otherwise, Lisp symbols are displayed with no leading
mark.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) lispdisp: false$
(%i2) ?foo + ?bar;
(%o2) foo + bar
(%i3) lispdisp: true$
(%i4) ?foo + ?bar;
(%o4) ?foo + ?bar
</pre>
<div class=categorybox>
·
<p>@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="negsumdispflag"></a>
<a name="Item_003a-negsumdispflag"></a>
</p><dl>
<dt><u>Option variable:</u> <b>negsumdispflag</b>
<a name="IDX72"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>negsumdispflag</code> is <code>true</code>, <code>x - y</code> displays as <code>x - y</code>
instead of as <code>- y + x</code>. Setting it to <code>false</code> causes the special
check in display for the difference of two expressions to not be done. One
application is that thus <code>a + %i*b</code> and <code>a - %i*b</code> may both be
displayed the same way.
</p>
<div class=categorybox>
·
<p>@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="obase"></a>
<a name="Item_003a-obase"></a>
</p><dl>
<dt><u>Option variable:</u> <b>obase</b>
<a name="IDX73"></a>
</dt>
<dd><p>Default value: <code>10</code>
</p>
<p><code>obase</code> is the base for integers displayed by Maxima.
</p>
<p><code>obase</code> may be assigned any integer between 2 and 36 (decimal), inclusive.
When <code>obase</code> is greater than 10,
the numerals comprise the decimal numerals 0 through 9
plus capital letters of the alphabet A, B, C, …, as needed.
A leading 0 digit is displayed if the leading digit is otherwise a letter.
The numerals for base 36, the largest acceptable base,
comprise 0 through 9, and A through Z.
</p>
<p>See also <code><a href="#ibase">ibase</a></code>.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) obase : 2;
(%o1) 10
(%i2) 2^8 - 1;
(%o10) 11111111
(%i3) obase : 8;
(%o3) 10
(%i4) 8^8 - 1;
(%o4) 77777777
(%i5) obase : 16;
(%o5) 10
(%i6) 16^8 - 1;
(%o6) 0FFFFFFFF
(%i7) obase : 36;
(%o7) 10
(%i8) 36^8 - 1;
(%o8) 0ZZZZZZZZ
</pre>
<div class=categorybox>
·
<p>@ref{Category: Display flags and variables} ·
@ref{Category: Console interaction}
</div>
</p></dd></dl>
<p><a name="pfeformat"></a>
<a name="Item_003a-pfeformat"></a>
</p><dl>
<dt><u>Option variable:</u> <b>pfeformat</b>
<a name="IDX74"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>pfeformat</code> is <code>true</code>, a ratio of integers is displayed with the
solidus (forward slash) character, and an integer denominator <code>n</code> is
displayed as a leading multiplicative term <code>1/n</code>.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) pfeformat: false$
(%i2) 2^16/7^3;
65536
(%o2) -----
343
(%i3) (a+b)/8;
b + a
(%o3) -----
8
(%i4) pfeformat: true$
(%i5) 2^16/7^3;
(%o5) 65536/343
(%i6) (a+b)/8;
(%o6) 1/8 (b + a)
</pre>
<div class=categorybox>
·
<p>@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="powerdisp"></a>
<a name="Item_003a-powerdisp"></a>
</p><dl>
<dt><u>Option variable:</u> <b>powerdisp</b>
<a name="IDX75"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>powerdisp</code> is <code>true</code>,
a sum is displayed with its terms in order of increasing power.
Thus a polynomial is displayed as a truncated power series,
with the constant term first and the highest power last.
</p>
<p>By default, terms of a sum are displayed in order of decreasing power.
</p>
<p>Example:
</p>
<pre class="example">(%i1) powerdisp:true;
(%o1) true
(%i2) x^2+x^3+x^4;
2 3 4
(%o2) x + x + x
(%i3) powerdisp:false;
(%o3) false
(%i4) x^2+x^3+x^4;
4 3 2
(%o4) x + x + x
</pre>
<div class=categorybox>
·
<p>@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="print"></a>
<a name="Item_003a-print"></a>
</p><dl>
<dt><u>Function:</u> <b>print</b><i> (<var>expr_1</var>, …, <var>expr_n</var>)</i>
<a name="IDX76"></a>
</dt>
<dd><p>Evaluates and displays <var>expr_1</var>, …, <var>expr_n</var> one after another,
from left to right, starting at the left edge of the console display.
</p>
<p>The value returned by <code>print</code> is the value of its last argument.
<code>print</code> does not generate intermediate expression labels.
</p>
<p>See also <code><a href="#display">display</a></code>, <code><a href="#disp">disp</a></code>, <code><a href="#ldisplay">ldisplay</a></code>, and
<code><a href="#ldisp">ldisp</a></code>. Those functions display one expression per line, while
<code>print</code> attempts to display two or more expressions per line.
</p>
<p>To display the contents of a file, see <code><a href="maxima_13.html#printfile">printfile</a></code>.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) r: print ("(a+b)^3 is", expand ((a+b)^3), "log (a^10/b) is",
radcan (log (a^10/b)))$
3 2 2 3
(a+b)^3 is b + 3 a b + 3 a b + a log (a^10/b) is
10 log(a) - log(b)
(%i2) r;
(%o2) 10 log(a) - log(b)
(%i3) disp ("(a+b)^3 is", expand ((a+b)^3), "log (a^10/b) is",
radcan (log (a^10/b)))$
(a+b)^3 is
3 2 2 3
b + 3 a b + 3 a b + a
log (a^10/b) is
10 log(a) - log(b)
</pre>
<div class=categorybox>
·
<p>@ref{Category: Display functions}
</div>
</p></dd></dl>
<p><a name="sqrtdispflag"></a>
<a name="Item_003a-sqrtdispflag"></a>
</p><dl>
<dt><u>Option variable:</u> <b>sqrtdispflag</b>
<a name="IDX77"></a>
</dt>
<dd><p>Default value: <code>true</code>
</p>
<p>When <code>sqrtdispflag</code> is <code>false</code>, causes <code>sqrt</code> to display with
exponent 1/2.
</p>
<div class=categorybox>
·
<p>@ref{Category: Mathematical functions} ·
@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="stardisp"></a>
<a name="Item_003a-stardisp"></a>
</p><dl>
<dt><u>Option variable:</u> <b>stardisp</b>
<a name="IDX78"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>stardisp</code> is <code>true</code>, multiplication is
displayed with an asterisk <code>*</code> between operands.
</p>
<div class=categorybox>
·
<p>@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="ttyoff"></a>
<a name="Item_003a-ttyoff"></a>
</p><dl>
<dt><u>Option variable:</u> <b>ttyoff</b>
<a name="IDX79"></a>
</dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>ttyoff</code> is <code>true</code>, output expressions are not displayed.
Output expressions are still computed and assigned labels. See <code><a href="#labels">labels</a></code>.
</p>
<p>Text printed by built-in Maxima functions, such as error messages and the output
of <code><a href="maxima_3.html#describe">describe</a></code>, is not affected by <code>ttyoff</code>.
</p>
<div class=categorybox>
·
<p>@ref{Category: Display flags and variables}
</div>
</p></dd></dl>
<p><a name="Item_003a-Data-Types-and-Structures"></a>
</p><hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="maxima_5.html#SEC11" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_82.html#SEC380" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
<font size="-1">
This document was generated by <em>root</em> on <em>January, 10 2014</em> using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
</font>
<br>
</p>
</body>
</html>
|