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
|
% Orpie documentation
%
% Notes:
% This document is designed to be processed with the 'latex2man' perl
% script. This script has a preprocessor, which is the source of the
% IF LATEX ... ELSE ... END IF comments.
% "latex2man -CLATEX -L" will output pure tex source, which can be
% handled either via latex or hevea. (Also, latex2man sucks. If you know
% of a better tool that does the same job, I'd love to hear about it.)
% Hevea has its own preprocessor, which is the source of the BEGIN LATEX
% and HEVEA comments. (Hevea doesn't suck.)
\documentclass[11pt,notitlepage]{article}
%@% IF LATEX %@%
\usepackage{times}
\usepackage{amsmath}
\usepackage{fullpage}
%@% ELSE %@%
\usepackage{latex2man}
\setVersion{1.4}
%@% END-IF %@%
% End preamble
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%@% IF LATEX %@%
\title{Orpie v1.5 User Manual}
\author{Paul J. Pelzl}
\date{September 13, 2007}
\maketitle
\begin{center}
\emph{``Because the equals key is for the weak.''}
\end{center}
%@% IF LATEX %@%
\tableofcontents
\clearpage
%@% ELSE %@%
%@% END-IF %@%
\section{Introduction}
Orpie is a console-based RPN (reverse polish notation) desktop
calculator. The interface is similar to that of modern
Hewlett-Packard${}^{TM}$ calculators, but has been optimized for efficiency on
a PC keyboard. The design is also influenced to some degree by the
%BEGIN LATEX
Mutt email client\footnote{http://www.mutt.org}
%END LATEX
%HEVEA \begin{rawhtml} <a href="http://www.mutt.org">Mutt email client</a> \end{rawhtml}
and the
%BEGIN LATEX
Vim editor\footnote{http://vim.sf.net}.
%END LATEX
%HEVEA \begin{rawhtml} <a href="http://vim.sf.net">Vim editor</a>. \end{rawhtml}
Orpie does not have graphing capability, nor does it offer much in the way of a
programming interface; other applications such as
%BEGIN LATEX
GNU Octave\footnote{http://www.octave.org}
%END LATEX
%HEVEA \begin{rawhtml} <a href="http://www.octave.org">GNU Octave</a>. \end{rawhtml}
are already very effective for such tasks. Orpie focuses specifically on
helping you to crunch numbers quickly.
Orpie is written in
%BEGIN LATEX
Objective Caml (aka OCaml)\footnote{http://caml.inria.fr/},
%END LATEX
%HEVEA \begin{rawhtml} <a href="http://caml.inria.fr">Objective Caml</a> (aka OCaml), \end{rawhtml}
a high-performance functional programming language with a whole lot of nice
features. I highly recommend it.
\section{Installation}
This section describes how to install Orpie by compiling from source. Volunteers have
pre-packaged Orpie for several popular operating systems, so you may be able to save
yourself some time by installing from those packages. Please check the Orpie website for
up-to-date package information.
Before installing Orpie, you should have installed the
%BEGIN LATEX
GNU Scientific Library (GSL)\footnote{http://sources.redhat.com/gsl/}
%END LATEX
%HEVEA \begin{rawhtml} <a href="http://sources.redhat.com/gsl/">GNU Scientific Library</a> (GSL) \end{rawhtml}
version 1.4 or greater. You will also need a curses library (e.g.
%BEGIN LATEX
ncurses\footnote{http://www.gnu.org/software/ncurses/ncurses.html}),
%END LATEX
%HEVEA \begin{rawhtml} <a href="http://www.gnu.org/software/ncurses/ncurses.html">ncurses</a>), \end{rawhtml}
which is almost certainly already installed on your system. Finally, OCaml
3.07 or higher is required to compile the sources. You will need the Nums
library that is distributed with OCaml; if you install OCaml from binary packages
distributed by your OS vendor, you may find that separate Nums packages must also be
installed.
I will assume you have received this program in the form of a source tarball,
e.g. ``\texttt{orpie-x.x.tar.gz}''. You have undoubtedly extracted this archive
already (e.g. using ``\texttt{tar xvzf orpie-x.x.tar.gz}''). Enter the root of
the Orpie installation directory, e.g. ``\texttt{cd orpie-x.x}''. You can compile
the sources with the following sequence:
\begin{verbatim}
$ ./configure
$ make
\end{verbatim}
Finally, run ``\texttt{make install}'' (as root) to install the executables.
``\texttt{configure}'' accepts a number of parameters that you can learn about with
``\texttt{./configure --help}''. Perhaps the most common of these is the {\tt
--prefix} option, which lets you install to a non-standard
directory\footnote{The default installation prefix is \texttt{/usr/local}. The \texttt{orpierc} file
will be placed in \texttt{\$(prefix)/etc} by default; use the \texttt{--sysconfdir} option to
choose a different location.}.
%@% ELSE %@%
%@% IF ORPIERC %@%
\begin{Name}{5}{orpierc}{Paul J. Pelzl}{configuration file for the Orpie calculator}{orpierc manpage}
\texttt{orpierc} is the configuration textfile for the \Cmd{orpie}{1} console calculator.
\end{Name}
%@% ELSE %@%
\begin{Name}{1}{orpie}{Paul J. Pelzl}{a console-based RPN calculator}{Orpie 1.0 Manpage}
\Prog{orpie} is a console-based RPN calculator with an interactive visual stack.
\end{Name}
\section{Synopsis}
\Prog{orpie}
%@% END-IF %@%
%@% END-IF %@%
%@% IF !ORPIERC %@%
\section{Quick Start}
%@% IF !LATEX %@%
CAUTION: while this manpage should be suitable as a quick reference, it may
be subject to miscellaneous shortcomings in typesetting. The definitive
documentation is the user manual provided with Orpie in PDF format.
%@% END-IF %@%
This section describes how to use Orpie in its default configuration. After
familiarizing yourself with the basic operations as outlined in this section,
you may wish to consult
%@% IF LATEX %@%
Section \ref{advanced}
%@% ELSE %@%
the \Cmd{orpierc}{5} manpage
%@% END-IF %@%
to see how Orpie can be configured to better fit your needs.
\subsection{Overview}
%@% IF LATEX %@%
You can start the calculator by executing \texttt{orpie}.
%@% END-IF %@%
The interface has two
panels. The left panel combines status information with context-sensitive help;
the right panel represents the calculator's stack. (Note that the left panel
will be hidden if Orpie is run in a terminal with less than 80 columns.)
In general, you perform calculations by first entering data on to the stack,
then executing functions that operate on the stack data. As an example, you can
hit \texttt{1<enter>2<enter>+} in order to add 1 and 2.
%@% IF LATEX %@%
\subsection{Entering Data}
\subsubsection{Entering Real Numbers}
%@% ELSE %@%
\subsection{Entering Real Numbers}
%@% END-IF %@%
To enter a real number, just type the desired digits and hit enter. The space
bar will begin entry of a scientific notation exponent. The '\texttt{n}' key is used
for negation. Here are some examples:
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|r|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
Keypresses & Resulting Entry \\
\hline
\texttt{1.23<enter>} & \texttt{1.23} \\
\texttt{1.23<space>23n<enter>} & \texttt{1.23e-23} \\
\texttt{1.23n<space>23<enter>} & \texttt{-1.23e23} \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
%@% IF LATEX %@%
\subsubsection{Entering Complex Numbers}
%@% ELSE %@%
\subsection{Entering Complex Numbers}
%@% END-IF %@%
Orpie can represent complex numbers using either cartesian (rectangular) or
polar coordinates. See
%@% IF LATEX %@%
Section \ref{rectpolar}
%@% ELSE %@%
PERFORMING BASIC COMMAND OPERATIONS
%@% END-IF %@%
to see how to change the complex number display mode.
A complex number is entered by first pressing '\texttt{(}', then entering the real
part, then pressing '\texttt{,}' followed by the imaginary part. Alternatively, you
can press '\texttt{(}' followed by the magnitude, then '\texttt{<}' followed by the
phase angle. The angle will be interpreted in degrees or radians, depending on
the current setting of the angle mode
%@% IF LATEX %@%
(see Section \ref{anglemode}).
%@% ELSE %@%
(see PERFORMING BASIC COMMAND OPERATIONS).
%@% END-IF %@%
Examples:
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|r|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
Keypresses & Resulting Entry \\
\hline
\texttt{(1.23, 4.56<enter>} & \texttt{(1.23, 4.56)} \\
\texttt{(0.7072<45<enter>} & \texttt{(0.500065915655126, 0.50006591...} \\
\texttt{(1.23n,4.56<space>10<enter>} & \texttt{(-1.23, 45600000000)} \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
%@% IF LATEX %@%
\subsubsection{Entering Matrices}
%@% ELSE %@%
\subsection{Entering Matrices}
%@% END-IF %@%
You can enter matrices by pressing '\texttt{[}'. The elements of the matrix may then be
entered as described in the previous sections, and should be separated using
'\texttt{,}'. To start a new row of the matrix, press '\texttt{[}' again. On the
stack, each row of the matrix is enclosed in a set of brackets; for example, the
matrix
%@% IF LATEX %@%
%BEGIN LATEX
\begin{displaymath}
\left[
\begin{matrix}
1 & 2 \\
3 & 4
\end{matrix}
\right]
\end{displaymath}
%END LATEX
%HEVEA \begin{center}\begin{tabular}{|cc|}1 & 2 \\ 3 & 4 \end{tabular}\end{center}
%@% ELSE %@%
\begin{Table}{2}
1 & 2 \\
3 & 4
\end{Table}
%@% END-IF %@%
would appear on the stack as \texttt{[[1, 2][3, 4]]}.
Examples of matrix entry:
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|r|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
Keypresses & Resulting Entry \\
\hline
\texttt{[1,2[3,4<enter>} & \texttt{[[1, 2][3, 4]]} \\
\texttt{[1.2<space>10,0[3n,5n<enter>} & \texttt{[[ 12000000000, 0 ][ -3, -5 ]]} \\
\texttt{[(1,2,3,4[5,6,7,8<enter>} & \texttt{[[ (1, 2), (3, 4) ][ (5, 6), (...} \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
%@% IF LATEX %@%
\subsubsection{Entering Data With Units}
%@% ELSE %@%
\subsection{Entering Data With Units}
%@% END-IF %@%
Real and complex scalars and matrices can optionally be labeled with units. After typing
in the numeric portion of the data, press '\texttt{\_}' followed by a units string. The format
of units strings is described in
%@% IF LATEX %@%
Section \ref{unitsformat}.
%@% ELSE %@%
the UNITS FORMATTING section.
%@% END-IF %@%
Examples of entering dimensioned data:
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|r|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
Keypresses & Resulting Entry \\
\hline
%@% IF LATEX %@%
\texttt{1.234\_N*mm\^{}2/s<enter>} & \texttt{1.234\_N*mm\^{}2*s\^{}-1} \\
\texttt{(2.3,5\_s\^{}-4<enter>} & \texttt{(2.3, 5)\_s\^{}-4} \\
%@% ELSE %@%
\texttt{1.234\_N*mm\Circum2/s<enter>} & \texttt{1.234\_N*mm\Circum2*s\Circum-1} \\
\texttt{(2.3,5\_s\Circum-4<enter>} & \texttt{(2.3, 5)\_s\Circum-4} \\
%@% END-IF %@%
\texttt{[1,2[3,4\_lbf*in<enter>} & \texttt{[[ 1, 2 ][ 3, 4 ]]\_lbf*in} \\
\texttt{\_nm<enter>} & \texttt{1\_nm} \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
%@% IF LATEX %@%
\subsubsection{Entering Exact Integers}
%@% ELSE %@%
\subsection{Entering Exact Integers}
%@% END-IF %@%
An exact integer may be entered by pressing '\texttt{\#}' followed by the desired
digits. The base of the integer will be assumed to be the same as the current
calculator base mode (see
%@% IF LATEX %@%
Section \ref{basemode}
%@% ELSE %@%
PERFORMING BASIC COMMAND OPERATIONS
%@% END-IF %@%
to see how to set this mode).
Alternatively, the desired base may be specified by pressing space and appending
one of \{\texttt{b, o, d, h}\}, to represent binary, octal, decimal, or hexadecimal,
respectively. On the stack, the representation of the integer will be changed
to match the current base mode. Examples:
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|r|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
Keypresses & Resulting Entry \\
\hline
%@% IF LATEX %@%
\texttt{\#123456<enter>} & \texttt{\# 123456\`{}d} \\
\texttt{\#ffff<space>h<enter>} & \texttt{\# 65535\`{}d} \\
\texttt{\#10101n<space>b<enter>} & \texttt{\# -21\`{}d} \\
%@% ELSE %@%
\texttt{\#123456<enter>} & \texttt{\# 123456`d} \\
\texttt{\#ffff<space>h<enter>} & \texttt{\# 65535`d} \\
\texttt{\#10101n<space>b<enter>} & \texttt{\# -21`d} \\
%@% END-IF %@%
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
Note that exact integers may have unlimited length, and the basic arithmetic
operations (addition, subtraction, multiplication, division) will be performed
using exact arithmetic when both arguments are integers.
%@% IF LATEX %@%
\subsubsection{Entering Variable Names}
%@% ELSE %@%
\subsection{Entering Variable Names}
%@% END-IF %@%
A variable name may be entered by pressing '\texttt{@}' followed by the desired
variable name string. The string may contain alphanumeric characters, dashes, and
underscores. Example:
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|r|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
Keypresses & Resulting Entry \\
\hline
\texttt{@myvar} & \texttt{@ myvar}\\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
Orpie also supports autocompletion of variable names. The help panel displays a
list of pre-existing variables that partially match the name currently being entered.
You can press '\texttt{<tab>}' to iterate through the list of matching variables.
As a shortcut, keys \texttt{<f1>-<f4>} will enter the variables (``registers'')
\texttt{@ r01} through \texttt{@ r04}.
%@% IF LATEX %@%
\subsubsection{Entering Physical Constants}
%@% ELSE %@%
\subsection{Entering Physical Constants}
%@% END-IF %@%
Orpie includes definitions for a number of fundamental physical constants. To
enter a constant, press '\texttt{C}', followed by the first few letters/digits
of the constant's symbol, then hit enter. Orpie offers an autocompletion
feature for physical constants, so you only need to type enough of the constant
to identify it uniquely. A list of matching constants will appear in the left
panel of the display, to assist you in finding the desired choice.
The following is a list of Orpie's physical constant symbols:
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
Symbol & Physical Constant \\
\hline
\texttt{NA} & Avagadro's number \\
\texttt{k} & Boltzmann constant \\
\texttt{Vm} & molar volume \\
\texttt{R} & universal gas constant \\
\texttt{stdT} & standard temperature \\
\texttt{stdP} & standard pressure \\
\texttt{sigma} & Stefan-Boltzmann constant \\
\texttt{c} & speed of light \\
\texttt{eps0} & permittivity of free space \\
\texttt{u0} & permeability of free space \\
\texttt{g} & acceleration of gravity \\
\texttt{G} & Newtonian gravitational constant \\
\texttt{h} & Planck's constant \\
\texttt{hbar} & Dirac's constant \\
\texttt{e} & electron charge \\
\texttt{me} & electron mass \\
\texttt{mp} & proton mass \\
\texttt{alpha} & fine structure constant \\
\texttt{phi} & magnetic flux quantum \\
\texttt{F} & Faraday's constant \\
\texttt{Rinf} & ``infinity'' Rydberg constant \\
\texttt{a0} & Bohr radius \\
\texttt{uB} & Bohr magneton \\
\texttt{uN} & nuclear magneton \\
\texttt{lam0} & wavelength of a 1eV photon \\
\texttt{f0} & frequency of a 1eV photon \\
\texttt{lamc} & Compton wavelength \\
\texttt{c3} & Wien's constant \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
All physical constants are defined in the Orpie run-configuration file; consult
%@% IF LATEX %@%
Section \ref{advanced}
%@% ELSE %@%
the \Cmd{orpierc}{5} manpage
%@% END-IF %@%
if you wish to define your own constants or change the existing definitions.
%@% IF LATEX %@%
\subsubsection{Entering Data With an External Editor}
\label{editor}
%@% ELSE %@%
\subsection{Entering Data With an External Editor}
%@% END-IF %@%
Orpie can also parse input entered via an external editor. You may find this to be
a convenient method for entering large matrices. Pressing '\texttt{E}' will
launch the external editor, and the various data types may be entered as illustrated
by the examples below:
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
Data Type & Sample Input String \\
\hline
%@% IF LATEX %@%
exact integer & \texttt{\#12345678\`{}d}, where the trailing
letter is one of the base characters \{b, o, d, h\} \\
%@% ELSE %@%
exact integer & \texttt{\#12345678`d}, where the trailing
letter is one of the base characters \{b, o, d, h\} \\
%@% END-IF %@%
real number & \texttt{-123.45e67} \\
complex number & \texttt{(1e10, 2)} or \texttt{(1 <90)} \\
real matrix & \texttt{[[1, 2][3.1, 4.5e10]]} \\
complex matrix & \texttt{[[(1, 0), 5][1e10, (2 <90)]]} \\
variable & \texttt{@myvar} \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
Real and complex numbers and matrices may have units appended; just add a units
string such as ``\texttt{\_N*m/s}'' immediately following the numeric portion
of the expression.
Notice that the complex matrix input parser is quite flexible; real and complex
matrix elements may be mixed, and cartesian and polar complex formats may be
mixed as well.
Multiple stack entries may be specified in the same file, if they are separated
by whitespace. For example, entering \texttt{(1, 2) 1.5} into the editor will cause
the complex value \texttt{(1, 2)} to be placed on the stack, followed by the real
value \texttt{1.5}.
The input parser will discard whitespace where possible, so feel free to add
any form of whitespace between matrix rows, matrix elements, real and complex
components, etc.
\subsection{Executing Basic Function Operations}
%@% IF LATEX %@%
\label{functionops}
%@% END-IF %@%
Once some data has been entered on the stack, you can apply operations to that
data. For example, '\texttt{+}' will add the last two elements on the stack. By
default, the following keys have been bound to such operations:
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
Keys & Operations \\
\hline
\texttt{+} & add last two stack elements \\
\texttt{-} & subtract element 1 from element 2 \\
\texttt{*} & multiply last two stack elements \\
\texttt{/} & divide element 2 by element 1 \\
%@% IF LATEX %@%
\texttt{\^{}} & raise element 2 to the power of element 1 \\
%@% ELSE %@%
\texttt{\Circum} & raise element 2 to the power of element 1 \\
%@% END-IF %@%
\texttt{n} & negate last element \\
\texttt{i} & invert last element \\
\texttt{s} & square root function \\
\texttt{a} & absolute value function \\
\texttt{e} & exponential function \\
\texttt{l} & natural logarithm function \\
\texttt{c} & complex conjugate function \\
\texttt{!} & factorial function \\
\texttt{\%} & element 2 mod element 1 \\
\texttt{S} & store element 2 in (variable) element 1 \\
\texttt{;} & evaluate variable to obtain contents \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
As a shortcut, function operators will automatically enter any data that you
were in the process of entering. So instead of the sequence
\texttt{2<enter>2<enter>+}, you could type simply \texttt{2<enter>2+} and the second number
would be entered before the addition operation is applied.
As an additional shortcut, any variable names used as function arguments will
be evaluated before application of the function. In other words, it is not necessary
to evaluate variables before performing arithmetic operations on them.
\subsection{Executing Function Abbreviations}
%@% IF LATEX %@%
\label{abbrevfunctions}
%@% END-IF %@%
One could bind nearly all calculator operations to specific keypresses, but this
would rapidly get confusing since the PC keyboard is not labeled as nicely as a
calculator keyboard is. For this reason, Orpie includes an
\emph{abbreviation} syntax.
To activate an abbreviation, press '\texttt{'}' (quote key), followed by the
first few letters/digits of the abbreviation, then hit enter. Orpie offers an
autocompletion feature for abbreviations, so you only need to type enough of
the operation to identify it uniquely. The matching abbreviations will appear
in the left panel of the display, to assist you in finding the appropriate
operation.
To avoid interface conflicts, abbreviations may be entered only when the
entry buffer (the bottom line of the screen) is empty.
The following functions are available as abbreviations:
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|l|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
Abbreviations & Functions \\
\hline
\texttt{inv} & inverse function \\
\texttt{pow} & raise element 2 to the power of element 1 \\
\texttt{sq} & square last element \\
\texttt{sqrt} & square root function \\
\texttt{abs} & absolute value function \\
\texttt{exp} & exponential function \\
\texttt{ln} & natural logarithm function \\
%@% IF LATEX %@%
\texttt{10\^{}} & base 10 exponential function \\
%@% ELSE %@%
\texttt{10\Circum} & base 10 exponential function \\
%@% END-IF %@%
\texttt{log10} & base 10 logarithm function \\
\texttt{conj} & complex conjugate function \\
\texttt{sin} & sine function \\
\texttt{cos} & cosine function \\
\texttt{tan} & tangent function \\
\texttt{sinh} & hyperbolic sine function \\
\texttt{cosh} & hyperbolic cosine function \\
\texttt{tanh} & hyperbolic tangent function \\
\texttt{asin} & arcsine function \\
\texttt{acos} & arccosine function \\
\texttt{atan} & arctangent function \\
\texttt{asinh} & inverse hyperbolic sine function \\
\texttt{acosh} & inverse hyperbolic cosine function \\
\texttt{atanh} & inverse hyperbolic tangent function \\
\texttt{re} & real part of complex number \\
\texttt{im} & imaginary part of complex number \\
\texttt{gamma} & Euler gamma function \\
\texttt{lngamma} & natural log of Euler gamma function \\
\texttt{erf} & error function \\
\texttt{erfc} & complementary error function \\
\texttt{fact} & factorial function \\
\texttt{gcd} & greatest common divisor function \\
\texttt{lcm} & least common multiple function \\
\texttt{binom} & binomial coefficient function \\
\texttt{perm} & permutation function \\
%@% IF LATEX %@%
%BEGIN LATEX
\hline
\end{tabular}
\end{center}
\begin{center}
\begin{tabular}[t]{|l|l|}
\hline
Abbreviations (con't) & Functions \\
\hline
%END LATEX
%@% END-IF %@%
\texttt{trans} & matrix transpose \\
\texttt{trace} & trace of a matrix \\
\texttt{solvelin} & solve a linear system of the form Ax = b \\
\texttt{mod} & element 2 mod element 1 \\
\texttt{floor} & floor function \\
\texttt{ceil} & ceiling function \\
\texttt{toint} & convert a real number to an integer type \\
\texttt{toreal} & convert an integer type to a real number \\
\texttt{add} & add last two elements \\
\texttt{sub} & subtract element 1 from element 2 \\
\texttt{mult} & multiply last two elements \\
\texttt{div} & divide element 2 by element 1 \\
\texttt{neg} & negate last element \\
\texttt{store} & store element 2 in (variable) element 1 \\
\texttt{eval} & evaluate variable to obtain contents \\
\texttt{purge} & delete a variable \\
\texttt{total} & sum the columns of a real matrix \\
\texttt{mean} & compute the sample means of the columns of a real matrix \\
\texttt{sumsq} & sum the squares of the columns of a real matrix \\
\texttt{var} & compute the unbiased sample variances of the columns of a real matrix \\
\texttt{varbias} & compute the biased (population) sample variances of the columns of a real matrix \\
\texttt{stdev} & compute the unbiased sample standard deviations of the columns of a real matrix \\
\texttt{stdevbias} & compute the biased (pop.) sample standard deviations of the columns of a matrix \\
\texttt{min} & find the minima of the columns of a real matrix \\
\texttt{max} & find the maxima of the columns of a real matrix \\
\texttt{utpn} & compute the upper tail probability of a normal distribution \\
\texttt{uconvert} & convert element 2 to an equivalent expression with units matching element 1 \\
\texttt{ustand} & convert to equivalent expression using SI standard base units \\
\texttt{uvalue} & drop the units of the last element \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
Entering abbreviations can become tedious when performing repetitive calculations.
To save some keystrokes, Orpie will automatically bind recently-used operations with no prexisting
binding to keys \texttt{<f5>-<f12>}. The current autobindings can be viewed by pressing \texttt{'h'}
to cycle between the various pages of the help panel.
\subsection{Executing Basic Command Operations}
%@% IF LATEX %@%
\label{rectpolar}
\label{anglemode}
\label{basemode}
%@% END-IF %@%
In addition to the function operations listed in
%@% IF LATEX %@%
Section \ref{functionops},
%@% ELSE %@%
the section EXECUTING BASIC FUNCTION OPERATIONS,
%@% END-IF %@%
a number of basic calculator commands have been bound to single keypresses:
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
Keys & Operations \\
\hline
%@% IF LATEX %@%
\texttt{$\backslash$} & drop last element \\
%@% ELSE %@%
\texttt{\Bs} & drop last element \\
%@% END-IF %@%
\texttt{|} & clear all stack elements \\
\texttt{<pagedown>} & swap last two elements \\
\texttt{<enter>} & duplicate last element (when entry buffer is empty) \\
\texttt{u} & undo last operation \\
\texttt{r} & toggle angle mode between degrees and radians \\
\texttt{p} & toggle complex display mode between rectangular and polar \\
\texttt{b} & cycle base display mode between binary, octal, decimal, hex \\
\texttt{h} & cycle through multiple help windows \\
\texttt{v} & view last stack element in a fullscreen editor \\
\texttt{E} & create a new stack element using an external editor \\
%@% IF LATEX %@%
%BEGIN LATEX
\texttt{P} & enter $\pi$ on the stack \\
%END LATEX
%HEVEA \texttt{P} & enter 3.1415\dots on the stack \\
%@% ELSE %@%
\texttt{P} & enter 3.14159265 on the stack \\
%@% END-IF %@%
\texttt{C-L} & refresh the display \\
\texttt{<up>} & begin stack browsing mode \\
\texttt{Q} & quit Orpie \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
\subsection{Executing Command Abbreviations}
In addition to the function operations listed in
%@% IF LATEX %@%
Section \ref{abbrevfunctions},
%@% ELSE %@%
the section EXECUTING FUNCTION ABBREVIATIONS,
%@% END-IF %@%
there are a large number of calculator commands that
have been implemented using the abbreviation syntax:
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|l|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
Abbreviations & Calculator Operation \\
\hline
\texttt{drop} & drop last element \\
\texttt{clear} & clear all stack elements \\
\texttt{swap} & swap last two elements \\
\texttt{dup} & duplicate last element \\
\texttt{undo} & undo last operation \\
\texttt{rad} & set angle mode to radians \\
\texttt{deg} & set angle mode to degrees \\
\texttt{rect} & set complex display mode to rectangular \\
\texttt{polar} & set complex display mode to polar \\
\texttt{bin} & set base display mode to binary \\
\texttt{oct} & set base display mode to octal \\
\texttt{dec} & set base display mode to decimal \\
\texttt{hex} & set base display mode to hexidecimal \\
\texttt{view} & view last stack element in a fullscreen editor \\
\texttt{edit} & create a new stack element using an external editor \\
%@% IF LATEX %@%
%BEGIN LATEX
\texttt{pi} & enter $\pi$ on the stack \\
%END LATEX
%HEVEA \texttt{pi} & enter 3.1415\dots on the stack \\
%@% ELSE %@%
\texttt{pi} & enter 3.14159265 on the stack \\
%@% END-IF %@%
\texttt{rand} & generate a random number between 0 and 1 (uniformly distributed) \\
\texttt{refresh} & refresh the display \\
\texttt{about} & display a nifty ``About Orpie'' screen \\
\texttt{quit} & quit Orpie \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
\subsection{Browsing the Stack}
Orpie offers a \emph{stack browsing mode} to assist in viewing and manipulating
stack data. Press \texttt{<up>} to enter stack browsing mode; this should
highlight the last stack element. You can use the up and down arrow keys to
select different stack elements. The following keys are useful in stack
browsing mode:
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
Keys & Operations \\
\hline
\texttt{q} & quit stack browsing mode \\
\texttt{<left>} & scroll selected entry to the left \\
\texttt{<right>} & scroll selected entry to the right \\
\texttt{r} & cyclically ``roll'' stack elements downward, below the selected element (inclusive) \\
\texttt{R} & cyclically ``roll'' stack elements upward, below the selected element (inclusive) \\
\texttt{v} & view the currently selected element in a fullscreen editor \\
\texttt{E} & edit the currently selected element with an external editor \\
\texttt{<enter>} & duplicate the currently selected element \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
The left and right scrolling option may prove useful for viewing very lengthy
stack entries, such as large matrices. The edit option provides a convenient
way to correct data after it has been entered on the stack.
\subsection{Units Formatting}
A units string is a list of units separated by '\texttt{*}' to indicate multiplication
and '\texttt{/}' to indicate division. Units may be raised to real-valued powers
%@% IF LATEX %@%
\label{unitsformat}
using the '\texttt{\^{}}' character. A contrived example of a valid unit string would be
"\texttt{N*nm\^{}2*kg/s/in\^{}-3*GHz\^{}2.34}".
%@% ELSE %@%
using the '\texttt{\Circum}' character. A contrived example of a valid unit string would be
"\texttt{N*nm\Circum2*kg/s/in\Circum-3*GHz\Circum2.34}".
%@% END-IF %@%
Orpie supports the standard SI prefix set,
\texttt{\{y, z, a, f, p, n, u, m, c, d, da, h, k, M, G, T, P, E, Z, Y\}}
(note the use of '\texttt{u}' for micro-). These prefixes may be applied
to any of the following exhaustive sets of units:
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
String & Length Unit \\
\hline
\texttt{m} & meter \\
\texttt{ft} & foot \\
\texttt{in} & inch \\
\texttt{yd} & yard \\
\texttt{mi} & mile \\
\texttt{pc} & parsec \\
\texttt{AU} & astronomical unit \\
\texttt{Ang} & angstrom \\
\texttt{furlong} & furlong \\
\texttt{pt} & PostScript point \\
\texttt{pica} & PostScript pica \\
\texttt{nmi} & nautical mile \\
\texttt{lyr} & lightyear \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
String & Mass Unit \\
\hline
\texttt{g} & gram \\
\texttt{lb} & pound mass \\
\texttt{oz} & ounce \\
\texttt{slug} & slug \\
\texttt{lbt} & Troy pound \\
\texttt{ton} & (USA) short ton \\
\texttt{tonl} & (UK) long ton \\
\texttt{tonm} & metric ton \\
\texttt{ct} & carat \\
\texttt{gr} & grain \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
String & Time Unit \\
\hline
\texttt{s} & second \\
\texttt{min} & minute \\
\texttt{hr} & hour \\
\texttt{day} & day \\
\texttt{yr} & year \\
\texttt{Hz} & Hertz \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
String & Temperature Unit \\
\hline
\texttt{K} & Kelvin \\
\texttt{R} & Rankine \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
Note: No, Celsius and Fahrenheit will not be supported. Because these
temperature units do not share a common zero point, their behavior is
ill-defined under many operations.
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
String & ``Amount of Substance'' Unit \\
\hline
\texttt{mol} & Mole \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
String & Force Unit \\
\hline
\texttt{N} & Newton \\
\texttt{lbf} & pound force \\
\texttt{dyn} & dyne \\
\texttt{kip} & kip \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
String & Energy Unit \\
\hline
\texttt{J} & Joule \\
\texttt{erg} & erg \\
\texttt{cal} & calorie \\
\texttt{BTU} & british thermal unit \\
\texttt{eV} & electron volt \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
String & Electrical Unit \\
\hline
\texttt{A} & Ampere \\
\texttt{C} & Coulomb \\
\texttt{V} & volt \\
\texttt{Ohm} & Ohm \\
\texttt{F} & Farad \\
\texttt{H} & Henry \\
\texttt{T} & Tesla \\
\texttt{G} & Gauss \\
\texttt{Wb} & Weber \\
\texttt{Mx} & Maxwell \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
String & Power Unit \\
\hline
\texttt{W} & Watt \\
\texttt{hp} & horsepower \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
String & Pressure Unit \\
\hline
\texttt{Pa} & Pascal \\
\texttt{atm} & atmosphere \\
\texttt{bar} & bar \\
\texttt{Ohm} & Ohm \\
\texttt{mmHg} & millimeters of mercury \\
\texttt{inHg} & inches of mercury \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
String & Luminance Unit \\
\hline
\texttt{cd} & candela \\
\texttt{lm} & lumen \\
\texttt{lx} & lux \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
Note: Although the lumen is defined by
\texttt{1\_lm = 1\_cd * sr}, Orpie drops the steridian because it is
a dimensionless unit and therefore is of questionable use to a calculator.
%@% IF LATEX %@%
\begin{center}
\begin{tabular}[t]{|r|l|}
%@% ELSE %@%
\begin{Table}{2}
%@% END-IF %@%
\hline
String & Volume Unit \\
\hline
\texttt{ozfl} & fluid ounce (US) \\
\texttt{cup} & cup (US) \\
\texttt{pt} & pint (US) \\
\texttt{qt} & quart (US) \\
\texttt{gal} & gallon (US) \\
\texttt{L} & liter \\
\hline
%@% IF LATEX %@%
\end{tabular}
\end{center}
%@% ELSE %@%
\end{Table}
%@% END-IF %@%
All units are defined in the Orpie run-configuration file; consult
%@% IF LATEX %@%
Section \ref{advanced}
%@% ELSE %@%
the \Cmd{orpierc}{5} manpage
%@% END-IF %@%
if you wish to define your own units or change the existing definitions.
%@% END-IF %@%
% (!ORPIERC)
%@% IF LATEX || ORPIERC %@%
%@% IF LATEX %@%
\section{Advanced Configuration}
\label{advanced}
%@% ELSE %@%
\section{Introduction}
CAUTION: while this manpage should be suitable as a quick reference, it may
be subject to miscellaneous shortcomings in typesetting. The definitive
documentation is the user manual provided with Orpie in PDF format.
%@% END-IF %@%
Orpie reads a run-configuration textfile (generally \texttt{/etc/orpierc} or
\texttt{/usr/local/etc/orpierc}) to determine key and command bindings. You can
create a personalized configuration file in \texttt{\$HOME/.orpierc}, and select
bindings that match your usage patterns. The recommended procedure is to ``include''
the \texttt{orpierc} file provided with Orpie
%@% IF LATEX %@%
(see Section \ref{include}),
%@% ELSE %@%
(see INCLUDING OTHER RCFILES),
%@% END-IF %@%
and add or remove settings as desired.
%@% IF LATEX %@%
\subsection{\texttt{orpierc} Syntax}
%@% ELSE %@%
\section{\texttt{orpierc} Syntax}
%@% END-IF %@%
You may notice that the \texttt{orpierc} syntax is similar to the syntax used in
the configuration file for the Mutt email client (muttrc).
Within the \texttt{orpierc} file, strings should be enclosed in double quotes (\texttt{"}).
A double quote character inside a string may be represented by
%@% IF LATEX %@%
\texttt{$\backslash$"} .
%@% ELSE %@%
\Bs " .
%@% END-IF %@%
The backslash character must be represented by doubling it
%@% IF LATEX %@%
(\texttt{$\backslash\backslash$}).
%@% ELSE %@%
(\Bs\Bs).
%@% END-IF %@%
%@% IF LATEX %@%
\subsubsection{Including Other Rcfiles}
\label{include}
Syntax: \texttt{include \emph{filename\_string}} \\ \\
%@% ELSE %@%
\subsection{Including Other Rcfiles}
Syntax: include \emph{filename\_string} \\ \\
%@% END-IF %@%
This syntax can be used to include one run-configuration file within another.
This command could be used to load the default \texttt{orpierc} file (probably
found in \texttt{/etc/orpierc}) within your personalized rcfile,
\texttt{\~{}/.orpierc}. The filename string should be enclosed in quotes.
%@% IF LATEX %@%
\subsubsection{Setting Configuration Variables}
\label{setvar}
Syntax: \texttt{set \emph{variable}=\emph{value\_string}} \\ \\
%@% ELSE %@%
\subsection{Setting Configuration Variables}
Syntax: set \emph{variable}=\emph{value\_string} \\ \\
%@% END-IF %@%
Several configuration variables can be set using this syntax; check
%@% IF LATEX %@%
Section \ref{variables}
%@% ELSE %@%
the CONFIGURATION VARIABLES description
%@% END-IF %@%
to see a list. The variables are unquoted, but the values should be quoted strings.
%@% IF LATEX %@%
\subsubsection{Creating Key Bindings}
\label{bindings}
%@% ELSE %@%
\subsection{Creating Key Bindings}
%@% END-IF %@%
Syntax: \texttt{bind \emph{key\_identifier operation}} \\ \\
This command will bind a keypress to execute a calculator operation.
The various operations, which should not be enclosed in quotes,
may be found in
%@% IF LATEX %@%
Section \ref{operationslist}.
%@% ELSE %@%
the section on CALCULATOR OPERATIONS.
%@% END-IF %@%
Key identifiers may be specified by strings that represent a single keypress,
for example \texttt{"m"} (quotes included). The key may be prefixed with
%@% IF LATEX %@%
\texttt{"$\backslash\backslash$C"} or \texttt{"$\backslash\backslash$M"}
%@% ELSE %@%
"\Bs\Bs C" or "\Bs\Bs M"
%@% END-IF %@%
to represent Control or Meta (Alt) modifiers, respectively; note that the
backslash must be doubled. A number of special keys lack single-character
representations, so the following strings may be used to represent them:
\begin{itemize}
\item \texttt{"<esc>"}
\item \texttt{"<tab>"}
\item \texttt{"<enter>"}
\item \texttt{"<return>"}
\item \texttt{"<insert>"}
\item \texttt{"<home>"}
\item \texttt{"<end>"}
\item \texttt{"<pageup>"}
\item \texttt{"<pagedown>"}
\item \texttt{"<space>"}
\item \texttt{"<left>"}
\item \texttt{"<right>"}
\item \texttt{"<up>"}
\item \texttt{"<down>"}
\item \texttt{"<f1>"} to \texttt{"<f12>"}
\end{itemize}
Due to differences between various terminal emulators, this key identifier syntax may
not be adequate to describe every keypress. As a workaround, Orpie will also accept key
identifiers in octal notation. As an example, you could use
%@% IF LATEX %@%
\texttt{$\backslash$024}
%@% ELSE %@%
\Bs 024
%@% END-IF %@%
(do \emph{not} enclose it in quotes) to represent Ctrl-T.
Orpie includes a secondary executable, \texttt{orpie-curses-keys}, that prints out
the key identifiers associated with keypresses. You may find it useful when customizing
\texttt{orpierc}.
Multiple keys may be bound to the same operation, if desired.
%@% IF LATEX %@%
\subsubsection{Removing Key Bindings}
\label{unbindings}
%@% ELSE %@%
\subsection{Removing Key Bindings}
%@% END-IF %@%
Syntax: \\
\texttt{unbind\_function \emph{key\_identifier}} \\
\texttt{unbind\_command \emph{key\_identifier}} \\
\texttt{unbind\_edit \emph{key\_identifier}} \\
\texttt{unbind\_browse \emph{key\_identifier}} \\
\texttt{unbind\_abbrev \emph{key\_identifier}} \\
\texttt{unbind\_variable \emph{key\_identifier}} \\
\texttt{unbind\_integer \emph{key\_identifier}} \\ \\
These commands will remove key bindings associated with the various entry
modes (functions, commands, editing operations, etc.). The key identifiers
should be defined using the syntax described in the previous section.
%@% IF LATEX %@%
\subsubsection{Creating Key Auto-Bindings}
\label{autobindings}
%@% ELSE %@%
\subsection{Creating Key Auto-Bindings}
%@% END-IF %@%
Syntax: \texttt{autobind \emph{key\_identifier}} \\ \\
In order to make repetitive calculations more pleasant, Orpie offers an automatic key
binding feature. When a function or command is executed using its abbreviation,
one of the keys selected by the \texttt{autobind} syntax will be
automatically bound to that operation (unless the operation has already been bound
to a key). The current set of autobindings can be viewed in the help panel by executing
\texttt{command\_cycle\_help} (bound to \texttt{'h'} by default).
The syntax for the key identifiers is provided in the previous section.
%@% IF LATEX %@%
\subsubsection{Creating Operation Abbreviations}
\label{abbreviations}
%@% ELSE %@%
\subsection{Creating Operation Abbreviations}
%@% END-IF %@%
Syntax: \texttt{abbrev \emph{operation\_abbreviation operation}} \\ \\
You can use this syntax to set the abbreviations used within Orpie to represent the
various functions and commands. A list of available operations may be found in
%@% IF LATEX %@%
Section \ref{operationslist}.
%@% ELSE %@%
the CALCULATOR OPERATIONS section.
%@% END-IF %@%
The operation abbreviations should be quoted strings, for example \texttt{"sin"}
or \texttt{"log"}.
Orpie performs autocompletion on these abbreviations, allowing you to type
usually just a few letters in order to select the desired command. The order of the
autocompletion matches will be the same as the order in which the abbreviations are
registered by the rcfile--so you may wish to place the more commonly used operation
abbreviations earlier in the list.
Multiple abbreviations may be bound to the same operation, if desired.
%@% IF LATEX %@%
\subsubsection{Removing Operation Abbreviations}
\label{unabbreviations}
%@% ELSE %@%
\subsection{Removing Operation Abbreviations}
%@% END-IF %@%
Syntax: \texttt{unabbrev \emph{operation\_abbreviation}} \\ \\
This syntax can be used to remove an operation abbreviation. The operation abbreviations
should be quoted strings, as described in the previous section.
%@% IF LATEX %@%
\subsubsection{Creating Macros}
\label{macros}
%@% ELSE %@%
\subsection{Creating Macros}
%@% END-IF %@%
Syntax: \texttt{macro \emph{key\_identifier macro\_string}} \\ \\
You can use this syntax to cause a single keypress (the \emph{key\_identifier})
to be interpreted as the series of keypresses listed in \emph{macro\_string}.
The syntax for defining a keypress is the same as that defined in
%@% IF LATEX %@%
Section \ref{bindings}.
%@% ELSE %@%
the section on CREATING KEY BINDINGS.
%@% END-IF %@%
The macro string should be a list of whitespace-separated keypresses, e.g.
\texttt{"2 <return> 2 +"} (including quotes).
This macro syntax provides a way to create small programs; by way of example,
the default orpierc file includes macros for the base 2 logarithm and the
binary entropy function (bound to \texttt{L} and \texttt{H}, respectively),
as well as ``register'' variable shortcuts (\texttt{<f1>} to \texttt{<f12>}).
Macros may call other macros recursively. However, take care that a macro does
not call \emph{itself} recursively; Orpie will not trap the infinite loop.
Note that operation abbreviations may be accessed within macros. For example,
\texttt{macro "A" "' a b o u t <return>"} would bind \texttt{A} to display
the ``about Orpie'' screen.
%@% IF LATEX %@%
\subsubsection{Creating Units}
\label{units}
%@% ELSE %@%
\subsection{Creating Units}
%@% END-IF %@%
Syntax: \\
\texttt{base\_unit \emph{unit\_symbol preferred\_prefix}} \\
\texttt{unit \emph{unit\_symbol unit\_definition}} \\ \\
Units are defined in a two-step process:
\begin{enumerate}
\item Define a set of orthogonal ``base units.'' All other units must be expressible
in terms of these base units. The base units can be given a preferred SI prefix,
which will be used whenever the units are standardized (e.g. via \texttt{ustand}).
The unit symbols and preferred prefixes should all be quoted strings; to prefer
\emph{no} prefix, use the empty string (\texttt{""}).
It is expected that most users will use the fundamental SI units for base units.
\item Define all other units in terms of either base units or previously-defined units.
Again, the unit symbol and unit definition should be quoted strings. The definition
should take the form of a numeric value followed by a units string, e.g.
\texttt{"2.5\_kN*m/s"}. See
%@% IF LATEX %@%
Section \ref{unitsformat}
%@% ELSE %@%
the UNITS FORMATTING section
%@% END-IF %@%
for more details on the unit string format.
\end{enumerate}
%@% IF LATEX %@%
\subsubsection{Creating Constants}
\label{constants}
%@% ELSE %@%
\subsection{Creating Constants}
%@% END-IF %@%
Syntax: \texttt{constant \emph{constant\_symbol constant\_definition}} \\ \\
This syntax can be used to define a physical constant. Both the constant symbol
and definition must be quoted strings. The constant definition should be a
numeric constant followed by a units string e.g. \texttt{"1.60217733e-19\_C"}.
All units used in the constant definition must already have been defined.
%@% IF LATEX %@%
\subsection{Configuration Variables}
\label{variables}
The following configuration variables may be set as described in Section \ref{setvar}:
%@% ELSE %@%
\section{Configuration Variables}
The following configuration variables may be set as described in the SETTING
CONFIGURATION VARIABLES section.
%@% END-IF %@%
\begin{itemize}
\item \texttt{datadir} \\
This variable should be set to the full path of the Orpie data directory,
which will contain the calculator state save file, temporary buffers, etc.
The default directory is
%@% IF LATEX %@%
\texttt{"\~{}/.orpie/"}.
%@% ELSE %@%
"\Bs\Tilde /.orpie/".
%@% END-IF %@%
\item \texttt{editor} \\
This variable may be set to the fullscreen editor of your choice. The default
value is \texttt{"vi"}. It is recommended that you choose an editor that offers
horizontal scrolling in place of word wrapping, so that the columns of large
matrices can be properly aligned. (The Vim editor could be used in this fashion
by setting \texttt{editor} to \texttt{"vim -c 'set nowrap'"}.)
\item \texttt{hide\_help} \\
Set this variable to \texttt{"true"} to hide the left help/status panel, or leave
it on the default of \texttt{"false"} to display the help panel.
\item \texttt{conserve\_memory} \\
Set this variable to \texttt{"true"} to minimize memory usage, or leave it on
the default of \texttt{"false"} to improve rendering performance. (By default,
Orpie caches multiple string representations of all stack elements. Very large
integers in particular require significant computation for string representation,
so caching these strings can make display updates much faster.)
\end{itemize}
%@% IF LATEX %@%
\subsection{Calculator Operations}
\label{operationslist}
%@% ELSE %@%
\section{Calculator Operations}
%@% END-IF %@%
Every calculator operation can be made available to the interface using the syntax
described in
%@% IF LATEX %@%
Sections \ref{bindings} and \ref{abbreviations}.
%@% ELSE %@%
the sections on CREATING KEY BINDINGS and CREATING OPERATION ABBREVIATIONS.
%@% END-IF %@%
The following is a list of every available operation.
%@% IF LATEX %@%
\subsubsection{Functions}
\label{functions}
%@% ELSE %@%
\subsection{Functions}
%@% END-IF %@%
The following operations are functions--that is, they will consume at least one
argument from the stack. Orpie will generally abort the computation and
provide an informative error message if a function cannot be successfully applied (for
example, if you try to compute the transpose of something that is not a matrix).
For the exact integer data type, basic arithmetic operations will yield an exact
integer result. Division of two exact integers will yield the quotient of
the division. The more complicated functions will generally promote the integer
to a real number, and as such the arithmetic will no longer be exact.
\begin{itemize}
\item \texttt{function\_10\_x} \\
Raise 10 to the power of the last stack element (inverse of function\_log10).
\item \texttt{function\_abs} \\
Compute the absolute value of the last stack element.
\item \texttt{function\_acos} \\
Compute the inverse cosine of the last stack element. For real numbers,
The result will be provided either in degrees or radians, depending on
the angle mode of the calculator.
\item \texttt{function\_acosh} \\
Compute the inverse hyperbolic cosine of the last stack element.
\item \texttt{function\_add} \\
Add last two stack elements.
\item \texttt{function\_arg} \\
Compute the argument (phase angle of complex number) of the last stack
element. The value will be provided in either degrees or radians,
depending on the current angle mode of the calculator.
\item \texttt{function\_asin} \\
Compute the inverse sine of the last stack element. For real numbers,
The result will be provided either in degrees or radians, depending on
the angle mode of the calculator.
\item \texttt{function\_asinh} \\
Compute the inverse hyperbolic sine of the last stack element.
\item \texttt{function\_atan} \\
Compute the inverse tangent of the last stack element. For real numbers,
The result will be provided either in degrees or radians, depending on
the angle mode of the calculator.
\item \texttt{function\_atanh} \\
Compute the inverse hyperbolic tangent of the last stack element.
\item \texttt{function\_binomial\_coeff} \\
Compute the binomial coefficient (``n choose k'') formed by the last two
stack elements. If these arguments are real, the coefficient is computed
using a fast approximation to the log of the gamma function, and therefore
the result is subject to rounding errors. For exact integer arguments,
the coefficient is computed using exact arithmetic; this has the potential
to be a slow operation.
\item \texttt{function\_ceiling} \\
Compute the ceiling of the last stack element.
\item \texttt{function\_convert\_units} \\
Convert stack element 2 to an equivalent expression in the units of
element 1. Element 1 should be real-valued, and its magnitude will
be ignored when computing the conversion.
\item \texttt{function\_cos} \\
Compute the cosine of the last stack element. If the argument is real,
it will be assumed to be either degrees or radians, depending on the
angle mode of the calculator.
\item \texttt{function\_cosh} \\
Compute the hyperbolic cosine of the last stack element.
\item \texttt{function\_conj} \\
Compute the complex conjugate of the last stack element.
\item \texttt{function\_div} \\
Divide element 2 by element 1.
\item \texttt{function\_erf} \\
Compute the error function of the last stack element.
\item \texttt{function\_erfc} \\
Compute the complementary error function of the last stack element.
\item \texttt{function\_eval} \\
Obtain the contents of the variable in the last stack position.
\item \texttt{function\_exp} \\
Evaluate the exponential function of the last stack element.
\item \texttt{function\_factorial} \\
Compute the factorial of the last stack element. For a real argument,
this is computed using a fast approximation to the gamma function,
and therefore the result may be subject to rounding errors (or overflow). For an
exact integer argument, the factorial is computed using exact arithmetic;
this has the potential to be a slow operation.
\item \texttt{function\_floor} \\
Compute the floor of the last stack element.
\item \texttt{function\_gamma} \\
Compute the Euler gamma function of the last stack element.
\item \texttt{function\_gcd} \\
Compute the greatest common divisor of the last two stack elements. This operation
may be applied only to integer type data.
\item \texttt{function\_im} \\
Compute the imaginary part of the last stack element.
\item \texttt{function\_inv} \\
Compute the multiplicative inverse of the last stack element.
\item \texttt{function\_lcm} \\
Compute the least common multiple of the last two stack elements. This
operation may be applied only to integer type data.
\item \texttt{function\_ln} \\
Compute the natural logarithm of the last stack element.
\item \texttt{function\_lngamma} \\
Compute the natural logarithm of the Euler gamma function of the last
stack element.
\item \texttt{function\_log10} \\
Compute the base-10 logarithm of the last stack element.
\item \texttt{function\_maximum} \\
Find the maximum values of each of the columns of a real NxM matrix,
returning a 1xM matrix as a result.
\item \texttt{function\_minimum} \\
Find the minimum values of each of the columns of a real NxM matrix,
returning a 1xM matrix as a result.
\item \texttt{function\_mean} \\
Compute the sample means of each of the columns of a real NxM matrix,
returning a 1xM matrix as a result.
\item \texttt{function\_mod} \\
Compute element 2 mod element 1. This operation can be applied only
to integer type data.
\item \texttt{function\_mult} \\
Multiply last two stack elements.
\item \texttt{function\_neg} \\
Negate last stack element.
\item \texttt{function\_permutation} \\
Compute the permutation coefficient determined by the last two stack
elements 'n' and 'k': the number of ways of obtaining an ordered subset
of k elements from a set of n elements.
If these arguments are real, the coefficient is computed
using a fast approximation to the log of the gamma function, and therefore
the result is subject to rounding errors. For exact integer arguments,
the coefficient is computed using exact arithmetic; this has the potential
to be a slow operation.
\item \texttt{function\_pow} \\
Raise element 2 to the power of element 1.
\item \texttt{function\_purge} \\
Delete the variable in the last stack position.
\item \texttt{function\_re} \\
Compute the real part of the last stack element.
\item \texttt{function\_sin} \\
Compute the sine of the last stack element. If the argument is real, it
will be assumed to be either degrees or radians, depending on the angle
mode of the calculator.
\item \texttt{function\_sinh} \\
Compute the hyperbolic sine of the last stack element.
\item \texttt{function\_solve\_linear} \\
Solve a linear system of the form Ax = b, where A and b are the last
two elements on the stack. A must be a square matrix and b must
be a matrix with one column. This function does not compute inv(A),
but obtains the solution by a more efficient LU decomposition method.
This function is recommended over explicitly computing the inverse,
especially when solving linear systems with relatively large dimension or
with poorly conditioned matrices.
\item \texttt{function\_sq} \\
Square the last stack element.
\item \texttt{function\_sqrt} \\
Compute the square root of the last stack element.
\item \texttt{function\_standardize\_units} \\
Convert the last stack element to an equivalent expression using the SI standard
base units (kg, m, s, etc.).
\item \texttt{function\_stdev\_unbiased} \\
Compute the unbiased sample standard deviation of each of the columns of a real NxM
matrix, returning a 1xM matrix as a result. (Compare to HP48's \texttt{sdev}
function.)
\item \texttt{function\_stdev\_biased} \\
Compute the biased (population) sample standard deviation of each of the columns
of a real NxM matrix, returning a 1xM matrix as a result. (Compare to
HP48's \texttt{psdev} function.)
\item \texttt{function\_store} \\
Store element 2 in (variable) element 1.
\item \texttt{function\_sub} \\
Subtract element 1 from element 2.
\item \texttt{function\_sumsq} \\
Sum the squares of each of the columns of a real NxM matrix, returning a
1xM matrix as a result.
\item \texttt{function\_tan} \\
Compute the tangent of the last stack element. If the argument is real,
it will be assumed to be either degrees or radians, depending on the
angle mode of the calculator.
\item \texttt{function\_tanh} \\
Compute the hyperbolic tangent of the last stack element.
\item \texttt{function\_to\_int} \\
Convert a real number to an integer type.
\item \texttt{function\_to\_real} \\
Convert an integer type to a real number.
\item \texttt{function\_total} \\
Sum each of the columns of a real NxM matrix, returning a
1xM matrix as a result.
\item \texttt{function\_trace} \\
Compute the trace of a square matrix.
\item \texttt{function\_transpose} \\
Compute the matrix transpose of the last stack element.
\item \texttt{function\_unit\_value} \\
Drop the units of the last stack element.
\item \texttt{function\_utpn} \\
Compute the upper tail probability of a normal distribution. \\
%@% IF LATEX %@%
%BEGIN LATEX
$utpn(m, v, x) = \int_x^\infty \frac{1}{\sqrt{2 \pi v}} \exp \left(- \frac{(m - y)^2}{2 v} \right) \,dy$
%END LATEX
%HEVEA UTPN(m, v, x) = Integrate[ 1/Sqrt[2 Pi v] Exp[-(m-y)${}^2$/(2 v)], \{y, x, Infinity\}]
%@% ELSE %@%
UTPN(m, v, x) = Integrate[ 1/Sqrt[2 Pi v] Exp[-(m-y)^2/(2 v)], {y, x, Infinity}]
%@% END-IF %@%
\item \texttt{function\_var\_unbiased} \\
Compute the unbiased sample variance of each of the columns of a real NxM
matrix, returning a 1xM matrix as a result. (Compare to HP48's \texttt{var}
function.)
\item \texttt{function\_var\_biased} \\
Compute the biased (population) sample variance of each of the columns of a
real NxM matrix, returning a 1xM matrix as a result. (Compare to HP48's
\texttt{pvar} function.)
\end{itemize}
%@% IF LATEX %@%
\subsubsection{Commands}
\label{commands}
%@% ELSE %@%
\subsection{Commands}
%@% END-IF %@%
The following operations are referred to as commands; they differ from functions because
they do not take an argument. Many calculator interface settings are implemented as commands.
\begin{itemize}
\item \texttt{command\_about} \\
Display a nifty ``about Orpie'' credits screen.
\item \texttt{command\_begin\_abbrev} \\
Begin entry of an operation abbreviation.
\item \texttt{command\_begin\_browsing} \\
Enter stack browsing mode.
\item \texttt{command\_begin\_constant} \\
Begin entry of a physical constant.
\item \texttt{command\_begin\_variable} \\
Begin entry of a variable name.
\item \texttt{command\_bin} \\
Set the base of exact integer representation to 2 (binary).
\item \texttt{command\_clear} \\
Clear all elements from the stack.
\item \texttt{command\_cycle\_base} \\
Cycle the base of exact integer representation between 2, 8,
10, and 16 (bin, oct, dec, and hex).
\item \texttt{command\_cycle\_help} \\
Cycle through multiple help pages. The first page displays commonly used
bindings, and the second page displays the current autobindings.
\item \texttt{command\_dec} \\
Set the base of exact integer representation to 10 (decimal).
\item \texttt{command\_deg} \\
Set the angle mode to degrees.
\item \texttt{command\_drop} \\
Drop the last element off the stack.
\item \texttt{command\_dup} \\
Duplicate the last stack element.
\item \texttt{command\_enter\_pi} \\
%@% IF LATEX %@%
%BEGIN LATEX
Enter $\pi$ on the stack.
%END LATEX
%HEVEA Enter 3.1415\dots on the stack.
%@% ELSE %@%
Enter 3.1415\Dots on the stack.
%@% END-IF %@%
\item \texttt{command\_hex} \\
Set the base of exact integer representation to 16 (hexadecimal).
\item \texttt{command\_oct} \\
Set the base of exact integer representation to 8 (octal).
\item \texttt{command\_polar} \\
Set the complex display mode to polar.
\item \texttt{command\_rad} \\
Set the angle mode to radians.
\item \texttt{command\_rand} \\
Generate a random real-valued number between 0 (inclusive) and 1 (exclusive). The deviates
are uniformly distributed.
\item \texttt{command\_rect} \\
Set the complex display mode to rectangular (cartesian).
\item \texttt{command\_refresh} \\
Refresh the display.
\item \texttt{command\_swap} \\
Swap stack elements 1 and 2.
\item \texttt{command\_quit} \\
Quit Orpie.
\item \texttt{command\_toggle\_angle\_mode} \\
Toggle the angle mode between degrees and radians.
\item \texttt{command\_toggle\_complex\_mode} \\
Toggle the complex display mode between rectangular and polar.
\item \texttt{command\_undo} \\
Undo the last calculator operation.
\item \texttt{command\_view} \\
View the last stack element in an external fullscreen editor.
\item \texttt{command\_edit\_input} \\
Create a new stack element using an external editor.
\end{itemize}
%@% IF LATEX %@%
\subsubsection{Edit Operations}
\label{edits}
%@% ELSE %@%
\subsection{Edit Operations}
%@% END-IF %@%
The following operations are related to editing during data entry. These
commands cannot be made available as operation abbreviations, since
abbreviations are not accessible while entering data. These operations should
be made available as single keypresses using the \texttt{bind} keyword.
\begin{itemize}
\item \texttt{edit\_angle} \\
Begin entering the phase angle of a complex number. (Orpie will
assume the angle is in either degrees or radians, depending on
the current angle mode.)
\item \texttt{edit\_backspace} \\
Delete the last character entered.
\item \texttt{edit\_begin\_integer} \\
Begin entering an exact integer.
\item \texttt{edit\_begin\_units} \\
Begin appending units to a numeric expression.
\item \texttt{edit\_complex} \\
Begin entering a complex number.
\item \texttt{edit\_enter} \\
Enter the data that is currently being edited.
\item \texttt{edit\_matrix} \\
Begin entering a matrix, or begin entering the next
row of a matrix.
\item \texttt{edit\_minus} \\
Enter a minus sign in input.
\item \texttt{edit\_scientific\_notation\_base} \\
Begin entering the scientific notation exponent of a real number,
or the base of an exact integer.
\item \texttt{edit\_separator} \\
Begin editing the next element of a complex number or
matrix. (This will insert a comma between elements.)
\end{itemize}
%@% IF LATEX %@%
\subsubsection{Browsing Operations}
\label{browse}
%@% ELSE %@%
\subsection{Browsing Operations}
%@% END-IF %@%
The following list of operations is available only in stack browsing mode.
As abbreviations are unavailable while browsing the stack, these operations
should be bound to single keypresses using the \texttt{bind} keyword.
\begin{itemize}
\item \texttt{browse\_echo} \\
Echo the currently selected element to stack level 1.
\item \texttt{browse\_end} \\
Exit stack browsing mode.
\item \texttt{browse\_drop} \\
Drop the currently selected stack element.
\item \texttt{browse\_dropn} \\
Drop all stack elements below the current selection (inclusive).
\item \texttt{browse\_keep} \\
Drop all stack elements \emph{except} the current selection. (This is
complementary to \texttt{browse\_drop}.
\item \texttt{browse\_keepn} \\
Drop all stack elements above the current selection (non-inclusive). (This
is complementary to \texttt{browse\_dropn}.
\item \texttt{browse\_next\_line} \\
Move the selection cursor down one line.
\item \texttt{browse\_prev\_line} \\
Move the selection cursor up one line.
\item \texttt{browse\_rolldown} \\
Cyclically ``roll'' stack elements downward, below the
selected element (inclusive).
\item \texttt{browse\_rollup} \\
Cyclically ``roll'' stack elements upward, below the selected
element (inclusive) .
\item \texttt{browse\_scroll\_left} \\
Scroll the selected element to the left (for viewing very large
entries such as matrices).
\item \texttt{browse\_scroll\_right} \\
Scroll the selected element to the right.
\item \texttt{browse\_view} \\
View the currently selected stack element in a fullscreen editor.
\item \texttt{browse\_edit} \\
Edit the currently selected stack element using an external editor.
\end{itemize}
%@% IF LATEX %@%
\subsubsection{Abbreviation Entry Operations}
\label{abbrevoperations}
%@% ELSE %@%
\subsection{Abbreviation Entry Operations}
%@% END-IF %@%
The following list of operations is available only while entering a function or
command abbreviation, or while entering a physical constant. These operations must
be bound to single keypresses using
the \texttt{bind} keyword.
\begin{itemize}
\item \texttt{abbrev\_backspace} \\
Delete a character from the abbreviation string.
\item \texttt{abbrev\_enter} \\
Execute the operation associated with the selected abbreviation.
\item \texttt{abbrev\_exit} \\
Cancel abbreviation entry.
\end{itemize}
%@% IF LATEX %@%
\subsubsection{Variable Entry Operations}
\label{variableoperations}
%@% ELSE %@%
\subsection{Variable Entry Operations}
%@% END-IF %@%
The following list of operations is available only while entering a variable
name. As abbreviations are unavailable while entering variables, these operations
should be bound to single keypresses using the \texttt{bind} keyword.
\begin{itemize}
\item \texttt{variable\_backspace} \\
Delete a character from the variable name.
\item \texttt{variable\_cancel} \\
Cancel entry of the variable name.
\item \texttt{variable\_complete} \\
Autocomplete the variable name.
\item \texttt{variable\_enter} \\
Enter the variable name on the stack.
\end{itemize}
%@% IF LATEX %@%
\subsubsection{Integer Entry Operations}
\label{integeroperations}
%@% ELSE %@%
\subsection{Integer Entry Operations}
%@% END-IF %@%
The following operation is available only while entering an integer; it can be
made accessible by binding it to a single keypress using the \texttt{bind} keyword.
\begin{itemize}
\item \texttt{integer\_cancel} \\
Cancel entry of an integer.
\end{itemize}
% end ORPIERC
%@% END-IF %@%
%@% IF !ORPIERC %@%
\section{Licensing}
Orpie is Free Software; you can redistribute it and/or modify it under the
terms of the GNU General Public License (GPL), Version 2, as published by the
Free Software Foundation. You should have received a copy of the GPL along
with this program, in the file ``COPYING''.
\section{Credits}
Orpie includes portions of the
%@% IF LATEX %@%
%BEGIN LATEX
ocamlgsl\footnote{http://oandrieu.nerim.net/ocaml/gsl/}
%END LATEX
%HEVEA \begin{rawhtml} <a href="http://oandrieu.nerim.net/ocaml/gsl/">ocamlgsl</a> \end{rawhtml}
%@% ELSE %@%
ocamlgsl [1]
%@% END-IF %@%
bindings supplied by Olivier Andrieu, as well as the curses bindings from the
%@% IF LATEX %@%
%BEGIN LATEX
OCaml Text Mode Kit\footnote{http://www.nongnu.org/ocaml-tmk/}
%END LATEX
%HEVEA \begin{rawhtml} <a href="http://www.nongnu.org/ocaml-tmk/">OCaml Text Mode Kit</a> \end{rawhtml}
%@% ELSE %@%
OCaml Text Mode Kit [2]
%@% END-IF %@%
written by Nicolas George. I would like to thank these authors for helping to
make Orpie possible.
\section{Contact info}
Orpie author: Paul Pelzl \texttt{<pelzlpj@gmail.com>} \\
%@% IF LATEX %@%
Orpie website: \texttt{http://pessimization.com/software/orpie} \\
%@% ELSE %@%
Orpie website: \URL{http://pessimization.com/software/orpie} \\
%@% END-IF %@%
\noindent
Feel free to contact me if you have bugs, feature requests, patches, etc. I
would also welcome volunteers interested in packaging Orpie for various platforms.
%@% IF !LATEX && !ORPIERC %@%
\section{References}
\begin{Table}{2}
[1] & \URL{http://oandrieu.nerim.net/ocaml/gsl/} \\
[2] & \URL{http://www.nongnu.org/ocaml-tmk/}
[3] & \URL{http://www.gnu.org/software/gnu-arch/}.
\end{Table}
\section{See Also}
\Cmd{orpierc}{5}, \Cmd{orpie-curses-keys}{1}
%@% END-IF %@%
%@% END-IF %@%
% !ORPIERC
%@% IF !LATEX %@%
%@% IF ORPIERC %@%
\section{See Also}
\Cmd{orpie}{1}, \Cmd{orpie-curses-keys}{1}
\section{Author}
This manpage is written by Paul J. Pelzl <pelzlpj@gmail.com>.
%@% END-IF %@%
\LatexManEnd
%@% END-IF %@%
\end{document}
% arch-tag: DO_NOT_CHANGE_db7ed8b2-8ea4-4e32-b0f6-50482487cb00
|