diff options
| -rw-r--r-- | man/calc.texi | 440 |
1 files changed, 220 insertions, 220 deletions
diff --git a/man/calc.texi b/man/calc.texi index 16447e4e953..8dfa75c6ded 100644 --- a/man/calc.texi +++ b/man/calc.texi | |||
| @@ -463,7 +463,7 @@ Algebraic manipulation features, including symbolic calculus. | |||
| 463 | Moving data to and from regular editing buffers. | 463 | Moving data to and from regular editing buffers. |
| 464 | 464 | ||
| 465 | @item | 465 | @item |
| 466 | ``Embedded mode'' for manipulating Calc formulas and data directly | 466 | Embedded mode for manipulating Calc formulas and data directly |
| 467 | inside any editing buffer. | 467 | inside any editing buffer. |
| 468 | 468 | ||
| 469 | @item | 469 | @item |
| @@ -766,7 +766,7 @@ To exit from Calc, press @kbd{q} or @kbd{M-# c} again. | |||
| 766 | @noindent | 766 | @noindent |
| 767 | Calc has several user interfaces that are specialized for | 767 | Calc has several user interfaces that are specialized for |
| 768 | different kinds of tasks. As well as Calc's standard interface, | 768 | different kinds of tasks. As well as Calc's standard interface, |
| 769 | there are Quick Mode, Keypad Mode, and Embedded Mode. | 769 | there are Quick mode, Keypad mode, and Embedded mode. |
| 770 | 770 | ||
| 771 | @menu | 771 | @menu |
| 772 | * Starting Calc:: | 772 | * Starting Calc:: |
| @@ -801,7 +801,7 @@ doesn't matter for @kbd{M-#}) that says which Calc interface you | |||
| 801 | want to use. | 801 | want to use. |
| 802 | 802 | ||
| 803 | To get Calc's standard interface, type @kbd{M-# c}. To get | 803 | To get Calc's standard interface, type @kbd{M-# c}. To get |
| 804 | Keypad Mode, type @kbd{M-# k}. Type @kbd{M-# ?} to get a brief | 804 | Keypad mode, type @kbd{M-# k}. Type @kbd{M-# ?} to get a brief |
| 805 | list of the available options, and type a second @kbd{?} to get | 805 | list of the available options, and type a second @kbd{?} to get |
| 806 | a complete list. | 806 | a complete list. |
| 807 | 807 | ||
| @@ -814,7 +814,7 @@ function key twice is just like hitting @kbd{M-# M-#}.) | |||
| 814 | 814 | ||
| 815 | If @kbd{M-#} doesn't work for you, you can always type explicit | 815 | If @kbd{M-#} doesn't work for you, you can always type explicit |
| 816 | commands like @kbd{M-x calc} (for the standard user interface) or | 816 | commands like @kbd{M-x calc} (for the standard user interface) or |
| 817 | @w{@kbd{M-x calc-keypad}} (for Keypad Mode). First type @kbd{M-x} | 817 | @w{@kbd{M-x calc-keypad}} (for Keypad mode). First type @kbd{M-x} |
| 818 | (that's Meta with the letter @kbd{x}), then, at the prompt, | 818 | (that's Meta with the letter @kbd{x}), then, at the prompt, |
| 819 | type the full command (like @kbd{calc-keypad}) and press Return. | 819 | type the full command (like @kbd{calc-keypad}) and press Return. |
| 820 | 820 | ||
| @@ -917,11 +917,11 @@ way to switch out of Calc momentarily to edit your file; type | |||
| 917 | @subsection Quick Mode (Overview) | 917 | @subsection Quick Mode (Overview) |
| 918 | 918 | ||
| 919 | @noindent | 919 | @noindent |
| 920 | @dfn{Quick Mode} is a quick way to use Calc when you don't need the | 920 | @dfn{Quick mode} is a quick way to use Calc when you don't need the |
| 921 | full complexity of the stack and trail. To use it, type @kbd{M-# q} | 921 | full complexity of the stack and trail. To use it, type @kbd{M-# q} |
| 922 | (@code{quick-calc}) in any regular editing buffer. | 922 | (@code{quick-calc}) in any regular editing buffer. |
| 923 | 923 | ||
| 924 | Quick Mode is very simple: It prompts you to type any formula in | 924 | Quick mode is very simple: It prompts you to type any formula in |
| 925 | standard algebraic notation (like @samp{4 - 2/3}) and then displays | 925 | standard algebraic notation (like @samp{4 - 2/3}) and then displays |
| 926 | the result at the bottom of the Emacs screen (@mathit{3.33333333333} | 926 | the result at the bottom of the Emacs screen (@mathit{3.33333333333} |
| 927 | in this case). You are then back in the same editing buffer you | 927 | in this case). You are then back in the same editing buffer you |
| @@ -930,7 +930,7 @@ again to do another quick calculation. The result of the calculation | |||
| 930 | will also be in the Emacs ``kill ring'' so that a @kbd{C-y} command | 930 | will also be in the Emacs ``kill ring'' so that a @kbd{C-y} command |
| 931 | at this point will yank the result into your editing buffer. | 931 | at this point will yank the result into your editing buffer. |
| 932 | 932 | ||
| 933 | Calc mode settings affect Quick Mode, too, though you will have to | 933 | Calc mode settings affect Quick mode, too, though you will have to |
| 934 | go into regular Calc (with @kbd{M-# c}) to change the mode settings. | 934 | go into regular Calc (with @kbd{M-# c}) to change the mode settings. |
| 935 | 935 | ||
| 936 | @c [fix-ref Quick Calculator mode] | 936 | @c [fix-ref Quick Calculator mode] |
| @@ -940,12 +940,12 @@ go into regular Calc (with @kbd{M-# c}) to change the mode settings. | |||
| 940 | @subsection Keypad Mode (Overview) | 940 | @subsection Keypad Mode (Overview) |
| 941 | 941 | ||
| 942 | @noindent | 942 | @noindent |
| 943 | @dfn{Keypad Mode} is a mouse-based interface to the Calculator. | 943 | @dfn{Keypad mode} is a mouse-based interface to the Calculator. |
| 944 | It is designed for use with terminals that support a mouse. If you | 944 | It is designed for use with terminals that support a mouse. If you |
| 945 | don't have a mouse, you will have to operate keypad mode with your | 945 | don't have a mouse, you will have to operate Keypad mode with your |
| 946 | arrow keys (which is probably more trouble than it's worth). | 946 | arrow keys (which is probably more trouble than it's worth). |
| 947 | 947 | ||
| 948 | Type @kbd{M-# k} to turn Keypad Mode on or off. Once again you | 948 | Type @kbd{M-# k} to turn Keypad mode on or off. Once again you |
| 949 | get two new windows, this time on the righthand side of the screen | 949 | get two new windows, this time on the righthand side of the screen |
| 950 | instead of at the bottom. The upper window is the familiar Calc | 950 | instead of at the bottom. The upper window is the familiar Calc |
| 951 | Stack; the lower window is a picture of a typical calculator keypad. | 951 | Stack; the lower window is a picture of a typical calculator keypad. |
| @@ -981,12 +981,12 @@ Stack; the lower window is a picture of a typical calculator keypad. | |||
| 981 | |-----+-----+-----+-----+-----+ | 981 | |-----+-----+-----+-----+-----+ |
| 982 | @end smallexample | 982 | @end smallexample |
| 983 | 983 | ||
| 984 | Keypad Mode is much easier for beginners to learn, because there | 984 | Keypad mode is much easier for beginners to learn, because there |
| 985 | is no need to memorize lots of obscure key sequences. But not all | 985 | is no need to memorize lots of obscure key sequences. But not all |
| 986 | commands in regular Calc are available on the Keypad. You can | 986 | commands in regular Calc are available on the Keypad. You can |
| 987 | always switch the cursor into the Calc stack window to use | 987 | always switch the cursor into the Calc stack window to use |
| 988 | standard Calc commands if you need. Serious Calc users, though, | 988 | standard Calc commands if you need. Serious Calc users, though, |
| 989 | often find they prefer the standard interface over Keypad Mode. | 989 | often find they prefer the standard interface over Keypad mode. |
| 990 | 990 | ||
| 991 | To operate the Calculator, just click on the ``buttons'' of the | 991 | To operate the Calculator, just click on the ``buttons'' of the |
| 992 | keypad using your left mouse button. To enter the two numbers | 992 | keypad using your left mouse button. To enter the two numbers |
| @@ -999,13 +999,13 @@ keypad change to show other sets of commands, such as advanced | |||
| 999 | math functions, vector operations, and operations on binary | 999 | math functions, vector operations, and operations on binary |
| 1000 | numbers. | 1000 | numbers. |
| 1001 | 1001 | ||
| 1002 | Because Keypad Mode doesn't use the regular keyboard, Calc leaves | 1002 | Because Keypad mode doesn't use the regular keyboard, Calc leaves |
| 1003 | the cursor in your original editing buffer. You can type in | 1003 | the cursor in your original editing buffer. You can type in |
| 1004 | this buffer in the usual way while also clicking on the Calculator | 1004 | this buffer in the usual way while also clicking on the Calculator |
| 1005 | keypad. One advantage of Keypad Mode is that you don't need an | 1005 | keypad. One advantage of Keypad mode is that you don't need an |
| 1006 | explicit command to switch between editing and calculating. | 1006 | explicit command to switch between editing and calculating. |
| 1007 | 1007 | ||
| 1008 | If you press @kbd{M-# b} first, you get a full-screen Keypad Mode | 1008 | If you press @kbd{M-# b} first, you get a full-screen Keypad mode |
| 1009 | (@code{full-calc-keypad}) with three windows: The keypad in the lower | 1009 | (@code{full-calc-keypad}) with three windows: The keypad in the lower |
| 1010 | left, the stack in the lower right, and the trail on top. | 1010 | left, the stack in the lower right, and the trail on top. |
| 1011 | 1011 | ||
| @@ -1043,7 +1043,7 @@ itself. | |||
| 1043 | @subsection Embedded Mode (Overview) | 1043 | @subsection Embedded Mode (Overview) |
| 1044 | 1044 | ||
| 1045 | @noindent | 1045 | @noindent |
| 1046 | @dfn{Embedded Mode} is a way to use Calc directly from inside an | 1046 | @dfn{Embedded mode} is a way to use Calc directly from inside an |
| 1047 | editing buffer. Suppose you have a formula written as part of a | 1047 | editing buffer. Suppose you have a formula written as part of a |
| 1048 | document like this: | 1048 | document like this: |
| 1049 | 1049 | ||
| @@ -1060,7 +1060,7 @@ is | |||
| 1060 | @noindent | 1060 | @noindent |
| 1061 | and you wish to have Calc compute and format the derivative for | 1061 | and you wish to have Calc compute and format the derivative for |
| 1062 | you and store this derivative in the buffer automatically. To | 1062 | you and store this derivative in the buffer automatically. To |
| 1063 | do this with Embedded Mode, first copy the formula down to where | 1063 | do this with Embedded mode, first copy the formula down to where |
| 1064 | you want the result to be: | 1064 | you want the result to be: |
| 1065 | 1065 | ||
| 1066 | @smallexample | 1066 | @smallexample |
| @@ -1099,7 +1099,7 @@ is | |||
| 1099 | @end smallexample | 1099 | @end smallexample |
| 1100 | 1100 | ||
| 1101 | To make this look nicer, you might want to press @kbd{d =} to center | 1101 | To make this look nicer, you might want to press @kbd{d =} to center |
| 1102 | the formula, and even @kbd{d B} to use ``big'' display mode. | 1102 | the formula, and even @kbd{d B} to use Big display mode. |
| 1103 | 1103 | ||
| 1104 | @smallexample | 1104 | @smallexample |
| 1105 | @group | 1105 | @group |
| @@ -1139,7 +1139,7 @@ righthand label: Type @kbd{d @} (1) @key{RET}}. | |||
| 1139 | @end group | 1139 | @end group |
| 1140 | @end smallexample | 1140 | @end smallexample |
| 1141 | 1141 | ||
| 1142 | To leave Embedded Mode, type @kbd{M-# e} again. The mode line | 1142 | To leave Embedded mode, type @kbd{M-# e} again. The mode line |
| 1143 | and keyboard will revert to the way they were before. (If you have | 1143 | and keyboard will revert to the way they were before. (If you have |
| 1144 | actually been trying this as you read along, you'll want to press | 1144 | actually been trying this as you read along, you'll want to press |
| 1145 | @kbd{M-# 0} [with the digit zero] now to reset the modes you changed.) | 1145 | @kbd{M-# 0} [with the digit zero] now to reset the modes you changed.) |
| @@ -1154,7 +1154,7 @@ A slope of one-third corresponds to an angle of 1 degrees. | |||
| 1154 | @end smallexample | 1154 | @end smallexample |
| 1155 | 1155 | ||
| 1156 | Place the cursor on the @samp{1}, then type @kbd{M-# w} to enable | 1156 | Place the cursor on the @samp{1}, then type @kbd{M-# w} to enable |
| 1157 | Embedded Mode on that number. Now type @kbd{3 /} (to get one-third), | 1157 | Embedded mode on that number. Now type @kbd{3 /} (to get one-third), |
| 1158 | and @kbd{I T} (the Inverse Tangent converts a slope into an angle), | 1158 | and @kbd{I T} (the Inverse Tangent converts a slope into an angle), |
| 1159 | then @w{@kbd{M-# w}} again to exit Embedded mode. | 1159 | then @w{@kbd{M-# w}} again to exit Embedded mode. |
| 1160 | 1160 | ||
| @@ -1221,7 +1221,7 @@ move it out of that window. | |||
| 1221 | Control whether @kbd{M-# c} and @kbd{M-# k} use the full screen. | 1221 | Control whether @kbd{M-# c} and @kbd{M-# k} use the full screen. |
| 1222 | 1222 | ||
| 1223 | @item Q | 1223 | @item Q |
| 1224 | Use Quick Mode for a single short calculation. | 1224 | Use Quick mode for a single short calculation. |
| 1225 | 1225 | ||
| 1226 | @item K | 1226 | @item K |
| 1227 | Turn Calc Keypad mode on or off. | 1227 | Turn Calc Keypad mode on or off. |
| @@ -1270,7 +1270,7 @@ Yank a value from the Calculator into the current editing buffer. | |||
| 1270 | @end iftex | 1270 | @end iftex |
| 1271 | 1271 | ||
| 1272 | @noindent | 1272 | @noindent |
| 1273 | Commands for use with Embedded Mode: | 1273 | Commands for use with Embedded mode: |
| 1274 | 1274 | ||
| 1275 | @table @kbd | 1275 | @table @kbd |
| 1276 | @item A | 1276 | @item A |
| @@ -1478,9 +1478,9 @@ to skip on to the rest of this manual. | |||
| 1478 | 1478 | ||
| 1479 | @c [fix-ref Embedded Mode] | 1479 | @c [fix-ref Embedded Mode] |
| 1480 | This tutorial describes the standard user interface of Calc only. | 1480 | This tutorial describes the standard user interface of Calc only. |
| 1481 | The ``Quick Mode'' and ``Keypad Mode'' interfaces are fairly | 1481 | The Quick mode and Keypad mode interfaces are fairly |
| 1482 | self-explanatory. @xref{Embedded Mode}, for a description of | 1482 | self-explanatory. @xref{Embedded Mode}, for a description of |
| 1483 | the ``Embedded Mode'' interface. | 1483 | the Embedded mode interface. |
| 1484 | 1484 | ||
| 1485 | @ifinfo | 1485 | @ifinfo |
| 1486 | The easiest way to read this tutorial on-line is to have two windows on | 1486 | The easiest way to read this tutorial on-line is to have two windows on |
| @@ -1940,8 +1940,8 @@ entire stack.) | |||
| 1940 | 1940 | ||
| 1941 | @noindent | 1941 | @noindent |
| 1942 | If you are not used to RPN notation, you may prefer to operate the | 1942 | If you are not used to RPN notation, you may prefer to operate the |
| 1943 | Calculator in ``algebraic mode,'' which is closer to the way | 1943 | Calculator in Algebraic mode, which is closer to the way |
| 1944 | non-RPN calculators work. In algebraic mode, you enter formulas | 1944 | non-RPN calculators work. In Algebraic mode, you enter formulas |
| 1945 | in traditional @expr{2+3} notation. | 1945 | in traditional @expr{2+3} notation. |
| 1946 | 1946 | ||
| 1947 | You don't really need any special ``mode'' to enter algebraic formulas. | 1947 | You don't really need any special ``mode'' to enter algebraic formulas. |
| @@ -2005,15 +2005,15 @@ that @samp{^} is evaluated from right to left. Thus, @samp{2-3-4} is | |||
| 2005 | equivalent to @samp{(2-3)-4} or @mathit{-5}, whereas @samp{2^3^4} is equivalent | 2005 | equivalent to @samp{(2-3)-4} or @mathit{-5}, whereas @samp{2^3^4} is equivalent |
| 2006 | to @samp{2^(3^4)} (a very large integer; try it!). | 2006 | to @samp{2^(3^4)} (a very large integer; try it!). |
| 2007 | 2007 | ||
| 2008 | If you tire of typing the apostrophe all the time, there is an | 2008 | If you tire of typing the apostrophe all the time, there is |
| 2009 | ``algebraic mode'' you can select in which Calc automatically senses | 2009 | Algebraic mode, where Calc automatically senses |
| 2010 | when you are about to type an algebraic expression. To enter this | 2010 | when you are about to type an algebraic expression. To enter this |
| 2011 | mode, press the two letters @w{@kbd{m a}}. (An @samp{Alg} indicator | 2011 | mode, press the two letters @w{@kbd{m a}}. (An @samp{Alg} indicator |
| 2012 | should appear in the Calc window's mode line.) | 2012 | should appear in the Calc window's mode line.) |
| 2013 | 2013 | ||
| 2014 | Press @kbd{m a}, then @kbd{2+3+4} with no apostrophe, then @key{RET}. | 2014 | Press @kbd{m a}, then @kbd{2+3+4} with no apostrophe, then @key{RET}. |
| 2015 | 2015 | ||
| 2016 | In algebraic mode, when you press any key that would normally begin | 2016 | In Algebraic mode, when you press any key that would normally begin |
| 2017 | entering a number (such as a digit, a decimal point, or the @kbd{_} | 2017 | entering a number (such as a digit, a decimal point, or the @kbd{_} |
| 2018 | key), or if you press @kbd{(} or @kbd{[}, Calc automatically begins | 2018 | key), or if you press @kbd{(} or @kbd{[}, Calc automatically begins |
| 2019 | an algebraic entry. | 2019 | an algebraic entry. |
| @@ -2028,7 +2028,7 @@ Press the apostrophe, then type @kbd{sqrt(5*2) - 3}. The result should | |||
| 2028 | be @expr{0.16227766017}. | 2028 | be @expr{0.16227766017}. |
| 2029 | 2029 | ||
| 2030 | Note that if the formula begins with a function name, you need to use | 2030 | Note that if the formula begins with a function name, you need to use |
| 2031 | the apostrophe even if you are in algebraic mode. If you type @kbd{arcsin} | 2031 | the apostrophe even if you are in Algebraic mode. If you type @kbd{arcsin} |
| 2032 | out of the blue, the @kbd{a r} will be taken as an Algebraic Rewrite | 2032 | out of the blue, the @kbd{a r} will be taken as an Algebraic Rewrite |
| 2033 | command, and the @kbd{csin} will be taken as the name of the rewrite | 2033 | command, and the @kbd{csin} will be taken as the name of the rewrite |
| 2034 | rule to use! | 2034 | rule to use! |
| @@ -2037,7 +2037,7 @@ Some people prefer to enter complex numbers and vectors in algebraic | |||
| 2037 | form because they find RPN entry with incomplete objects to be too | 2037 | form because they find RPN entry with incomplete objects to be too |
| 2038 | distracting, even though they otherwise use Calc as an RPN calculator. | 2038 | distracting, even though they otherwise use Calc as an RPN calculator. |
| 2039 | 2039 | ||
| 2040 | Still in algebraic mode, type: | 2040 | Still in Algebraic mode, type: |
| 2041 | 2041 | ||
| 2042 | @smallexample | 2042 | @smallexample |
| 2043 | @group | 2043 | @group |
| @@ -2053,15 +2053,15 @@ Algebraic mode allows us to enter complex numbers without pressing | |||
| 2053 | an apostrophe first, but it also means we need to press @key{RET} | 2053 | an apostrophe first, but it also means we need to press @key{RET} |
| 2054 | after every entry, even for a simple number like @expr{1}. | 2054 | after every entry, even for a simple number like @expr{1}. |
| 2055 | 2055 | ||
| 2056 | (You can type @kbd{C-u m a} to enable a special ``incomplete algebraic | 2056 | (You can type @kbd{C-u m a} to enable a special Incomplete Algebraic |
| 2057 | mode'' in which the @kbd{(} and @kbd{[} keys use algebraic entry even | 2057 | mode in which the @kbd{(} and @kbd{[} keys use algebraic entry even |
| 2058 | though regular numeric keys still use RPN numeric entry. There is also | 2058 | though regular numeric keys still use RPN numeric entry. There is also |
| 2059 | a ``total algebraic mode,'' started by typing @kbd{m t}, in which all | 2059 | Total Algebraic mode, started by typing @kbd{m t}, in which all |
| 2060 | normal keys begin algebraic entry. You must then use the @key{META} key | 2060 | normal keys begin algebraic entry. You must then use the @key{META} key |
| 2061 | to type Calc commands: @kbd{M-m t} to get back out of total algebraic | 2061 | to type Calc commands: @kbd{M-m t} to get back out of Total Algebraic |
| 2062 | mode, @kbd{M-q} to quit, etc.) | 2062 | mode, @kbd{M-q} to quit, etc.) |
| 2063 | 2063 | ||
| 2064 | If you're still in algebraic mode, press @kbd{m a} again to turn it off. | 2064 | If you're still in Algebraic mode, press @kbd{m a} again to turn it off. |
| 2065 | 2065 | ||
| 2066 | Actual non-RPN calculators use a mixture of algebraic and RPN styles. | 2066 | Actual non-RPN calculators use a mixture of algebraic and RPN styles. |
| 2067 | In general, operators of two numbers (like @kbd{+} and @kbd{*}) | 2067 | In general, operators of two numbers (like @kbd{+} and @kbd{*}) |
| @@ -2376,7 +2376,7 @@ during entry of a number or algebraic formula. | |||
| 2376 | @noindent | 2376 | @noindent |
| 2377 | Calc has many types of @dfn{modes} that affect the way it interprets | 2377 | Calc has many types of @dfn{modes} that affect the way it interprets |
| 2378 | your commands or the way it displays data. We have already seen one | 2378 | your commands or the way it displays data. We have already seen one |
| 2379 | mode, namely algebraic mode. There are many others, too; we'll | 2379 | mode, namely Algebraic mode. There are many others, too; we'll |
| 2380 | try some of the most common ones here. | 2380 | try some of the most common ones here. |
| 2381 | 2381 | ||
| 2382 | Perhaps the most fundamental mode in Calc is the current @dfn{precision}. | 2382 | Perhaps the most fundamental mode in Calc is the current @dfn{precision}. |
| @@ -2795,7 +2795,7 @@ and vice-versa. | |||
| 2795 | @end group | 2795 | @end group |
| 2796 | @end smallexample | 2796 | @end smallexample |
| 2797 | 2797 | ||
| 2798 | Another interesting mode is @dfn{fraction mode}. Normally, | 2798 | Another interesting mode is @dfn{Fraction mode}. Normally, |
| 2799 | dividing two integers produces a floating-point result if the | 2799 | dividing two integers produces a floating-point result if the |
| 2800 | quotient can't be expressed as an exact integer. Fraction mode | 2800 | quotient can't be expressed as an exact integer. Fraction mode |
| 2801 | causes integer division to produce a fraction, i.e., a rational | 2801 | causes integer division to produce a fraction, i.e., a rational |
| @@ -2819,7 +2819,7 @@ You can enter a fraction at any time using @kbd{:} notation. | |||
| 2819 | (Calc uses @kbd{:} instead of @kbd{/} as the fraction separator | 2819 | (Calc uses @kbd{:} instead of @kbd{/} as the fraction separator |
| 2820 | because @kbd{/} is already used to divide the top two stack | 2820 | because @kbd{/} is already used to divide the top two stack |
| 2821 | elements.) Calculations involving fractions will always | 2821 | elements.) Calculations involving fractions will always |
| 2822 | produce exact fractional results; fraction mode only says | 2822 | produce exact fractional results; Fraction mode only says |
| 2823 | what to do when dividing two integers. | 2823 | what to do when dividing two integers. |
| 2824 | 2824 | ||
| 2825 | @cindex Fractions vs. floats | 2825 | @cindex Fractions vs. floats |
| @@ -2830,7 +2830,7 @@ why would you ever use floating-point numbers instead? | |||
| 2830 | 2830 | ||
| 2831 | Typing @kbd{m f} doesn't change any existing values in the stack. | 2831 | Typing @kbd{m f} doesn't change any existing values in the stack. |
| 2832 | In the above example, we had to Undo the division and do it over | 2832 | In the above example, we had to Undo the division and do it over |
| 2833 | again when we changed to fraction mode. But if you use the | 2833 | again when we changed to Fraction mode. But if you use the |
| 2834 | evaluates-to operator you can get commands like @kbd{m f} to | 2834 | evaluates-to operator you can get commands like @kbd{m f} to |
| 2835 | recompute for you. | 2835 | recompute for you. |
| 2836 | 2836 | ||
| @@ -2846,7 +2846,7 @@ recompute for you. | |||
| 2846 | @noindent | 2846 | @noindent |
| 2847 | In this example, the righthand side of the @samp{=>} operator | 2847 | In this example, the righthand side of the @samp{=>} operator |
| 2848 | on the stack is recomputed when we change the precision, then | 2848 | on the stack is recomputed when we change the precision, then |
| 2849 | again when we change to fraction mode. All @samp{=>} expressions | 2849 | again when we change to Fraction mode. All @samp{=>} expressions |
| 2850 | on the stack are recomputed every time you change any mode that | 2850 | on the stack are recomputed every time you change any mode that |
| 2851 | might affect their values. | 2851 | might affect their values. |
| 2852 | 2852 | ||
| @@ -4530,7 +4530,7 @@ with the symbol @code{nan} (for Not A Number). | |||
| 4530 | 4530 | ||
| 4531 | Dividing by zero is normally treated as an error, but you can get | 4531 | Dividing by zero is normally treated as an error, but you can get |
| 4532 | Calc to write an answer in terms of infinity by pressing @kbd{m i} | 4532 | Calc to write an answer in terms of infinity by pressing @kbd{m i} |
| 4533 | to turn on ``infinite mode.'' | 4533 | to turn on Infinite mode. |
| 4534 | 4534 | ||
| 4535 | @smallexample | 4535 | @smallexample |
| 4536 | @group | 4536 | @group |
| @@ -4960,7 +4960,7 @@ formulas. | |||
| 4960 | @subsection Basic Algebra | 4960 | @subsection Basic Algebra |
| 4961 | 4961 | ||
| 4962 | @noindent | 4962 | @noindent |
| 4963 | If you enter a formula in algebraic mode that refers to variables, | 4963 | If you enter a formula in Algebraic mode that refers to variables, |
| 4964 | the formula itself is pushed onto the stack. You can manipulate | 4964 | the formula itself is pushed onto the stack. You can manipulate |
| 4965 | formulas as regular data objects. | 4965 | formulas as regular data objects. |
| 4966 | 4966 | ||
| @@ -5181,7 +5181,7 @@ polynomial? (The answer will be unique to within a constant | |||
| 5181 | multiple; choose the solution where the leading coefficient is one.) | 5181 | multiple; choose the solution where the leading coefficient is one.) |
| 5182 | @xref{Algebra Answer 2, 2}. (@bullet{}) | 5182 | @xref{Algebra Answer 2, 2}. (@bullet{}) |
| 5183 | 5183 | ||
| 5184 | The @kbd{m s} command enables ``symbolic mode,'' in which formulas | 5184 | The @kbd{m s} command enables Symbolic mode, in which formulas |
| 5185 | like @samp{sqrt(5)} that can't be evaluated exactly are left in | 5185 | like @samp{sqrt(5)} that can't be evaluated exactly are left in |
| 5186 | symbolic form rather than giving a floating-point approximate answer. | 5186 | symbolic form rather than giving a floating-point approximate answer. |
| 5187 | Fraction mode (@kbd{m f}) is also useful when doing algebra. | 5187 | Fraction mode (@kbd{m f}) is also useful when doing algebra. |
| @@ -5196,7 +5196,7 @@ Fraction mode (@kbd{m f}) is also useful when doing algebra. | |||
| 5196 | @end group | 5196 | @end group |
| 5197 | @end smallexample | 5197 | @end smallexample |
| 5198 | 5198 | ||
| 5199 | One more mode that makes reading formulas easier is ``Big mode.'' | 5199 | One more mode that makes reading formulas easier is Big mode. |
| 5200 | 5200 | ||
| 5201 | @smallexample | 5201 | @smallexample |
| 5202 | @group | 5202 | @group |
| @@ -5344,7 +5344,7 @@ also have used plain @kbd{v x} as follows: @kbd{v x 10 @key{RET} 9 + .1 *}.) | |||
| 5344 | 5344 | ||
| 5345 | @noindent | 5345 | @noindent |
| 5346 | (If you got wildly different results, did you remember to switch | 5346 | (If you got wildly different results, did you remember to switch |
| 5347 | to radians mode?) | 5347 | to Radians mode?) |
| 5348 | 5348 | ||
| 5349 | Here we have divided the curve into ten segments of equal width; | 5349 | Here we have divided the curve into ten segments of equal width; |
| 5350 | approximating these segments as rectangular boxes (i.e., assuming | 5350 | approximating these segments as rectangular boxes (i.e., assuming |
| @@ -5600,7 +5600,7 @@ only once and stores the compiled form along with the variable. That's | |||
| 5600 | another good reason to store your rules in variables rather than | 5600 | another good reason to store your rules in variables rather than |
| 5601 | entering them on the fly. | 5601 | entering them on the fly. |
| 5602 | 5602 | ||
| 5603 | (@bullet{}) @strong{Exercise 1.} Type @kbd{m s} to get symbolic | 5603 | (@bullet{}) @strong{Exercise 1.} Type @kbd{m s} to get Symbolic |
| 5604 | mode, then enter the formula @samp{@w{(2 + sqrt(2))} / @w{(1 + sqrt(2))}}. | 5604 | mode, then enter the formula @samp{@w{(2 + sqrt(2))} / @w{(1 + sqrt(2))}}. |
| 5605 | Using a rewrite rule, simplify this formula by multiplying both | 5605 | Using a rewrite rule, simplify this formula by multiplying both |
| 5606 | sides by the conjugate @w{@samp{1 - sqrt(2)}}. The result will have | 5606 | sides by the conjugate @w{@samp{1 - sqrt(2)}}. The result will have |
| @@ -5859,11 +5859,11 @@ so that @expr{2 - 3 (x + y) + x y} is a sum of three terms.) | |||
| 5859 | @xref{Rewrites Answer 5, 5}. (@bullet{}) | 5859 | @xref{Rewrites Answer 5, 5}. (@bullet{}) |
| 5860 | 5860 | ||
| 5861 | (@bullet{}) @strong{Exercise 6.} Calc considers the form @expr{0^0} | 5861 | (@bullet{}) @strong{Exercise 6.} Calc considers the form @expr{0^0} |
| 5862 | to be ``indeterminate,'' and leaves it unevaluated (assuming infinite | 5862 | to be ``indeterminate,'' and leaves it unevaluated (assuming Infinite |
| 5863 | mode is not enabled). Some people prefer to define @expr{0^0 = 1}, | 5863 | mode is not enabled). Some people prefer to define @expr{0^0 = 1}, |
| 5864 | so that the identity @expr{x^0 = 1} can safely be used for all @expr{x}. | 5864 | so that the identity @expr{x^0 = 1} can safely be used for all @expr{x}. |
| 5865 | Find a way to make Calc follow this convention. What happens if you | 5865 | Find a way to make Calc follow this convention. What happens if you |
| 5866 | now type @kbd{m i} to turn on infinite mode? | 5866 | now type @kbd{m i} to turn on Infinite mode? |
| 5867 | @xref{Rewrites Answer 6, 6}. (@bullet{}) | 5867 | @xref{Rewrites Answer 6, 6}. (@bullet{}) |
| 5868 | 5868 | ||
| 5869 | (@bullet{}) @strong{Exercise 7.} A Taylor series for a function is an | 5869 | (@bullet{}) @strong{Exercise 7.} A Taylor series for a function is an |
| @@ -6838,7 +6838,7 @@ the result will be zero because Calc uses the general rule that ``zero | |||
| 6838 | times anything is zero.'' | 6838 | times anything is zero.'' |
| 6839 | 6839 | ||
| 6840 | @c [fix-ref Infinities] | 6840 | @c [fix-ref Infinities] |
| 6841 | The @kbd{m i} command enables an @dfn{infinite mode} in which @expr{1 / 0} | 6841 | The @kbd{m i} command enables an @dfn{Infinite mode} in which @expr{1 / 0} |
| 6842 | results in a special symbol that represents ``infinity.'' If you | 6842 | results in a special symbol that represents ``infinity.'' If you |
| 6843 | multiply infinity by zero, Calc uses another special new symbol to | 6843 | multiply infinity by zero, Calc uses another special new symbol to |
| 6844 | show that the answer is ``indeterminate.'' @xref{Infinities}, for | 6844 | show that the answer is ``indeterminate.'' @xref{Infinities}, for |
| @@ -7002,7 +7002,7 @@ The result, when converted to an integer, will be off by 106. | |||
| 7002 | 7002 | ||
| 7003 | Here are two solutions: Raise the precision enough that the | 7003 | Here are two solutions: Raise the precision enough that the |
| 7004 | floating-point round-off error is strictly to the right of the | 7004 | floating-point round-off error is strictly to the right of the |
| 7005 | decimal point. Or, convert to fraction mode so that @expr{123456789 / 2} | 7005 | decimal point. Or, convert to Fraction mode so that @expr{123456789 / 2} |
| 7006 | produces the exact fraction @expr{123456789:2}, which can be rounded | 7006 | produces the exact fraction @expr{123456789:2}, which can be rounded |
| 7007 | down by the @kbd{F} command without ever switching to floating-point | 7007 | down by the @kbd{F} command without ever switching to floating-point |
| 7008 | format. | 7008 | format. |
| @@ -7015,9 +7015,9 @@ format. | |||
| 7015 | does a floating-point calculation instead and produces @expr{1.5}. | 7015 | does a floating-point calculation instead and produces @expr{1.5}. |
| 7016 | 7016 | ||
| 7017 | Calc will find an exact result for a logarithm if the result is an integer | 7017 | Calc will find an exact result for a logarithm if the result is an integer |
| 7018 | or the reciprocal of an integer. But there is no efficient way to search | 7018 | or (when in Fraction mode) the reciprocal of an integer. But there is |
| 7019 | the space of all possible rational numbers for an exact answer, so Calc | 7019 | no efficient way to search the space of all possible rational numbers |
| 7020 | doesn't try. | 7020 | for an exact answer, so Calc doesn't try. |
| 7021 | 7021 | ||
| 7022 | @node Vector Answer 1, Vector Answer 2, Arithmetic Answer 2, Answers to Exercises | 7022 | @node Vector Answer 1, Vector Answer 2, Arithmetic Answer 2, Answers to Exercises |
| 7023 | @subsection Vector Tutorial Exercise 1 | 7023 | @subsection Vector Tutorial Exercise 1 |
| @@ -7089,7 +7089,7 @@ matrix as usual. | |||
| 7089 | @end group | 7089 | @end group |
| 7090 | @end smallexample | 7090 | @end smallexample |
| 7091 | 7091 | ||
| 7092 | This can be made more readable using @kbd{d B} to enable ``big'' display | 7092 | This can be made more readable using @kbd{d B} to enable Big display |
| 7093 | mode: | 7093 | mode: |
| 7094 | 7094 | ||
| 7095 | @smallexample | 7095 | @smallexample |
| @@ -7100,7 +7100,7 @@ mode: | |||
| 7100 | @end group | 7100 | @end group |
| 7101 | @end smallexample | 7101 | @end smallexample |
| 7102 | 7102 | ||
| 7103 | Type @kbd{d N} to return to ``normal'' display mode afterwards. | 7103 | Type @kbd{d N} to return to Normal display mode afterwards. |
| 7104 | 7104 | ||
| 7105 | @node Matrix Answer 3, List Answer 1, Matrix Answer 2, Answers to Exercises | 7105 | @node Matrix Answer 3, List Answer 1, Matrix Answer 2, Answers to Exercises |
| 7106 | @subsection Matrix Tutorial Exercise 3 | 7106 | @subsection Matrix Tutorial Exercise 3 |
| @@ -8247,7 +8247,7 @@ so it settles for the conservative answer @code{uinf}. | |||
| 8247 | 8247 | ||
| 8248 | @samp{ln(0) = -inf}. Here we have an infinite answer to a finite | 8248 | @samp{ln(0) = -inf}. Here we have an infinite answer to a finite |
| 8249 | input. As in the @expr{1 / 0} case, Calc will only use infinities | 8249 | input. As in the @expr{1 / 0} case, Calc will only use infinities |
| 8250 | here if you have turned on ``infinite'' mode. Otherwise, it will | 8250 | here if you have turned on Infinite mode. Otherwise, it will |
| 8251 | treat @samp{ln(0)} as an error. | 8251 | treat @samp{ln(0)} as an error. |
| 8252 | 8252 | ||
| 8253 | @node Types Answer 3, Types Answer 4, Types Answer 2, Answers to Exercises | 8253 | @node Types Answer 3, Types Answer 4, Types Answer 2, Answers to Exercises |
| @@ -8461,7 +8461,7 @@ Calc normally treats division by zero as an error, so that the formula | |||
| 8461 | @w{@samp{1 / [0 .. 10]}}, also (potentially) divides by zero because zero | 8461 | @w{@samp{1 / [0 .. 10]}}, also (potentially) divides by zero because zero |
| 8462 | is now a member of the interval. So Calc leaves this one unevaluated, too. | 8462 | is now a member of the interval. So Calc leaves this one unevaluated, too. |
| 8463 | 8463 | ||
| 8464 | If you turn on ``infinite'' mode by pressing @kbd{m i}, you will | 8464 | If you turn on Infinite mode by pressing @kbd{m i}, you will |
| 8465 | instead get the answer @samp{[0.1 .. inf]}, which includes infinity | 8465 | instead get the answer @samp{[0.1 .. inf]}, which includes infinity |
| 8466 | as a possible value. | 8466 | as a possible value. |
| 8467 | 8467 | ||
| @@ -9124,7 +9124,7 @@ But then: | |||
| 9124 | @end group | 9124 | @end group |
| 9125 | @end smallexample | 9125 | @end smallexample |
| 9126 | 9126 | ||
| 9127 | Perhaps more surprisingly, this rule still works with infinite mode | 9127 | Perhaps more surprisingly, this rule still works with Infinite mode |
| 9128 | turned on. Calc tries @code{EvalRules} before any built-in rules for | 9128 | turned on. Calc tries @code{EvalRules} before any built-in rules for |
| 9129 | a function. This allows you to override the default behavior of any | 9129 | a function. This allows you to override the default behavior of any |
| 9130 | Calc feature: Even though Calc now wants to evaluate @expr{0^0} to | 9130 | Calc feature: Even though Calc now wants to evaluate @expr{0^0} to |
| @@ -9889,10 +9889,10 @@ By default this creates a pair of small windows, @samp{*Calculator*} | |||
| 9889 | and @samp{*Calc Trail*}. The former displays the contents of the | 9889 | and @samp{*Calc Trail*}. The former displays the contents of the |
| 9890 | Calculator stack and is manipulated exclusively through Calc commands. | 9890 | Calculator stack and is manipulated exclusively through Calc commands. |
| 9891 | It is possible (though not usually necessary) to create several Calc | 9891 | It is possible (though not usually necessary) to create several Calc |
| 9892 | Mode buffers each of which has an independent stack, undo list, and | 9892 | mode buffers each of which has an independent stack, undo list, and |
| 9893 | mode settings. There is exactly one Calc Trail buffer; it records a | 9893 | mode settings. There is exactly one Calc Trail buffer; it records a |
| 9894 | list of the results of all calculations that have been done. The | 9894 | list of the results of all calculations that have been done. The |
| 9895 | Calc Trail buffer uses a variant of Calc Mode, so Calculator commands | 9895 | Calc Trail buffer uses a variant of Calc mode, so Calculator commands |
| 9896 | still work when the trail buffer's window is selected. It is possible | 9896 | still work when the trail buffer's window is selected. It is possible |
| 9897 | to turn the trail window off, but the @samp{*Calc Trail*} buffer itself | 9897 | to turn the trail window off, but the @samp{*Calc Trail*} buffer itself |
| 9898 | still exists and is updated silently. @xref{Trail Commands}. | 9898 | still exists and is updated silently. @xref{Trail Commands}. |
| @@ -9906,7 +9906,7 @@ still exists and is updated silently. @xref{Trail Commands}. | |||
| 9906 | In most installations, the @kbd{M-# c} key sequence is a more | 9906 | In most installations, the @kbd{M-# c} key sequence is a more |
| 9907 | convenient way to start the Calculator. Also, @kbd{M-# M-#} and | 9907 | convenient way to start the Calculator. Also, @kbd{M-# M-#} and |
| 9908 | @kbd{M-# #} are synonyms for @kbd{M-# c} unless you last used Calc | 9908 | @kbd{M-# #} are synonyms for @kbd{M-# c} unless you last used Calc |
| 9909 | in its ``keypad'' mode. | 9909 | in its Keypad mode. |
| 9910 | 9910 | ||
| 9911 | @kindex x | 9911 | @kindex x |
| 9912 | @kindex M-x | 9912 | @kindex M-x |
| @@ -9978,7 +9978,7 @@ the keys with the mouse to operate the calculator. @xref{Keypad Mode}. | |||
| 9978 | @pindex calc-quit | 9978 | @pindex calc-quit |
| 9979 | @cindex Quitting the Calculator | 9979 | @cindex Quitting the Calculator |
| 9980 | @cindex Exiting the Calculator | 9980 | @cindex Exiting the Calculator |
| 9981 | The @kbd{q} key (@code{calc-quit}) exits Calc Mode and closes the | 9981 | The @kbd{q} key (@code{calc-quit}) exits Calc mode and closes the |
| 9982 | Calculator's window(s). It does not delete the Calculator buffers. | 9982 | Calculator's window(s). It does not delete the Calculator buffers. |
| 9983 | If you type @kbd{M-x calc} again, the Calculator will reappear with the | 9983 | If you type @kbd{M-x calc} again, the Calculator will reappear with the |
| 9984 | contents of the stack intact. Typing @kbd{M-# c} or @kbd{M-# M-#} | 9984 | contents of the stack intact. Typing @kbd{M-# c} or @kbd{M-# M-#} |
| @@ -10278,7 +10278,7 @@ expressions in this way. You may want to use @key{DEL} every so often to | |||
| 10278 | clear previous results off the stack. | 10278 | clear previous results off the stack. |
| 10279 | 10279 | ||
| 10280 | You can press the apostrophe key during normal numeric entry to switch | 10280 | You can press the apostrophe key during normal numeric entry to switch |
| 10281 | the half-entered number into algebraic entry mode. One reason to do this | 10281 | the half-entered number into Algebraic entry mode. One reason to do this |
| 10282 | would be to use the full Emacs cursor motion and editing keys, which are | 10282 | would be to use the full Emacs cursor motion and editing keys, which are |
| 10283 | available during algebraic entry but not during numeric entry. | 10283 | available during algebraic entry but not during numeric entry. |
| 10284 | 10284 | ||
| @@ -10289,7 +10289,7 @@ you complete your half-finished entry in a separate buffer. | |||
| 10289 | 10289 | ||
| 10290 | @kindex m a | 10290 | @kindex m a |
| 10291 | @pindex calc-algebraic-mode | 10291 | @pindex calc-algebraic-mode |
| 10292 | @cindex Algebraic mode | 10292 | @cindex Algebraic Mode |
| 10293 | If you prefer algebraic entry, you can use the command @kbd{m a} | 10293 | If you prefer algebraic entry, you can use the command @kbd{m a} |
| 10294 | (@code{calc-algebraic-mode}) to set Algebraic mode. In this mode, | 10294 | (@code{calc-algebraic-mode}) to set Algebraic mode. In this mode, |
| 10295 | digits and other keys that would normally start numeric entry instead | 10295 | digits and other keys that would normally start numeric entry instead |
| @@ -10300,7 +10300,7 @@ but you will have to press @key{RET} to terminate every number: | |||
| 10300 | @kbd{2 @key{RET} 3 @key{RET} * 4 @key{RET} +} would accomplish the same | 10300 | @kbd{2 @key{RET} 3 @key{RET} * 4 @key{RET} +} would accomplish the same |
| 10301 | thing as @kbd{2*3+4 @key{RET}}. | 10301 | thing as @kbd{2*3+4 @key{RET}}. |
| 10302 | 10302 | ||
| 10303 | @cindex Incomplete algebraic mode | 10303 | @cindex Incomplete Algebraic Mode |
| 10304 | If you give a numeric prefix argument like @kbd{C-u} to the @kbd{m a} | 10304 | If you give a numeric prefix argument like @kbd{C-u} to the @kbd{m a} |
| 10305 | command, it enables Incomplete Algebraic mode; this is like regular | 10305 | command, it enables Incomplete Algebraic mode; this is like regular |
| 10306 | Algebraic mode except that it applies to the @kbd{(} and @kbd{[} keys | 10306 | Algebraic mode except that it applies to the @kbd{(} and @kbd{[} keys |
| @@ -10308,15 +10308,15 @@ only. Numeric keys still begin a numeric entry in this mode. | |||
| 10308 | 10308 | ||
| 10309 | @kindex m t | 10309 | @kindex m t |
| 10310 | @pindex calc-total-algebraic-mode | 10310 | @pindex calc-total-algebraic-mode |
| 10311 | @cindex Total algebraic mode | 10311 | @cindex Total Algebraic Mode |
| 10312 | The @kbd{m t} (@code{calc-total-algebraic-mode}) gives you an even | 10312 | The @kbd{m t} (@code{calc-total-algebraic-mode}) gives you an even |
| 10313 | stronger algebraic-entry mode, in which @emph{all} regular letter and | 10313 | stronger algebraic-entry mode, in which @emph{all} regular letter and |
| 10314 | punctuation keys begin algebraic entry. Use this if you prefer typing | 10314 | punctuation keys begin algebraic entry. Use this if you prefer typing |
| 10315 | @w{@kbd{sqrt( )}} instead of @kbd{Q}, @w{@kbd{factor( )}} instead of | 10315 | @w{@kbd{sqrt( )}} instead of @kbd{Q}, @w{@kbd{factor( )}} instead of |
| 10316 | @kbd{a f}, and so on. To type regular Calc commands when you are in | 10316 | @kbd{a f}, and so on. To type regular Calc commands when you are in |
| 10317 | ``total'' algebraic mode, hold down the @key{META} key. Thus @kbd{M-q} | 10317 | Total Algebraic mode, hold down the @key{META} key. Thus @kbd{M-q} |
| 10318 | is the command to quit Calc, @kbd{M-p} sets the precision, and | 10318 | is the command to quit Calc, @kbd{M-p} sets the precision, and |
| 10319 | @kbd{M-m t} (or @kbd{M-m M-t}, if you prefer) turns total algebraic | 10319 | @kbd{M-m t} (or @kbd{M-m M-t}, if you prefer) turns Total Algebraic |
| 10320 | mode back off again. Meta keys also terminate algebraic entry, so | 10320 | mode back off again. Meta keys also terminate algebraic entry, so |
| 10321 | that @kbd{2+3 M-S} is equivalent to @kbd{2+3 @key{RET} M-S}. The symbol | 10321 | that @kbd{2+3 M-S} is equivalent to @kbd{2+3 @key{RET} M-S}. The symbol |
| 10322 | @samp{Alg*} will appear in the mode line whenever you are in this mode. | 10322 | @samp{Alg*} will appear in the mode line whenever you are in this mode. |
| @@ -10577,7 +10577,7 @@ that you must always press @kbd{w} yourself to see the messages). | |||
| 10577 | 10577 | ||
| 10578 | @noindent | 10578 | @noindent |
| 10579 | @pindex another-calc | 10579 | @pindex another-calc |
| 10580 | It is possible to have any number of Calc Mode buffers at once. | 10580 | It is possible to have any number of Calc mode buffers at once. |
| 10581 | Usually this is done by executing @kbd{M-x another-calc}, which | 10581 | Usually this is done by executing @kbd{M-x another-calc}, which |
| 10582 | is similar to @kbd{M-# c} except that if a @samp{*Calculator*} | 10582 | is similar to @kbd{M-# c} except that if a @samp{*Calculator*} |
| 10583 | buffer already exists, a new, independent one with a name of the | 10583 | buffer already exists, a new, independent one with a name of the |
| @@ -10792,7 +10792,7 @@ The Calculator stores integers to arbitrary precision. Addition, | |||
| 10792 | subtraction, and multiplication of integers always yields an exact | 10792 | subtraction, and multiplication of integers always yields an exact |
| 10793 | integer result. (If the result of a division or exponentiation of | 10793 | integer result. (If the result of a division or exponentiation of |
| 10794 | integers is not an integer, it is expressed in fractional or | 10794 | integers is not an integer, it is expressed in fractional or |
| 10795 | floating-point form according to the current Fraction Mode. | 10795 | floating-point form according to the current Fraction mode. |
| 10796 | @xref{Fraction Mode}.) | 10796 | @xref{Fraction Mode}.) |
| 10797 | 10797 | ||
| 10798 | A decimal integer is represented as an optional sign followed by a | 10798 | A decimal integer is represented as an optional sign followed by a |
| @@ -10818,7 +10818,7 @@ A @dfn{fraction} is a ratio of two integers. Fractions are traditionally | |||
| 10818 | written ``2/3'' but Calc uses the notation @samp{2:3}. (The @kbd{/} key | 10818 | written ``2/3'' but Calc uses the notation @samp{2:3}. (The @kbd{/} key |
| 10819 | performs RPN division; the following two sequences push the number | 10819 | performs RPN division; the following two sequences push the number |
| 10820 | @samp{2:3} on the stack: @kbd{2 :@: 3 @key{RET}}, or @kbd{2 @key{RET} 3 /} | 10820 | @samp{2:3} on the stack: @kbd{2 :@: 3 @key{RET}}, or @kbd{2 @key{RET} 3 /} |
| 10821 | assuming Fraction Mode has been enabled.) | 10821 | assuming Fraction mode has been enabled.) |
| 10822 | When the Calculator produces a fractional result it always reduces it to | 10822 | When the Calculator produces a fractional result it always reduces it to |
| 10823 | simplest form, which may in fact be an integer. | 10823 | simplest form, which may in fact be an integer. |
| 10824 | 10824 | ||
| @@ -10932,7 +10932,7 @@ Complex numbers are entered in stages using incomplete objects. | |||
| 10932 | Operations on rectangular complex numbers yield rectangular complex | 10932 | Operations on rectangular complex numbers yield rectangular complex |
| 10933 | results, and similarly for polar complex numbers. Where the two types | 10933 | results, and similarly for polar complex numbers. Where the two types |
| 10934 | are mixed, or where new complex numbers arise (as for the square root of | 10934 | are mixed, or where new complex numbers arise (as for the square root of |
| 10935 | a negative real), the current @dfn{Polar Mode} is used to determine the | 10935 | a negative real), the current @dfn{Polar mode} is used to determine the |
| 10936 | type. @xref{Polar Mode}. | 10936 | type. @xref{Polar Mode}. |
| 10937 | 10937 | ||
| 10938 | A complex result in which the imaginary part is zero (or the phase angle | 10938 | A complex result in which the imaginary part is zero (or the phase angle |
| @@ -11020,7 +11020,7 @@ infinity, it's just that @emph{which} number it stands for | |||
| 11020 | cannot be determined.) In Calc's notation, @samp{0 * inf = nan} | 11020 | cannot be determined.) In Calc's notation, @samp{0 * inf = nan} |
| 11021 | and @samp{inf / inf = nan}. A few other common indeterminate | 11021 | and @samp{inf / inf = nan}. A few other common indeterminate |
| 11022 | expressions are @samp{inf - inf} and @samp{inf ^ 0}. Also, | 11022 | expressions are @samp{inf - inf} and @samp{inf ^ 0}. Also, |
| 11023 | @samp{0 / 0 = nan} if you have turned on ``infinite mode'' | 11023 | @samp{0 / 0 = nan} if you have turned on Infinite mode |
| 11024 | (as described above). | 11024 | (as described above). |
| 11025 | 11025 | ||
| 11026 | Infinities are especially useful as parts of @dfn{intervals}. | 11026 | Infinities are especially useful as parts of @dfn{intervals}. |
| @@ -11586,10 +11586,10 @@ rather than @samp{1 ..@: 0.1e2}. Add spaces or zeros if you want to | |||
| 11586 | get the other interpretation. If you omit the lower or upper limit, | 11586 | get the other interpretation. If you omit the lower or upper limit, |
| 11587 | a default of @samp{-inf} or @samp{inf} (respectively) is furnished. | 11587 | a default of @samp{-inf} or @samp{inf} (respectively) is furnished. |
| 11588 | 11588 | ||
| 11589 | ``Infinite mode'' also affects operations on intervals | 11589 | Infinite mode also affects operations on intervals |
| 11590 | (@pxref{Infinities}). Calc will always introduce an open infinity, | 11590 | (@pxref{Infinities}). Calc will always introduce an open infinity, |
| 11591 | as in @samp{1 / (0 .. 2] = [0.5 .. inf)}. But closed infinities, | 11591 | as in @samp{1 / (0 .. 2] = [0.5 .. inf)}. But closed infinities, |
| 11592 | @w{@samp{1 / [0 .. 2] = [0.5 .. inf]}}, arise only in infinite mode; | 11592 | @w{@samp{1 / [0 .. 2] = [0.5 .. inf]}}, arise only in Infinite mode; |
| 11593 | otherwise they are left unevaluated. Note that the ``direction'' of | 11593 | otherwise they are left unevaluated. Note that the ``direction'' of |
| 11594 | a zero is not an issue in this case since the zero is always assumed | 11594 | a zero is not an issue in this case since the zero is always assumed |
| 11595 | to be continuous with the rest of the interval. For intervals that | 11595 | to be continuous with the rest of the interval. For intervals that |
| @@ -11904,7 +11904,7 @@ Commands that interpret (``parse'') text as algebraic formulas include | |||
| 11904 | algebraic entry (@kbd{'}), editing commands like @kbd{`} which parse | 11904 | algebraic entry (@kbd{'}), editing commands like @kbd{`} which parse |
| 11905 | the contents of the editing buffer when you finish, the @kbd{M-# g} | 11905 | the contents of the editing buffer when you finish, the @kbd{M-# g} |
| 11906 | and @w{@kbd{M-# r}} commands, the @kbd{C-y} command, the X window system | 11906 | and @w{@kbd{M-# r}} commands, the @kbd{C-y} command, the X window system |
| 11907 | ``paste'' mouse operation, and Embedded Mode. All of these operations | 11907 | ``paste'' mouse operation, and Embedded mode. All of these operations |
| 11908 | use the same rules for parsing formulas; in particular, language modes | 11908 | use the same rules for parsing formulas; in particular, language modes |
| 11909 | (@pxref{Language Modes}) affect them all in the same way. | 11909 | (@pxref{Language Modes}) affect them all in the same way. |
| 11910 | 11910 | ||
| @@ -12313,7 +12313,7 @@ Otherwise, the new mode information is appended to the end of the file. | |||
| 12313 | @pindex calc-mode-record-mode | 12313 | @pindex calc-mode-record-mode |
| 12314 | The @kbd{m R} (@code{calc-mode-record-mode}) command tells Calc to | 12314 | The @kbd{m R} (@code{calc-mode-record-mode}) command tells Calc to |
| 12315 | record the new mode settings (as if by pressing @kbd{m m}) every | 12315 | record the new mode settings (as if by pressing @kbd{m m}) every |
| 12316 | time a mode setting changes. If Embedded Mode is enabled, other | 12316 | time a mode setting changes. If Embedded mode is enabled, other |
| 12317 | options are available; @pxref{Mode Settings in Embedded Mode}. | 12317 | options are available; @pxref{Mode Settings in Embedded Mode}. |
| 12318 | 12318 | ||
| 12319 | @kindex m F | 12319 | @kindex m F |
| @@ -12494,7 +12494,7 @@ Functions that compute angles produce a number in radians, a number in | |||
| 12494 | degrees, or an HMS form depending on the current angular mode. If the | 12494 | degrees, or an HMS form depending on the current angular mode. If the |
| 12495 | result is a complex number and the current mode is HMS, the number is | 12495 | result is a complex number and the current mode is HMS, the number is |
| 12496 | instead expressed in degrees. (Complex-number calculations would | 12496 | instead expressed in degrees. (Complex-number calculations would |
| 12497 | normally be done in radians mode, though. Complex numbers are converted | 12497 | normally be done in Radians mode, though. Complex numbers are converted |
| 12498 | to degrees by calculating the complex result in radians and then | 12498 | to degrees by calculating the complex result in radians and then |
| 12499 | multiplying by 180 over @cpi{}.) | 12499 | multiplying by 180 over @cpi{}.) |
| 12500 | 12500 | ||
| @@ -12507,7 +12507,7 @@ multiplying by 180 over @cpi{}.) | |||
| 12507 | The @kbd{m r} (@code{calc-radians-mode}), @kbd{m d} (@code{calc-degrees-mode}), | 12507 | The @kbd{m r} (@code{calc-radians-mode}), @kbd{m d} (@code{calc-degrees-mode}), |
| 12508 | and @kbd{m h} (@code{calc-hms-mode}) commands control the angular mode. | 12508 | and @kbd{m h} (@code{calc-hms-mode}) commands control the angular mode. |
| 12509 | The current angular mode is displayed on the Emacs mode line. | 12509 | The current angular mode is displayed on the Emacs mode line. |
| 12510 | The default angular mode is degrees. | 12510 | The default angular mode is Degrees. |
| 12511 | 12511 | ||
| 12512 | @node Polar Mode, Fraction Mode, Angular Modes, Calculation Modes | 12512 | @node Polar Mode, Fraction Mode, Angular Modes, Calculation Modes |
| 12513 | @subsection Polar Mode | 12513 | @subsection Polar Mode |
| @@ -12523,7 +12523,7 @@ number, or by entering @kbd{( 2 @key{SPC} 3 )}. | |||
| 12523 | @kindex m p | 12523 | @kindex m p |
| 12524 | @pindex calc-polar-mode | 12524 | @pindex calc-polar-mode |
| 12525 | The @kbd{m p} (@code{calc-polar-mode}) command toggles complex-number | 12525 | The @kbd{m p} (@code{calc-polar-mode}) command toggles complex-number |
| 12526 | preference between rectangular and polar forms. In polar mode, all | 12526 | preference between rectangular and polar forms. In Polar mode, all |
| 12527 | of the above example situations would produce polar complex numbers. | 12527 | of the above example situations would produce polar complex numbers. |
| 12528 | 12528 | ||
| 12529 | @node Fraction Mode, Infinite Mode, Polar Mode, Calculation Modes | 12529 | @node Fraction Mode, Infinite Mode, Polar Mode, Calculation Modes |
| @@ -12543,8 +12543,8 @@ even though @kbd{6 @key{RET} 4 /} produces @expr{1.5}. | |||
| 12543 | To set the Calculator to produce fractional results for normal integer | 12543 | To set the Calculator to produce fractional results for normal integer |
| 12544 | divisions, use the @kbd{m f} (@code{calc-frac-mode}) command. | 12544 | divisions, use the @kbd{m f} (@code{calc-frac-mode}) command. |
| 12545 | For example, @expr{8/4} produces @expr{2} in either mode, | 12545 | For example, @expr{8/4} produces @expr{2} in either mode, |
| 12546 | but @expr{6/4} produces @expr{3:2} in Fraction Mode, @expr{1.5} in | 12546 | but @expr{6/4} produces @expr{3:2} in Fraction mode, @expr{1.5} in |
| 12547 | Float Mode. | 12547 | Float mode. |
| 12548 | 12548 | ||
| 12549 | At any time you can use @kbd{c f} (@code{calc-float}) to convert a | 12549 | At any time you can use @kbd{c f} (@code{calc-float}) to convert a |
| 12550 | fraction to a float, or @kbd{c F} (@code{calc-fraction}) to convert a | 12550 | fraction to a float, or @kbd{c F} (@code{calc-fraction}) to convert a |
| @@ -12567,25 +12567,25 @@ on and off. When the mode is off, infinities do not arise except | |||
| 12567 | in calculations that already had infinities as inputs. (One exception | 12567 | in calculations that already had infinities as inputs. (One exception |
| 12568 | is that infinite open intervals like @samp{[0 .. inf)} can be | 12568 | is that infinite open intervals like @samp{[0 .. inf)} can be |
| 12569 | generated; however, intervals closed at infinity (@samp{[0 .. inf]}) | 12569 | generated; however, intervals closed at infinity (@samp{[0 .. inf]}) |
| 12570 | will not be generated when infinite mode is off.) | 12570 | will not be generated when Infinite mode is off.) |
| 12571 | 12571 | ||
| 12572 | With infinite mode turned on, @samp{1 / 0} will generate @code{uinf}, | 12572 | With Infinite mode turned on, @samp{1 / 0} will generate @code{uinf}, |
| 12573 | an undirected infinity. @xref{Infinities}, for a discussion of the | 12573 | an undirected infinity. @xref{Infinities}, for a discussion of the |
| 12574 | difference between @code{inf} and @code{uinf}. Also, @expr{0 / 0} | 12574 | difference between @code{inf} and @code{uinf}. Also, @expr{0 / 0} |
| 12575 | evaluates to @code{nan}, the ``indeterminate'' symbol. Various other | 12575 | evaluates to @code{nan}, the ``indeterminate'' symbol. Various other |
| 12576 | functions can also return infinities in this mode; for example, | 12576 | functions can also return infinities in this mode; for example, |
| 12577 | @samp{ln(0) = -inf}, and @samp{gamma(-7) = uinf}. Once again, | 12577 | @samp{ln(0) = -inf}, and @samp{gamma(-7) = uinf}. Once again, |
| 12578 | note that @samp{exp(inf) = inf} regardless of infinite mode because | 12578 | note that @samp{exp(inf) = inf} regardless of Infinite mode because |
| 12579 | this calculation has infinity as an input. | 12579 | this calculation has infinity as an input. |
| 12580 | 12580 | ||
| 12581 | @cindex Positive infinite mode | 12581 | @cindex Positive Infinite mode |
| 12582 | The @kbd{m i} command with a numeric prefix argument of zero, | 12582 | The @kbd{m i} command with a numeric prefix argument of zero, |
| 12583 | i.e., @kbd{C-u 0 m i}, turns on a ``positive infinite mode'' in | 12583 | i.e., @kbd{C-u 0 m i}, turns on a Positive Infinite mode in |
| 12584 | which zero is treated as positive instead of being directionless. | 12584 | which zero is treated as positive instead of being directionless. |
| 12585 | Thus, @samp{1 / 0 = inf} and @samp{-1 / 0 = -inf} in this mode. | 12585 | Thus, @samp{1 / 0 = inf} and @samp{-1 / 0 = -inf} in this mode. |
| 12586 | Note that zero never actually has a sign in Calc; there are no | 12586 | Note that zero never actually has a sign in Calc; there are no |
| 12587 | separate representations for @mathit{+0} and @mathit{-0}. Positive | 12587 | separate representations for @mathit{+0} and @mathit{-0}. Positive |
| 12588 | infinite mode merely changes the interpretation given to the | 12588 | Infinite mode merely changes the interpretation given to the |
| 12589 | single symbol, @samp{0}. One consequence of this is that, while | 12589 | single symbol, @samp{0}. One consequence of this is that, while |
| 12590 | you might expect @samp{1 / -0 = -inf}, actually @samp{1 / -0} | 12590 | you might expect @samp{1 / -0 = -inf}, actually @samp{1 / -0} |
| 12591 | is equivalent to @samp{1 / 0}, which is equal to positive @code{inf}. | 12591 | is equivalent to @samp{1 / 0}, which is equal to positive @code{inf}. |
| @@ -12604,7 +12604,7 @@ number or a symbolic expression if the argument is an expression: | |||
| 12604 | 12604 | ||
| 12605 | @kindex m s | 12605 | @kindex m s |
| 12606 | @pindex calc-symbolic-mode | 12606 | @pindex calc-symbolic-mode |
| 12607 | In @dfn{symbolic mode}, controlled by the @kbd{m s} (@code{calc-symbolic-mode}) | 12607 | In @dfn{Symbolic mode}, controlled by the @kbd{m s} (@code{calc-symbolic-mode}) |
| 12608 | command, functions which would produce inexact, irrational results are | 12608 | command, functions which would produce inexact, irrational results are |
| 12609 | left in symbolic form. Thus @kbd{16 Q} pushes 4, but @kbd{2 Q} pushes | 12609 | left in symbolic form. Thus @kbd{16 Q} pushes 4, but @kbd{2 Q} pushes |
| 12610 | @samp{sqrt(2)}. | 12610 | @samp{sqrt(2)}. |
| @@ -12631,12 +12631,12 @@ variables.) | |||
| 12631 | @cindex Scalar mode | 12631 | @cindex Scalar mode |
| 12632 | Calc sometimes makes assumptions during algebraic manipulation that | 12632 | Calc sometimes makes assumptions during algebraic manipulation that |
| 12633 | are awkward or incorrect when vectors and matrices are involved. | 12633 | are awkward or incorrect when vectors and matrices are involved. |
| 12634 | Calc has two modes, @dfn{matrix mode} and @dfn{scalar mode}, which | 12634 | Calc has two modes, @dfn{Matrix mode} and @dfn{Scalar mode}, which |
| 12635 | modify its behavior around vectors in useful ways. | 12635 | modify its behavior around vectors in useful ways. |
| 12636 | 12636 | ||
| 12637 | @kindex m v | 12637 | @kindex m v |
| 12638 | @pindex calc-matrix-mode | 12638 | @pindex calc-matrix-mode |
| 12639 | Press @kbd{m v} (@code{calc-matrix-mode}) once to enter matrix mode. | 12639 | Press @kbd{m v} (@code{calc-matrix-mode}) once to enter Matrix mode. |
| 12640 | In this mode, all objects are assumed to be matrices unless provably | 12640 | In this mode, all objects are assumed to be matrices unless provably |
| 12641 | otherwise. One major effect is that Calc will no longer consider | 12641 | otherwise. One major effect is that Calc will no longer consider |
| 12642 | multiplication to be commutative. (Recall that in matrix arithmetic, | 12642 | multiplication to be commutative. (Recall that in matrix arithmetic, |
| @@ -12655,18 +12655,18 @@ a true identity matrix of the appropriate size. On the other hand, | |||
| 12655 | if it is combined with a scalar (as in @samp{idn(1) + 2}), Calc | 12655 | if it is combined with a scalar (as in @samp{idn(1) + 2}), Calc |
| 12656 | will assume it really was a scalar after all and produce, e.g., 3. | 12656 | will assume it really was a scalar after all and produce, e.g., 3. |
| 12657 | 12657 | ||
| 12658 | Press @kbd{m v} a second time to get scalar mode. Here, objects are | 12658 | Press @kbd{m v} a second time to get Scalar mode. Here, objects are |
| 12659 | assumed @emph{not} to be vectors or matrices unless provably so. | 12659 | assumed @emph{not} to be vectors or matrices unless provably so. |
| 12660 | For example, normally adding a variable to a vector, as in | 12660 | For example, normally adding a variable to a vector, as in |
| 12661 | @samp{[x, y, z] + a}, will leave the sum in symbolic form because | 12661 | @samp{[x, y, z] + a}, will leave the sum in symbolic form because |
| 12662 | as far as Calc knows, @samp{a} could represent either a number or | 12662 | as far as Calc knows, @samp{a} could represent either a number or |
| 12663 | another 3-vector. In scalar mode, @samp{a} is assumed to be a | 12663 | another 3-vector. In Scalar mode, @samp{a} is assumed to be a |
| 12664 | non-vector, and the addition is evaluated to @samp{[x+a, y+a, z+a]}. | 12664 | non-vector, and the addition is evaluated to @samp{[x+a, y+a, z+a]}. |
| 12665 | 12665 | ||
| 12666 | Press @kbd{m v} a third time to return to the normal mode of operation. | 12666 | Press @kbd{m v} a third time to return to the normal mode of operation. |
| 12667 | 12667 | ||
| 12668 | If you press @kbd{m v} with a numeric prefix argument @var{n}, you | 12668 | If you press @kbd{m v} with a numeric prefix argument @var{n}, you |
| 12669 | get a special ``dimensioned matrix mode'' in which matrices of | 12669 | get a special ``dimensioned'' Matrix mode in which matrices of |
| 12670 | unknown size are assumed to be @var{n}x@var{n} square matrices. | 12670 | unknown size are assumed to be @var{n}x@var{n} square matrices. |
| 12671 | Then, the function call @samp{idn(1)} will expand into an actual | 12671 | Then, the function call @samp{idn(1)} will expand into an actual |
| 12672 | matrix rather than representing a ``generic'' matrix. | 12672 | matrix rather than representing a ``generic'' matrix. |
| @@ -12687,11 +12687,11 @@ for @samp{[x, y, z] + [1, 2, 3]}, but that's because you have broken | |||
| 12687 | your earlier promise to Calc that @samp{a} would be scalar. | 12687 | your earlier promise to Calc that @samp{a} would be scalar. |
| 12688 | 12688 | ||
| 12689 | Another way to mix scalars and matrices is to use selections | 12689 | Another way to mix scalars and matrices is to use selections |
| 12690 | (@pxref{Selecting Subformulas}). Use matrix mode when operating on | 12690 | (@pxref{Selecting Subformulas}). Use Matrix mode when operating on |
| 12691 | your formula normally; then, to apply scalar mode to a certain part | 12691 | your formula normally; then, to apply Scalar mode to a certain part |
| 12692 | of the formula without affecting the rest just select that part, | 12692 | of the formula without affecting the rest just select that part, |
| 12693 | change into scalar mode and press @kbd{=} to resimplify the part | 12693 | change into Scalar mode and press @kbd{=} to resimplify the part |
| 12694 | under this mode, then change back to matrix mode before deselecting. | 12694 | under this mode, then change back to Matrix mode before deselecting. |
| 12695 | 12695 | ||
| 12696 | @node Automatic Recomputation, Working Message, Matrix Mode, Calculation Modes | 12696 | @node Automatic Recomputation, Working Message, Matrix Mode, Calculation Modes |
| 12697 | @subsection Automatic Recomputation | 12697 | @subsection Automatic Recomputation |
| @@ -12707,7 +12707,7 @@ are changed. @xref{Evaluates-To Operator}. | |||
| 12707 | The @kbd{m C} (@code{calc-auto-recompute}) command turns this | 12707 | The @kbd{m C} (@code{calc-auto-recompute}) command turns this |
| 12708 | automatic recomputation on and off. If you turn it off, Calc will | 12708 | automatic recomputation on and off. If you turn it off, Calc will |
| 12709 | not update @samp{=>} operators on the stack (nor those in the | 12709 | not update @samp{=>} operators on the stack (nor those in the |
| 12710 | attached Embedded Mode buffer, if there is one). They will not | 12710 | attached Embedded mode buffer, if there is one). They will not |
| 12711 | be updated unless you explicitly do so by pressing @kbd{=} or until | 12711 | be updated unless you explicitly do so by pressing @kbd{=} or until |
| 12712 | you press @kbd{m C} to turn recomputation back on. (While automatic | 12712 | you press @kbd{m C} to turn recomputation back on. (While automatic |
| 12713 | recomputation is off, you can think of @kbd{m C m C} as a command | 12713 | recomputation is off, you can think of @kbd{m C m C} as a command |
| @@ -12828,7 +12828,7 @@ A common technique is to set the simplification mode down to the lowest | |||
| 12828 | amount of simplification you will allow to be applied automatically, then | 12828 | amount of simplification you will allow to be applied automatically, then |
| 12829 | use manual commands like @kbd{a s} and @kbd{c c} (@code{calc-clean}) to | 12829 | use manual commands like @kbd{a s} and @kbd{c c} (@code{calc-clean}) to |
| 12830 | perform higher types of simplifications on demand. @xref{Algebraic | 12830 | perform higher types of simplifications on demand. @xref{Algebraic |
| 12831 | Definitions}, for another sample use of no-simplification mode. | 12831 | Definitions}, for another sample use of No-Simplification mode. |
| 12832 | 12832 | ||
| 12833 | @node Declarations, Display Modes, Simplification Modes, Mode Settings | 12833 | @node Declarations, Display Modes, Simplification Modes, Mode Settings |
| 12834 | @section Declarations | 12834 | @section Declarations |
| @@ -13075,8 +13075,8 @@ and @code{y} are known to be vectors or matrices. (Calc currently | |||
| 13075 | never distinguishes between @code{vector} and @code{matrix} | 13075 | never distinguishes between @code{vector} and @code{matrix} |
| 13076 | declarations.) | 13076 | declarations.) |
| 13077 | 13077 | ||
| 13078 | @xref{Matrix Mode}, for a discussion of ``matrix mode'' and | 13078 | @xref{Matrix Mode}, for a discussion of Matrix mode and |
| 13079 | ``scalar mode,'' which are similar to declaring @samp{[All, matrix]} | 13079 | Scalar mode, which are similar to declaring @samp{[All, matrix]} |
| 13080 | or @samp{[All, scalar]} but much more convenient. | 13080 | or @samp{[All, scalar]} but much more convenient. |
| 13081 | 13081 | ||
| 13082 | One more type symbol that is recognized is used with the @kbd{H a d} | 13082 | One more type symbol that is recognized is used with the @kbd{H a d} |
| @@ -13228,8 +13228,8 @@ remains unevaluated. | |||
| 13228 | @tindex dscalar | 13228 | @tindex dscalar |
| 13229 | The @code{dscalar} function returns 1 if its argument is provably | 13229 | The @code{dscalar} function returns 1 if its argument is provably |
| 13230 | scalar, or 0 if its argument is provably non-scalar. It is left | 13230 | scalar, or 0 if its argument is provably non-scalar. It is left |
| 13231 | unevaluated if this cannot be determined. (If matrix mode or scalar | 13231 | unevaluated if this cannot be determined. (If Matrix mode or Scalar |
| 13232 | mode are in effect, this function returns 1 or 0, respectively, | 13232 | mode is in effect, this function returns 1 or 0, respectively, |
| 13233 | if it has no other information.) When Calc interprets a condition | 13233 | if it has no other information.) When Calc interprets a condition |
| 13234 | (say, in a rewrite rule) it considers an unevaluated formula to be | 13234 | (say, in a rewrite rule) it considers an unevaluated formula to be |
| 13235 | ``false.'' Thus, @samp{dscalar(a)} is ``true'' only if @code{a} is | 13235 | ``false.'' Thus, @samp{dscalar(a)} is ``true'' only if @code{a} is |
| @@ -13338,7 +13338,7 @@ entirety.) | |||
| 13338 | @cindex Digit grouping | 13338 | @cindex Digit grouping |
| 13339 | Long numbers can be hard to read if they have too many digits. For | 13339 | Long numbers can be hard to read if they have too many digits. For |
| 13340 | example, the factorial of 30 is 33 digits long! Press @kbd{d g} | 13340 | example, the factorial of 30 is 33 digits long! Press @kbd{d g} |
| 13341 | (@code{calc-group-digits}) to enable @dfn{grouping} mode, in which digits | 13341 | (@code{calc-group-digits}) to enable @dfn{Grouping} mode, in which digits |
| 13342 | are displayed in clumps of 3 or 4 (depending on the current radix) | 13342 | are displayed in clumps of 3 or 4 (depending on the current radix) |
| 13343 | separated by commas. | 13343 | separated by commas. |
| 13344 | 13344 | ||
| @@ -13884,7 +13884,7 @@ line at a time (or several lines with a prefix argument). | |||
| 13884 | Values on the stack are normally left-justified in the window. You can | 13884 | Values on the stack are normally left-justified in the window. You can |
| 13885 | control this arrangement by typing @kbd{d <} (@code{calc-left-justify}), | 13885 | control this arrangement by typing @kbd{d <} (@code{calc-left-justify}), |
| 13886 | @kbd{d >} (@code{calc-right-justify}), or @kbd{d =} | 13886 | @kbd{d >} (@code{calc-right-justify}), or @kbd{d =} |
| 13887 | (@code{calc-center-justify}). For example, in right-justification mode, | 13887 | (@code{calc-center-justify}). For example, in Right-Justification mode, |
| 13888 | stack entries are displayed flush-right against the right edge of the | 13888 | stack entries are displayed flush-right against the right edge of the |
| 13889 | window. | 13889 | window. |
| 13890 | 13890 | ||
| @@ -13905,20 +13905,20 @@ breaking lines are given below. Notice that the interaction between | |||
| 13905 | origin and line width is slightly different in each justification | 13905 | origin and line width is slightly different in each justification |
| 13906 | mode. | 13906 | mode. |
| 13907 | 13907 | ||
| 13908 | In left-justified mode, the line is indented by a number of spaces | 13908 | In Left-Justified mode, the line is indented by a number of spaces |
| 13909 | given by the origin (default zero). If the result is longer than the | 13909 | given by the origin (default zero). If the result is longer than the |
| 13910 | maximum line width, if given, or too wide to fit in the Calc window | 13910 | maximum line width, if given, or too wide to fit in the Calc window |
| 13911 | otherwise, then it is broken into lines which will fit; each broken | 13911 | otherwise, then it is broken into lines which will fit; each broken |
| 13912 | line is indented to the origin. | 13912 | line is indented to the origin. |
| 13913 | 13913 | ||
| 13914 | In right-justified mode, lines are shifted right so that the rightmost | 13914 | In Right-Justified mode, lines are shifted right so that the rightmost |
| 13915 | character is just before the origin, or just before the current | 13915 | character is just before the origin, or just before the current |
| 13916 | window width if no origin was specified. If the line is too long | 13916 | window width if no origin was specified. If the line is too long |
| 13917 | for this, then it is broken; the current line width is used, if | 13917 | for this, then it is broken; the current line width is used, if |
| 13918 | specified, or else the origin is used as a width if that is | 13918 | specified, or else the origin is used as a width if that is |
| 13919 | specified, or else the line is broken to fit in the window. | 13919 | specified, or else the line is broken to fit in the window. |
| 13920 | 13920 | ||
| 13921 | In centering mode, the origin is the column number of the center of | 13921 | In Centering mode, the origin is the column number of the center of |
| 13922 | each stack entry. If a line width is specified, lines will not be | 13922 | each stack entry. If a line width is specified, lines will not be |
| 13923 | allowed to go past that width; Calc will either indent less or | 13923 | allowed to go past that width; Calc will either indent less or |
| 13924 | break the lines if necessary. If no origin is specified, half the | 13924 | break the lines if necessary. If no origin is specified, half the |
| @@ -13953,13 +13953,13 @@ Give a blank string (with @kbd{d @{ @key{RET}}) to turn the label off. | |||
| 13953 | The @kbd{d @}} (@code{calc-right-label}) command similarly adds a | 13953 | The @kbd{d @}} (@code{calc-right-label}) command similarly adds a |
| 13954 | label on the righthand side. It does not affect positioning of | 13954 | label on the righthand side. It does not affect positioning of |
| 13955 | the stack entries unless they are right-justified. Also, if both | 13955 | the stack entries unless they are right-justified. Also, if both |
| 13956 | a line width and an origin are given in right-justified mode, the | 13956 | a line width and an origin are given in Right-Justified mode, the |
| 13957 | stack entry is justified to the origin and the righthand label is | 13957 | stack entry is justified to the origin and the righthand label is |
| 13958 | justified to the line width. | 13958 | justified to the line width. |
| 13959 | 13959 | ||
| 13960 | One application of labels would be to add equation numbers to | 13960 | One application of labels would be to add equation numbers to |
| 13961 | formulas you are manipulating in Calc and then copying into a | 13961 | formulas you are manipulating in Calc and then copying into a |
| 13962 | document (possibly using Embedded Mode). The equations would | 13962 | document (possibly using Embedded mode). The equations would |
| 13963 | typically be centered, and the equation numbers would be on the | 13963 | typically be centered, and the equation numbers would be on the |
| 13964 | left or right as you prefer. | 13964 | left or right as you prefer. |
| 13965 | 13965 | ||
| @@ -14061,7 +14061,7 @@ such as powers, quotients, and square roots: | |||
| 14061 | @noindent | 14061 | @noindent |
| 14062 | in place of @samp{sqrt((a+1)/b + c^2)}. | 14062 | in place of @samp{sqrt((a+1)/b + c^2)}. |
| 14063 | 14063 | ||
| 14064 | Subscripts like @samp{a_i} are displayed as actual subscripts in ``big'' | 14064 | Subscripts like @samp{a_i} are displayed as actual subscripts in Big |
| 14065 | mode. Double subscripts, @samp{a_i_j} (@samp{subscr(subscr(a, i), j)}) | 14065 | mode. Double subscripts, @samp{a_i_j} (@samp{subscr(subscr(a, i), j)}) |
| 14066 | are displayed as @samp{a} with subscripts separated by commas: | 14066 | are displayed as @samp{a} with subscripts separated by commas: |
| 14067 | @samp{i, j}. They must still be entered in the usual underscore | 14067 | @samp{i, j}. They must still be entered in the usual underscore |
| @@ -14134,12 +14134,12 @@ In C mode, vectors and matrices use curly braces instead of brackets. | |||
| 14134 | Octal and hexadecimal values are written with leading @samp{0} or @samp{0x} | 14134 | Octal and hexadecimal values are written with leading @samp{0} or @samp{0x} |
| 14135 | rather than using the @samp{#} symbol. Array subscripting is | 14135 | rather than using the @samp{#} symbol. Array subscripting is |
| 14136 | translated into @code{subscr} calls, so that @samp{a[i]} in C | 14136 | translated into @code{subscr} calls, so that @samp{a[i]} in C |
| 14137 | mode is the same as @samp{a_i} in normal mode. Assignments | 14137 | mode is the same as @samp{a_i} in Normal mode. Assignments |
| 14138 | turn into the @code{assign} function, which Calc normally displays | 14138 | turn into the @code{assign} function, which Calc normally displays |
| 14139 | using the @samp{:=} symbol. | 14139 | using the @samp{:=} symbol. |
| 14140 | 14140 | ||
| 14141 | The variables @code{var-pi} and @code{var-e} would be displayed @samp{pi} | 14141 | The variables @code{var-pi} and @code{var-e} would be displayed @samp{pi} |
| 14142 | and @samp{e} in normal mode, but in C mode they are displayed as | 14142 | and @samp{e} in Normal mode, but in C mode they are displayed as |
| 14143 | @samp{M_PI} and @samp{M_E}, corresponding to the names of constants | 14143 | @samp{M_PI} and @samp{M_E}, corresponding to the names of constants |
| 14144 | typically provided in the @file{<math.h>} header. Functions whose | 14144 | typically provided in the @file{<math.h>} header. Functions whose |
| 14145 | names are different in C are translated automatically for entry and | 14145 | names are different in C are translated automatically for entry and |
| @@ -14181,7 +14181,7 @@ function!). | |||
| 14181 | 14181 | ||
| 14182 | Underscores are allowed in variable and function names in all of these | 14182 | Underscores are allowed in variable and function names in all of these |
| 14183 | language modes. The underscore here is equivalent to the @samp{#} in | 14183 | language modes. The underscore here is equivalent to the @samp{#} in |
| 14184 | normal mode, or to hyphens in the underlying Emacs Lisp variable names. | 14184 | Normal mode, or to hyphens in the underlying Emacs Lisp variable names. |
| 14185 | 14185 | ||
| 14186 | FORTRAN and Pascal modes normally do not adjust the case of letters in | 14186 | FORTRAN and Pascal modes normally do not adjust the case of letters in |
| 14187 | formulas. Most built-in Calc names use lower-case letters. If you use a | 14187 | formulas. Most built-in Calc names use lower-case letters. If you use a |
| @@ -14823,7 +14823,7 @@ object. | |||
| 14823 | @tindex choriz | 14823 | @tindex choriz |
| 14824 | The @code{choriz} function takes a vector of objects and composes | 14824 | The @code{choriz} function takes a vector of objects and composes |
| 14825 | them horizontally. For example, @samp{choriz([17, a b/c, d])} formats | 14825 | them horizontally. For example, @samp{choriz([17, a b/c, d])} formats |
| 14826 | as @w{@samp{17a b / cd}} in normal language mode, or as | 14826 | as @w{@samp{17a b / cd}} in Normal language mode, or as |
| 14827 | 14827 | ||
| 14828 | @example | 14828 | @example |
| 14829 | @group | 14829 | @group |
| @@ -15086,7 +15086,7 @@ then return a certain measurement of the composition as an integer. | |||
| 15086 | @tindex cwidth | 15086 | @tindex cwidth |
| 15087 | The @code{cwidth} function measures the width, in characters, of a | 15087 | The @code{cwidth} function measures the width, in characters, of a |
| 15088 | composition. For example, @samp{cwidth(a + b)} is 5, and | 15088 | composition. For example, @samp{cwidth(a + b)} is 5, and |
| 15089 | @samp{cwidth(a / b)} is 5 in normal mode, 1 in Big mode, and 11 in | 15089 | @samp{cwidth(a / b)} is 5 in Normal mode, 1 in Big mode, and 11 in |
| 15090 | @TeX{} mode (for @samp{@{a \over b@}}). The argument may involve | 15090 | @TeX{} mode (for @samp{@{a \over b@}}). The argument may involve |
| 15091 | the composition functions described in this section. | 15091 | the composition functions described in this section. |
| 15092 | 15092 | ||
| @@ -15262,7 +15262,7 @@ unrelated to the syntax tables described in the Emacs manual.) | |||
| 15262 | @pindex calc-edit-user-syntax | 15262 | @pindex calc-edit-user-syntax |
| 15263 | The @kbd{Z S} (@code{calc-edit-user-syntax}) command edits the | 15263 | The @kbd{Z S} (@code{calc-edit-user-syntax}) command edits the |
| 15264 | syntax table for the current language mode. If you want your | 15264 | syntax table for the current language mode. If you want your |
| 15265 | syntax to work in any language, define it in the normal language | 15265 | syntax to work in any language, define it in the Normal language |
| 15266 | mode. Type @kbd{M-# M-#} to finish editing the syntax table, or | 15266 | mode. Type @kbd{M-# M-#} to finish editing the syntax table, or |
| 15267 | @kbd{M-# x} to cancel the edit. The @kbd{m m} command saves all | 15267 | @kbd{M-# x} to cancel the edit. The @kbd{m m} command saves all |
| 15268 | the syntax tables along with the other mode settings; | 15268 | the syntax tables along with the other mode settings; |
| @@ -15293,7 +15293,7 @@ zero or more expressions separated by commas, and @samp{)}.'' | |||
| 15293 | A @dfn{syntax table} is a list of user-defined @dfn{syntax rules}, | 15293 | A @dfn{syntax table} is a list of user-defined @dfn{syntax rules}, |
| 15294 | which allow you to specify new patterns to define your own | 15294 | which allow you to specify new patterns to define your own |
| 15295 | favorite input notations. Calc's parser always checks the syntax | 15295 | favorite input notations. Calc's parser always checks the syntax |
| 15296 | table for the current language mode, then the table for the normal | 15296 | table for the current language mode, then the table for the Normal |
| 15297 | language mode, before it uses its built-in rules to parse an | 15297 | language mode, before it uses its built-in rules to parse an |
| 15298 | algebraic formula you have entered. Each syntax rule should go on | 15298 | algebraic formula you have entered. Each syntax rule should go on |
| 15299 | its own line; it consists of a @dfn{pattern}, a @samp{:=} symbol, | 15299 | its own line; it consists of a @dfn{pattern}, a @samp{:=} symbol, |
| @@ -15648,7 +15648,7 @@ In this approach, we allow @samp{#2} to equal the whole expression | |||
| 15648 | @samp{i=1..10}. Then, we use @code{matches} to break it apart into | 15648 | @samp{i=1..10}. Then, we use @code{matches} to break it apart into |
| 15649 | its components. If the expression turns out not to match the pattern, | 15649 | its components. If the expression turns out not to match the pattern, |
| 15650 | the syntax rule will fail. Note that @kbd{Z S} always uses Calc's | 15650 | the syntax rule will fail. Note that @kbd{Z S} always uses Calc's |
| 15651 | normal language mode for editing expressions in syntax rules, so we | 15651 | Normal language mode for editing expressions in syntax rules, so we |
| 15652 | must use regular Calc notation for the interval @samp{[b..c]} that | 15652 | must use regular Calc notation for the interval @samp{[b..c]} that |
| 15653 | will correspond to the Maple mode interval @samp{1..10}. | 15653 | will correspond to the Maple mode interval @samp{1..10}. |
| 15654 | 15654 | ||
| @@ -15721,11 +15721,11 @@ Polar mode. Value is 0 (rectangular) or 1 (polar); default is 0. | |||
| 15721 | Command is @kbd{m p}. | 15721 | Command is @kbd{m p}. |
| 15722 | 15722 | ||
| 15723 | @item | 15723 | @item |
| 15724 | Matrix/scalar mode. Default value is @mathit{-1}. Value is 0 for scalar | 15724 | Matrix/Scalar mode. Default value is @mathit{-1}. Value is 0 for Scalar |
| 15725 | mode, @mathit{-2} for matrix mode, or @var{N} for | 15725 | mode, @mathit{-2} for Matrix mode, or @var{N} for |
| 15726 | @texline @math{N\times N} | 15726 | @texline @math{N\times N} |
| 15727 | @infoline @var{N}x@var{N} | 15727 | @infoline @var{N}x@var{N} |
| 15728 | matrix mode. Command is @kbd{m v}. | 15728 | Matrix mode. Command is @kbd{m v}. |
| 15729 | 15729 | ||
| 15730 | @item | 15730 | @item |
| 15731 | Simplification mode. Default is 1. Value is @mathit{-1} for off (@kbd{m O}), | 15731 | Simplification mode. Default is 1. Value is @mathit{-1} for off (@kbd{m O}), |
| @@ -15760,7 +15760,7 @@ programming commands. @xref{Conditionals in Macros}.) | |||
| 15760 | @cindex Mode line indicators | 15760 | @cindex Mode line indicators |
| 15761 | This section is a summary of all symbols that can appear on the | 15761 | This section is a summary of all symbols that can appear on the |
| 15762 | Calc mode line, the highlighted bar that appears under the Calc | 15762 | Calc mode line, the highlighted bar that appears under the Calc |
| 15763 | stack window (or under an editing window in Embedded Mode). | 15763 | stack window (or under an editing window in Embedded mode). |
| 15764 | 15764 | ||
| 15765 | The basic mode line format is: | 15765 | The basic mode line format is: |
| 15766 | 15766 | ||
| @@ -15772,7 +15772,7 @@ The @samp{%%} is the Emacs symbol for ``read-only''; it shows that | |||
| 15772 | regular Emacs commands are not allowed to edit the stack buffer | 15772 | regular Emacs commands are not allowed to edit the stack buffer |
| 15773 | as if it were text. | 15773 | as if it were text. |
| 15774 | 15774 | ||
| 15775 | The word @samp{Calc:} changes to @samp{CalcEmbed:} if Embedded Mode | 15775 | The word @samp{Calc:} changes to @samp{CalcEmbed:} if Embedded mode |
| 15776 | is enabled. The words after this describe the various Calc modes | 15776 | is enabled. The words after this describe the various Calc modes |
| 15777 | that are in effect. | 15777 | that are in effect. |
| 15778 | 15778 | ||
| @@ -15800,7 +15800,7 @@ Symbolic mode (@kbd{m s}; @pxref{Symbolic Mode}). | |||
| 15800 | Matrix mode (@kbd{m v}; @pxref{Matrix Mode}). | 15800 | Matrix mode (@kbd{m v}; @pxref{Matrix Mode}). |
| 15801 | 15801 | ||
| 15802 | @item Matrix@var{n} | 15802 | @item Matrix@var{n} |
| 15803 | Dimensioned matrix mode (@kbd{C-u @var{n} m v}). | 15803 | Dimensioned Matrix mode (@kbd{C-u @var{n} m v}). |
| 15804 | 15804 | ||
| 15805 | @item Scalar | 15805 | @item Scalar |
| 15806 | Scalar mode (@kbd{m v}; @pxref{Matrix Mode}). | 15806 | Scalar mode (@kbd{m v}; @pxref{Matrix Mode}). |
| @@ -15815,7 +15815,7 @@ Fraction mode (@kbd{m f}; @pxref{Fraction Mode}). | |||
| 15815 | Infinite mode (@kbd{m i}; @pxref{Infinite Mode}). | 15815 | Infinite mode (@kbd{m i}; @pxref{Infinite Mode}). |
| 15816 | 15816 | ||
| 15817 | @item +Inf | 15817 | @item +Inf |
| 15818 | Positive infinite mode (@kbd{C-u 0 m i}). | 15818 | Positive Infinite mode (@kbd{C-u 0 m i}). |
| 15819 | 15819 | ||
| 15820 | @item NoSimp | 15820 | @item NoSimp |
| 15821 | Default simplifications off (@kbd{m O}; @pxref{Simplification Modes}). | 15821 | Default simplifications off (@kbd{m O}; @pxref{Simplification Modes}). |
| @@ -16023,14 +16023,14 @@ to every element of a vector. | |||
| 16023 | 16023 | ||
| 16024 | If either argument of @kbd{+} is a complex number, the result will in general | 16024 | If either argument of @kbd{+} is a complex number, the result will in general |
| 16025 | be complex. If one argument is in rectangular form and the other polar, | 16025 | be complex. If one argument is in rectangular form and the other polar, |
| 16026 | the current Polar Mode determines the form of the result. If Symbolic | 16026 | the current Polar mode determines the form of the result. If Symbolic |
| 16027 | Mode is enabled, the sum may be left as a formula if the necessary | 16027 | mode is enabled, the sum may be left as a formula if the necessary |
| 16028 | conversions for polar addition are non-trivial. | 16028 | conversions for polar addition are non-trivial. |
| 16029 | 16029 | ||
| 16030 | If both arguments of @kbd{+} are HMS forms, the forms are added according to | 16030 | If both arguments of @kbd{+} are HMS forms, the forms are added according to |
| 16031 | the usual conventions of hours-minutes-seconds notation. If one argument | 16031 | the usual conventions of hours-minutes-seconds notation. If one argument |
| 16032 | is an HMS form and the other is a number, that number is converted from | 16032 | is an HMS form and the other is a number, that number is converted from |
| 16033 | degrees or radians (depending on the current Angular Mode) to HMS format | 16033 | degrees or radians (depending on the current Angular mode) to HMS format |
| 16034 | and then the two HMS forms are added. | 16034 | and then the two HMS forms are added. |
| 16035 | 16035 | ||
| 16036 | If one argument of @kbd{+} is a date form, the other can be either a | 16036 | If one argument of @kbd{+} is a date form, the other can be either a |
| @@ -16182,7 +16182,7 @@ must be positive real number. | |||
| 16182 | @tindex fdiv | 16182 | @tindex fdiv |
| 16183 | The @kbd{:} (@code{calc-fdiv}) command [@code{fdiv} function in a formula] | 16183 | The @kbd{:} (@code{calc-fdiv}) command [@code{fdiv} function in a formula] |
| 16184 | divides the two integers on the top of the stack to produce a fractional | 16184 | divides the two integers on the top of the stack to produce a fractional |
| 16185 | result. This is a convenient shorthand for enabling Fraction Mode (with | 16185 | result. This is a convenient shorthand for enabling Fraction mode (with |
| 16186 | @kbd{m f}) temporarily and using @samp{/}. Note that during numeric entry | 16186 | @kbd{m f}) temporarily and using @samp{/}. Note that during numeric entry |
| 16187 | the @kbd{:} key is interpreted as a fraction separator, so to divide 8 by 6 | 16187 | the @kbd{:} key is interpreted as a fraction separator, so to divide 8 by 6 |
| 16188 | you would have to type @kbd{8 @key{RET} 6 @key{RET} :}. (Of course, in | 16188 | you would have to type @kbd{8 @key{RET} 6 @key{RET} :}. (Of course, in |
| @@ -16236,7 +16236,7 @@ matrix, it computes the inverse of that matrix. | |||
| 16236 | @tindex sqrt | 16236 | @tindex sqrt |
| 16237 | The @kbd{Q} (@code{calc-sqrt}) [@code{sqrt}] command computes the square | 16237 | The @kbd{Q} (@code{calc-sqrt}) [@code{sqrt}] command computes the square |
| 16238 | root of a number. For a negative real argument, the result will be a | 16238 | root of a number. For a negative real argument, the result will be a |
| 16239 | complex number whose form is determined by the current Polar Mode. | 16239 | complex number whose form is determined by the current Polar mode. |
| 16240 | 16240 | ||
| 16241 | @kindex f h | 16241 | @kindex f h |
| 16242 | @pindex calc-hypot | 16242 | @pindex calc-hypot |
| @@ -16298,7 +16298,7 @@ The @kbd{f S} (@code{calc-scale-float}) [@code{scf}] function scales a number | |||
| 16298 | by a given power of ten. Thus, @samp{scf(mant(x), xpon(x)) = x} for any | 16298 | by a given power of ten. Thus, @samp{scf(mant(x), xpon(x)) = x} for any |
| 16299 | real @samp{x}. The second argument must be an integer, but the first | 16299 | real @samp{x}. The second argument must be an integer, but the first |
| 16300 | may actually be any numeric value. For example, @samp{scf(5,-2) = 0.05} | 16300 | may actually be any numeric value. For example, @samp{scf(5,-2) = 0.05} |
| 16301 | or @samp{1:20} depending on the current Fraction Mode. | 16301 | or @samp{1:20} depending on the current Fraction mode. |
| 16302 | 16302 | ||
| 16303 | @kindex f [ | 16303 | @kindex f [ |
| 16304 | @kindex f ] | 16304 | @kindex f ] |
| @@ -16482,7 +16482,7 @@ be in the range @mathit{-180} degrees (exclusive) to @mathit{+180} degrees | |||
| 16482 | The @code{calc-imaginary} command multiplies the number on the | 16482 | The @code{calc-imaginary} command multiplies the number on the |
| 16483 | top of the stack by the imaginary number @expr{i = (0,1)}. This | 16483 | top of the stack by the imaginary number @expr{i = (0,1)}. This |
| 16484 | command is not normally bound to a key in Calc, but it is available | 16484 | command is not normally bound to a key in Calc, but it is available |
| 16485 | on the @key{IMAG} button in Keypad Mode. | 16485 | on the @key{IMAG} button in Keypad mode. |
| 16486 | 16486 | ||
| 16487 | @kindex f r | 16487 | @kindex f r |
| 16488 | @pindex calc-re | 16488 | @pindex calc-re |
| @@ -17761,7 +17761,7 @@ formulas below for symbolic arguments only when you use the @kbd{a "} | |||
| 17761 | integrals or solving equations involving the functions. | 17761 | integrals or solving equations involving the functions. |
| 17762 | 17762 | ||
| 17763 | @ifinfo | 17763 | @ifinfo |
| 17764 | These formulas are shown using the conventions of ``Big'' display | 17764 | These formulas are shown using the conventions of Big display |
| 17765 | mode (@kbd{d B}); for example, the formula for @code{fv} written | 17765 | mode (@kbd{d B}); for example, the formula for @code{fv} written |
| 17766 | linearly is @samp{pmt * ((1 + rate)^n) - 1) / rate}. | 17766 | linearly is @samp{pmt * ((1 + rate)^n) - 1) / rate}. |
| 17767 | 17767 | ||
| @@ -18217,7 +18217,7 @@ to any base. For example, @kbd{1024 @key{RET} 2 B} produces 10, since | |||
| 18217 | @infoline @expr{2^10 = 1024}. | 18217 | @infoline @expr{2^10 = 1024}. |
| 18218 | In certain cases like @samp{log(3,9)}, the result | 18218 | In certain cases like @samp{log(3,9)}, the result |
| 18219 | will be either @expr{1:2} or @expr{0.5} depending on the current Fraction | 18219 | will be either @expr{1:2} or @expr{0.5} depending on the current Fraction |
| 18220 | Mode setting. With the Inverse flag [@code{alog}], this command is | 18220 | mode setting. With the Inverse flag [@code{alog}], this command is |
| 18221 | similar to @kbd{^} except that the order of the arguments is reversed. | 18221 | similar to @kbd{^} except that the order of the arguments is reversed. |
| 18222 | 18222 | ||
| 18223 | @kindex f I | 18223 | @kindex f I |
| @@ -18273,7 +18273,7 @@ of the current angular mode. @xref{Basic Operations on Units}. | |||
| 18273 | Also, the symbolic variable @code{pi} is not ordinarily recognized in | 18273 | Also, the symbolic variable @code{pi} is not ordinarily recognized in |
| 18274 | arguments to trigonometric functions, as in @samp{sin(3 pi / 4)}, but | 18274 | arguments to trigonometric functions, as in @samp{sin(3 pi / 4)}, but |
| 18275 | the @kbd{a s} (@code{calc-simplify}) command recognizes many such | 18275 | the @kbd{a s} (@code{calc-simplify}) command recognizes many such |
| 18276 | formulas when the current angular mode is radians @emph{and} symbolic | 18276 | formulas when the current angular mode is Radians @emph{and} Symbolic |
| 18277 | mode is enabled; this example would be replaced by @samp{sqrt(2) / 2}. | 18277 | mode is enabled; this example would be replaced by @samp{sqrt(2) / 2}. |
| 18278 | @xref{Symbolic Mode}. Beware, this simplification occurs even if you | 18278 | @xref{Symbolic Mode}. Beware, this simplification occurs even if you |
| 18279 | have stored a different value in the variable @samp{pi}; this is one | 18279 | have stored a different value in the variable @samp{pi}; this is one |
| @@ -18282,7 +18282,7 @@ the form @expr{x} plus a multiple of @cpiover{2} are also simplified. | |||
| 18282 | Calc includes similar formulas for @code{cos} and @code{tan}. | 18282 | Calc includes similar formulas for @code{cos} and @code{tan}. |
| 18283 | 18283 | ||
| 18284 | The @kbd{a s} command knows all angles which are integer multiples of | 18284 | The @kbd{a s} command knows all angles which are integer multiples of |
| 18285 | @cpiover{12}, @cpiover{10}, or @cpiover{8} radians. In degrees mode, | 18285 | @cpiover{12}, @cpiover{10}, or @cpiover{8} radians. In Degrees mode, |
| 18286 | analogous simplifications occur for integer multiples of 15 or 18 | 18286 | analogous simplifications occur for integer multiples of 15 or 18 |
| 18287 | degrees, and for arguments plus multiples of 90 degrees. | 18287 | degrees, and for arguments plus multiples of 90 degrees. |
| 18288 | 18288 | ||
| @@ -18633,7 +18633,7 @@ For @samp{arctanh(z)}: This is defined by @samp{(ln(1+z) - ln(1-z)) / 2}. | |||
| 18633 | The branch cuts are on the real axis, less than @mathit{-1} and greater than 1. | 18633 | The branch cuts are on the real axis, less than @mathit{-1} and greater than 1. |
| 18634 | 18634 | ||
| 18635 | The following tables for @code{arcsin}, @code{arccos}, and | 18635 | The following tables for @code{arcsin}, @code{arccos}, and |
| 18636 | @code{arctan} assume the current angular mode is radians. The | 18636 | @code{arctan} assume the current angular mode is Radians. The |
| 18637 | hyperbolic functions operate independently of the angular mode. | 18637 | hyperbolic functions operate independently of the angular mode. |
| 18638 | 18638 | ||
| 18639 | @smallexample | 18639 | @smallexample |
| @@ -19478,7 +19478,7 @@ Note that the prefix argument can have an effect even when the input is | |||
| 19478 | not a vector. For example, if the input is the number @mathit{-5}, then | 19478 | not a vector. For example, if the input is the number @mathit{-5}, then |
| 19479 | @kbd{c-u -1 v u} yields @mathit{-5} and 0 (the components of @mathit{-5} | 19479 | @kbd{c-u -1 v u} yields @mathit{-5} and 0 (the components of @mathit{-5} |
| 19480 | when viewed as a rectangular complex number); @kbd{C-u -2 v u} yields 5 | 19480 | when viewed as a rectangular complex number); @kbd{C-u -2 v u} yields 5 |
| 19481 | and 180 (assuming degrees mode); and @kbd{C-u -10 v u} yields @mathit{-5} | 19481 | and 180 (assuming Degrees mode); and @kbd{C-u -10 v u} yields @mathit{-5} |
| 19482 | and 1 (the numerator and denominator of @mathit{-5}, viewed as a rational | 19482 | and 1 (the numerator and denominator of @mathit{-5}, viewed as a rational |
| 19483 | number). Plain @kbd{v u} with this input would complain that the input | 19483 | number). Plain @kbd{v u} with this input would complain that the input |
| 19484 | is not a composite object. | 19484 | is not a composite object. |
| @@ -19608,7 +19608,7 @@ such generic identity matrices, and if one is combined with a matrix | |||
| 19608 | whose size is known, it is converted automatically to an identity | 19608 | whose size is known, it is converted automatically to an identity |
| 19609 | matrix of a suitable matching size. The @kbd{v i} command with an | 19609 | matrix of a suitable matching size. The @kbd{v i} command with an |
| 19610 | argument of zero creates a generic identity matrix, @samp{idn(1)}. | 19610 | argument of zero creates a generic identity matrix, @samp{idn(1)}. |
| 19611 | Note that in dimensioned matrix mode (@pxref{Matrix Mode}), generic | 19611 | Note that in dimensioned Matrix mode (@pxref{Matrix Mode}), generic |
| 19612 | identity matrices are immediately expanded to the current default | 19612 | identity matrices are immediately expanded to the current default |
| 19613 | dimensions. | 19613 | dimensions. |
| 19614 | 19614 | ||
| @@ -21265,11 +21265,11 @@ for anything else'') prefix. | |||
| 21265 | using regular Emacs editing commands. | 21265 | using regular Emacs editing commands. |
| 21266 | 21266 | ||
| 21267 | When doing algebraic work, you may find several of the Calculator's | 21267 | When doing algebraic work, you may find several of the Calculator's |
| 21268 | modes to be helpful, including algebraic-simplification mode (@kbd{m A}) | 21268 | modes to be helpful, including Algebraic Simplification mode (@kbd{m A}) |
| 21269 | or no-simplification mode (@kbd{m O}), | 21269 | or No-Simplification mode (@kbd{m O}), |
| 21270 | algebraic-entry mode (@kbd{m a}), fraction mode (@kbd{m f}), and | 21270 | Algebraic entry mode (@kbd{m a}), Fraction mode (@kbd{m f}), and |
| 21271 | symbolic mode (@kbd{m s}). @xref{Mode Settings}, for discussions | 21271 | Symbolic mode (@kbd{m s}). @xref{Mode Settings}, for discussions |
| 21272 | of these modes. You may also wish to select ``big'' display mode (@kbd{d B}). | 21272 | of these modes. You may also wish to select Big display mode (@kbd{d B}). |
| 21273 | @xref{Normal Language Modes}. | 21273 | @xref{Normal Language Modes}. |
| 21274 | 21274 | ||
| 21275 | @menu | 21275 | @menu |
| @@ -21323,7 +21323,7 @@ sub-formula, and press @w{@kbd{j s}} (@code{calc-select-here}). Calc will | |||
| 21323 | highlight the smallest portion of the formula that contains that | 21323 | highlight the smallest portion of the formula that contains that |
| 21324 | character. By default the sub-formula is highlighted by blanking out | 21324 | character. By default the sub-formula is highlighted by blanking out |
| 21325 | all of the rest of the formula with dots. Selection works in any | 21325 | all of the rest of the formula with dots. Selection works in any |
| 21326 | display mode but is perhaps easiest in ``big'' (@kbd{d B}) mode. | 21326 | display mode but is perhaps easiest in Big mode (@kbd{d B}). |
| 21327 | Suppose you enter the following formula: | 21327 | Suppose you enter the following formula: |
| 21328 | 21328 | ||
| 21329 | @smallexample | 21329 | @smallexample |
| @@ -21353,7 +21353,7 @@ to | |||
| 21353 | Every character not part of the sub-formula @samp{b} has been changed | 21353 | Every character not part of the sub-formula @samp{b} has been changed |
| 21354 | to a dot. The @samp{*} next to the line number is to remind you that | 21354 | to a dot. The @samp{*} next to the line number is to remind you that |
| 21355 | the formula has a portion of it selected. (In this case, it's very | 21355 | the formula has a portion of it selected. (In this case, it's very |
| 21356 | obvious, but it might not always be. If Embedded Mode is enabled, | 21356 | obvious, but it might not always be. If Embedded mode is enabled, |
| 21357 | the word @samp{Sel} also appears in the mode line because the stack | 21357 | the word @samp{Sel} also appears in the mode line because the stack |
| 21358 | may not be visible. @pxref{Embedded Mode}.) | 21358 | may not be visible. @pxref{Embedded Mode}.) |
| 21359 | 21359 | ||
| @@ -22003,9 +22003,9 @@ but which also substitutes stored values for variables in the formula. | |||
| 22003 | Use @kbd{a v} if you want the variables to ignore their stored values. | 22003 | Use @kbd{a v} if you want the variables to ignore their stored values. |
| 22004 | 22004 | ||
| 22005 | If you give a numeric prefix argument of 2 to @kbd{a v}, it simplifies | 22005 | If you give a numeric prefix argument of 2 to @kbd{a v}, it simplifies |
| 22006 | as if in algebraic simplification mode. This is equivalent to typing | 22006 | as if in Algebraic Simplification mode. This is equivalent to typing |
| 22007 | @kbd{a s}; @pxref{Simplifying Formulas}. If you give a numeric prefix | 22007 | @kbd{a s}; @pxref{Simplifying Formulas}. If you give a numeric prefix |
| 22008 | of 3 or more, it uses extended simplification mode (@kbd{a e}). | 22008 | of 3 or more, it uses Extended Simplification mode (@kbd{a e}). |
| 22009 | 22009 | ||
| 22010 | If you give a negative prefix argument @mathit{-1}, @mathit{-2}, or @mathit{-3}, | 22010 | If you give a negative prefix argument @mathit{-1}, @mathit{-2}, or @mathit{-3}, |
| 22011 | it simplifies in the corresponding mode but only works on the top-level | 22011 | it simplifies in the corresponding mode but only works on the top-level |
| @@ -22013,7 +22013,7 @@ function call of the formula. For example, @samp{(2 + 3) * (2 + 3)} will | |||
| 22013 | simplify to @samp{(2 + 3)^2}, without simplifying the sub-formulas | 22013 | simplify to @samp{(2 + 3)^2}, without simplifying the sub-formulas |
| 22014 | @samp{2 + 3}. As another example, typing @kbd{V R +} to sum the vector | 22014 | @samp{2 + 3}. As another example, typing @kbd{V R +} to sum the vector |
| 22015 | @samp{[1, 2, 3, 4]} produces the formula @samp{reduce(add, [1, 2, 3, 4])} | 22015 | @samp{[1, 2, 3, 4]} produces the formula @samp{reduce(add, [1, 2, 3, 4])} |
| 22016 | in no-simplify mode. Using @kbd{a v} will evaluate this all the way to | 22016 | in No-Simplify mode. Using @kbd{a v} will evaluate this all the way to |
| 22017 | 10; using @kbd{C-u - a v} will evaluate it only to @samp{1 + 2 + 3 + 4}. | 22017 | 10; using @kbd{C-u - a v} will evaluate it only to @samp{1 + 2 + 3 + 4}. |
| 22018 | (@xref{Reducing and Mapping}.) | 22018 | (@xref{Reducing and Mapping}.) |
| 22019 | 22019 | ||
| @@ -22021,7 +22021,7 @@ in no-simplify mode. Using @kbd{a v} will evaluate this all the way to | |||
| 22021 | @tindex evalvn | 22021 | @tindex evalvn |
| 22022 | The @kbd{=} command corresponds to the @code{evalv} function, and | 22022 | The @kbd{=} command corresponds to the @code{evalv} function, and |
| 22023 | the related @kbd{N} command, which is like @kbd{=} but temporarily | 22023 | the related @kbd{N} command, which is like @kbd{=} but temporarily |
| 22024 | disables symbolic (@kbd{m s}) mode during the evaluation, corresponds | 22024 | disables Symbolic mode (@kbd{m s}) during the evaluation, corresponds |
| 22025 | to the @code{evalvn} function. (These commands interpret their prefix | 22025 | to the @code{evalvn} function. (These commands interpret their prefix |
| 22026 | arguments differently than @kbd{a v}; @kbd{=} treats the prefix as | 22026 | arguments differently than @kbd{a v}; @kbd{=} treats the prefix as |
| 22027 | the number of stack elements to evaluate at once, and @kbd{N} treats | 22027 | the number of stack elements to evaluate at once, and @kbd{N} treats |
| @@ -22196,7 +22196,7 @@ is evaluated to @expr{3}. Evaluation does not occur if the arguments | |||
| 22196 | to a function are somehow of the wrong type @expr{@t{tan}([2,3,4])}), | 22196 | to a function are somehow of the wrong type @expr{@t{tan}([2,3,4])}), |
| 22197 | range (@expr{@t{tan}(90)}), or number (@expr{@t{tan}(3,5)}), | 22197 | range (@expr{@t{tan}(90)}), or number (@expr{@t{tan}(3,5)}), |
| 22198 | or if the function name is not recognized (@expr{@t{f}(5)}), or if | 22198 | or if the function name is not recognized (@expr{@t{f}(5)}), or if |
| 22199 | ``symbolic'' mode (@pxref{Symbolic Mode}) prevents evaluation | 22199 | Symbolic mode (@pxref{Symbolic Mode}) prevents evaluation |
| 22200 | (@expr{@t{sqrt}(2)}). | 22200 | (@expr{@t{sqrt}(2)}). |
| 22201 | 22201 | ||
| 22202 | Calc simplifies (evaluates) the arguments to a function before it | 22202 | Calc simplifies (evaluates) the arguments to a function before it |
| @@ -22304,7 +22304,7 @@ to @expr{-a}. | |||
| 22304 | The products @expr{1 a} and @expr{a 1} are simplified to @expr{a}; | 22304 | The products @expr{1 a} and @expr{a 1} are simplified to @expr{a}; |
| 22305 | @expr{(-1) a} and @expr{a (-1)} are simplified to @expr{-a}; | 22305 | @expr{(-1) a} and @expr{a (-1)} are simplified to @expr{-a}; |
| 22306 | @expr{0 a} and @expr{a 0} are simplified to @expr{0}, except that | 22306 | @expr{0 a} and @expr{a 0} are simplified to @expr{0}, except that |
| 22307 | in matrix mode where @expr{a} is not provably scalar the result | 22307 | in Matrix mode where @expr{a} is not provably scalar the result |
| 22308 | is the generic zero matrix @samp{idn(0)}, and that if @expr{a} is | 22308 | is the generic zero matrix @samp{idn(0)}, and that if @expr{a} is |
| 22309 | infinite the result is @samp{nan}. | 22309 | infinite the result is @samp{nan}. |
| 22310 | 22310 | ||
| @@ -22330,18 +22330,18 @@ or the implicit one-half of @expr{@t{sqrt}(x)}, and similarly for | |||
| 22330 | @expr{b}. The result is written using @samp{sqrt} or @samp{1/sqrt} | 22330 | @expr{b}. The result is written using @samp{sqrt} or @samp{1/sqrt} |
| 22331 | if the sum of the powers is @expr{1/2} or @expr{-1/2}, respectively. | 22331 | if the sum of the powers is @expr{1/2} or @expr{-1/2}, respectively. |
| 22332 | If the sum of the powers is zero, the product is simplified to | 22332 | If the sum of the powers is zero, the product is simplified to |
| 22333 | @expr{1} or to @samp{idn(1)} if matrix mode is enabled. | 22333 | @expr{1} or to @samp{idn(1)} if Matrix mode is enabled. |
| 22334 | 22334 | ||
| 22335 | The product of a negative power times anything but another negative | 22335 | The product of a negative power times anything but another negative |
| 22336 | power is changed to use division: | 22336 | power is changed to use division: |
| 22337 | @texline @math{x^{-2} y} | 22337 | @texline @math{x^{-2} y} |
| 22338 | @infoline @expr{x^(-2) y} | 22338 | @infoline @expr{x^(-2) y} |
| 22339 | goes to @expr{y / x^2} unless matrix mode is | 22339 | goes to @expr{y / x^2} unless Matrix mode is |
| 22340 | in effect and neither @expr{x} nor @expr{y} are scalar (in which | 22340 | in effect and neither @expr{x} nor @expr{y} are scalar (in which |
| 22341 | case it is considered unsafe to rearrange the order of the terms). | 22341 | case it is considered unsafe to rearrange the order of the terms). |
| 22342 | 22342 | ||
| 22343 | Finally, @expr{a (b/c)} is rewritten to @expr{(a b)/c}, and also | 22343 | Finally, @expr{a (b/c)} is rewritten to @expr{(a b)/c}, and also |
| 22344 | @expr{(a/b) c} is changed to @expr{(a c)/b} unless in matrix mode. | 22344 | @expr{(a/b) c} is changed to @expr{(a c)/b} unless in Matrix mode. |
| 22345 | 22345 | ||
| 22346 | @tex | 22346 | @tex |
| 22347 | \bigskip | 22347 | \bigskip |
| @@ -22368,7 +22368,7 @@ for any power @expr{c}. | |||
| 22368 | 22368 | ||
| 22369 | Also, @expr{(-a) / b} and @expr{a / (-b)} go to @expr{-(a/b)}; | 22369 | Also, @expr{(-a) / b} and @expr{a / (-b)} go to @expr{-(a/b)}; |
| 22370 | @expr{(a/b) / c} goes to @expr{a / (b c)}; and @expr{a / (b/c)} | 22370 | @expr{(a/b) / c} goes to @expr{a / (b c)}; and @expr{a / (b/c)} |
| 22371 | goes to @expr{(a c) / b} unless matrix mode prevents this | 22371 | goes to @expr{(a c) / b} unless Matrix mode prevents this |
| 22372 | rearrangement. Similarly, @expr{a / (b:c)} is simplified to | 22372 | rearrangement. Similarly, @expr{a / (b:c)} is simplified to |
| 22373 | @expr{(c:b) a} for any fraction @expr{b:c}. | 22373 | @expr{(c:b) a} for any fraction @expr{b:c}. |
| 22374 | 22374 | ||
| @@ -22392,7 +22392,7 @@ to @expr{a / (c - b)}, and @expr{(a - b) / (-c)} to @expr{(b - a) / c}. | |||
| 22392 | @end tex | 22392 | @end tex |
| 22393 | 22393 | ||
| 22394 | The formula @expr{x^0} is simplified to @expr{1}, or to @samp{idn(1)} | 22394 | The formula @expr{x^0} is simplified to @expr{1}, or to @samp{idn(1)} |
| 22395 | in matrix mode. The formula @expr{0^x} is simplified to @expr{0} | 22395 | in Matrix mode. The formula @expr{0^x} is simplified to @expr{0} |
| 22396 | unless @expr{x} is a negative number or complex number, in which | 22396 | unless @expr{x} is a negative number or complex number, in which |
| 22397 | case the result is an infinity or an unsimplified formula according | 22397 | case the result is an infinity or an unsimplified formula according |
| 22398 | to the current infinite mode. Note that @expr{0^0} is an | 22398 | to the current infinite mode. Note that @expr{0^0} is an |
| @@ -22568,7 +22568,7 @@ property that real-valued numbers, interval forms and infinities | |||
| 22568 | come first, and are sorted into increasing order. The @kbd{V S} | 22568 | come first, and are sorted into increasing order. The @kbd{V S} |
| 22569 | command uses the same ordering when sorting a vector. | 22569 | command uses the same ordering when sorting a vector. |
| 22570 | 22570 | ||
| 22571 | Sorting of terms of products is inhibited when matrix mode is | 22571 | Sorting of terms of products is inhibited when Matrix mode is |
| 22572 | turned on; in this case, Calc will never exchange the order of | 22572 | turned on; in this case, Calc will never exchange the order of |
| 22573 | two terms unless it knows at least one of the terms is a scalar. | 22573 | two terms unless it knows at least one of the terms is a scalar. |
| 22574 | 22574 | ||
| @@ -23176,7 +23176,7 @@ With a numeric prefix argument @var{n}, this command computes the | |||
| 23176 | @var{n}th derivative. | 23176 | @var{n}th derivative. |
| 23177 | 23177 | ||
| 23178 | When working with trigonometric functions, it is best to switch to | 23178 | When working with trigonometric functions, it is best to switch to |
| 23179 | radians mode first (with @w{@kbd{m r}}). The derivative of @samp{sin(x)} | 23179 | Radians mode first (with @w{@kbd{m r}}). The derivative of @samp{sin(x)} |
| 23180 | in degrees is @samp{(pi/180) cos(x)}, probably not the expected | 23180 | in degrees is @samp{(pi/180) cos(x)}, probably not the expected |
| 23181 | answer! | 23181 | answer! |
| 23182 | 23182 | ||
| @@ -23267,7 +23267,7 @@ due to a different choice of constant of integration. | |||
| 23267 | 23267 | ||
| 23268 | The Calculator remembers all the integrals it has done. If conditions | 23268 | The Calculator remembers all the integrals it has done. If conditions |
| 23269 | change in a way that would invalidate the old integrals, say, a switch | 23269 | change in a way that would invalidate the old integrals, say, a switch |
| 23270 | from degrees to radians mode, then they will be thrown out. If you | 23270 | from Degrees to Radians mode, then they will be thrown out. If you |
| 23271 | suspect this is not happening when it should, use the | 23271 | suspect this is not happening when it should, use the |
| 23272 | @code{calc-flush-caches} command; @pxref{Caches}. | 23272 | @code{calc-flush-caches} command; @pxref{Caches}. |
| 23273 | 23273 | ||
| @@ -23626,10 +23626,10 @@ which can be solved for @expr{x^3} using the quadratic equation, and then | |||
| 23626 | for @expr{x} by taking cube roots. But in many cases, like | 23626 | for @expr{x} by taking cube roots. But in many cases, like |
| 23627 | @expr{x^6 + x + 1}, Calc does not know how to rewrite the polynomial | 23627 | @expr{x^6 + x + 1}, Calc does not know how to rewrite the polynomial |
| 23628 | into a form it can solve. The @kbd{a P} command can still deliver a | 23628 | into a form it can solve. The @kbd{a P} command can still deliver a |
| 23629 | list of numerical roots, however, provided that symbolic mode (@kbd{m s}) | 23629 | list of numerical roots, however, provided that Symbolic mode (@kbd{m s}) |
| 23630 | is not turned on. (If you work with symbolic mode on, recall that the | 23630 | is not turned on. (If you work with Symbolic mode on, recall that the |
| 23631 | @kbd{N} (@code{calc-eval-num}) key is a handy way to reevaluate the | 23631 | @kbd{N} (@code{calc-eval-num}) key is a handy way to reevaluate the |
| 23632 | formula on the stack with symbolic mode temporarily off.) Naturally, | 23632 | formula on the stack with Symbolic mode temporarily off.) Naturally, |
| 23633 | @kbd{a P} can only provide numerical roots if the polynomial coefficients | 23633 | @kbd{a P} can only provide numerical roots if the polynomial coefficients |
| 23634 | are all numbers (real or complex). | 23634 | are all numbers (real or complex). |
| 23635 | 23635 | ||
| @@ -24244,9 +24244,9 @@ Note that since the constant and linear terms are enough to fit the | |||
| 24244 | data exactly, it's no surprise that Calc chose a tiny contribution | 24244 | data exactly, it's no surprise that Calc chose a tiny contribution |
| 24245 | for @expr{x^2}. (The fact that it's not exactly zero is due only | 24245 | for @expr{x^2}. (The fact that it's not exactly zero is due only |
| 24246 | to roundoff error. Since our data are exact integers, we could get | 24246 | to roundoff error. Since our data are exact integers, we could get |
| 24247 | an exact answer by typing @kbd{m f} first to get fraction mode. | 24247 | an exact answer by typing @kbd{m f} first to get Fraction mode. |
| 24248 | Then the @expr{x^2} term would vanish altogether. Usually, though, | 24248 | Then the @expr{x^2} term would vanish altogether. Usually, though, |
| 24249 | the data being fitted will be approximate floats so fraction mode | 24249 | the data being fitted will be approximate floats so Fraction mode |
| 24250 | won't help.) | 24250 | won't help.) |
| 24251 | 24251 | ||
| 24252 | Doing the @kbd{a F 2} fit on the data set with 14 instead of 13 | 24252 | Doing the @kbd{a F 2} fit on the data set with 14 instead of 13 |
| @@ -24271,7 +24271,7 @@ The actual coefficients we get with a precision of 12, like | |||
| 24271 | @expr{0.0416666663588}, clearly suffer from loss of precision. | 24271 | @expr{0.0416666663588}, clearly suffer from loss of precision. |
| 24272 | It is a good idea to increase the working precision to several | 24272 | It is a good idea to increase the working precision to several |
| 24273 | digits beyond what you need when you do a fitting operation. | 24273 | digits beyond what you need when you do a fitting operation. |
| 24274 | Or, if your data are exact, use fraction mode to get exact | 24274 | Or, if your data are exact, use Fraction mode to get exact |
| 24275 | results. | 24275 | results. |
| 24276 | 24276 | ||
| 24277 | You can type @kbd{i} instead of a digit at the model prompt to fit | 24277 | You can type @kbd{i} instead of a digit at the model prompt to fit |
| @@ -25942,12 +25942,12 @@ like @samp{(x + y) + (z - w)}, are not tried. | |||
| 25942 | 25942 | ||
| 25943 | Note that @samp{*} is not commutative when applied to matrices, but | 25943 | Note that @samp{*} is not commutative when applied to matrices, but |
| 25944 | rewrite rules pretend that it is. If you type @kbd{m v} to enable | 25944 | rewrite rules pretend that it is. If you type @kbd{m v} to enable |
| 25945 | matrix mode (@pxref{Matrix Mode}), rewrite rules will match @samp{*} | 25945 | Matrix mode (@pxref{Matrix Mode}), rewrite rules will match @samp{*} |
| 25946 | literally, ignoring its usual commutativity property. (In the | 25946 | literally, ignoring its usual commutativity property. (In the |
| 25947 | current implementation, the associativity also vanishes---it is as | 25947 | current implementation, the associativity also vanishes---it is as |
| 25948 | if the pattern had been enclosed in a @code{plain} marker; see below.) | 25948 | if the pattern had been enclosed in a @code{plain} marker; see below.) |
| 25949 | If you are applying rewrites to formulas with matrices, it's best to | 25949 | If you are applying rewrites to formulas with matrices, it's best to |
| 25950 | enable matrix mode first to prevent algebraically incorrect rewrites | 25950 | enable Matrix mode first to prevent algebraically incorrect rewrites |
| 25951 | from occurring. | 25951 | from occurring. |
| 25952 | 25952 | ||
| 25953 | The pattern @samp{-x} will actually match any expression. For example, | 25953 | The pattern @samp{-x} will actually match any expression. For example, |
| @@ -26424,8 +26424,8 @@ You must use @code{apply} for meta-variables with function names | |||
| 26424 | on both sides of a rewrite rule: @samp{apply(f, [x]) := f(x+1)} | 26424 | on both sides of a rewrite rule: @samp{apply(f, [x]) := f(x+1)} |
| 26425 | is @emph{not} correct, because it rewrites @samp{spam(6)} into | 26425 | is @emph{not} correct, because it rewrites @samp{spam(6)} into |
| 26426 | @samp{f(7)}. The righthand side should be @samp{apply(f, [x+1])}. | 26426 | @samp{f(7)}. The righthand side should be @samp{apply(f, [x+1])}. |
| 26427 | Also note that you will have to use no-simplify (@kbd{m O}) | 26427 | Also note that you will have to use No-Simplify mode (@kbd{m O}) |
| 26428 | mode when entering this rule so that the @code{apply} isn't | 26428 | when entering this rule so that the @code{apply} isn't |
| 26429 | evaluated immediately to get the new rule @samp{f(x) := f(x+1)}. | 26429 | evaluated immediately to get the new rule @samp{f(x) := f(x+1)}. |
| 26430 | Or, use @kbd{s e} to enter the rule without going through the stack, | 26430 | Or, use @kbd{s e} to enter the rule without going through the stack, |
| 26431 | or enter the rule as @samp{apply(f, [x]) := apply(f, [x+1]) @w{:: 1}}. | 26431 | or enter the rule as @samp{apply(f, [x]) := apply(f, [x+1]) @w{:: 1}}. |
| @@ -27160,7 +27160,7 @@ To apply these manually, you could put them in a variable called | |||
| 27160 | to expand trig functions. But if instead you store them in the | 27160 | to expand trig functions. But if instead you store them in the |
| 27161 | variable @code{EvalRules}, they will automatically be applied to all | 27161 | variable @code{EvalRules}, they will automatically be applied to all |
| 27162 | sines and cosines of sums. Then, with @samp{2 x} and @samp{45} on | 27162 | sines and cosines of sums. Then, with @samp{2 x} and @samp{45} on |
| 27163 | the stack, typing @kbd{+ S} will (assuming degrees mode) result in | 27163 | the stack, typing @kbd{+ S} will (assuming Degrees mode) result in |
| 27164 | @samp{0.7071 sin(2 x) + 0.7071 cos(2 x)} automatically. | 27164 | @samp{0.7071 sin(2 x) + 0.7071 cos(2 x)} automatically. |
| 27165 | 27165 | ||
| 27166 | As each level of a formula is evaluated, the rules from | 27166 | As each level of a formula is evaluated, the rules from |
| @@ -27236,11 +27236,11 @@ number @expr{(2, 3)}, Calc computes @samp{sqrt(2*2 + 3*3)} by calling | |||
| 27236 | the multiplication, addition, and square root functions directly rather | 27236 | the multiplication, addition, and square root functions directly rather |
| 27237 | than applying the default simplifications to this formula. So an | 27237 | than applying the default simplifications to this formula. So an |
| 27238 | @code{EvalRules} rule that (perversely) rewrites @samp{sqrt(13) := 6} | 27238 | @code{EvalRules} rule that (perversely) rewrites @samp{sqrt(13) := 6} |
| 27239 | would not apply. (However, if you put Calc into symbolic mode so that | 27239 | would not apply. (However, if you put Calc into Symbolic mode so that |
| 27240 | @samp{sqrt(13)} will be left in symbolic form by the built-in square | 27240 | @samp{sqrt(13)} will be left in symbolic form by the built-in square |
| 27241 | root function, your rule will be able to apply. But if the complex | 27241 | root function, your rule will be able to apply. But if the complex |
| 27242 | number were @expr{(3,4)}, so that @samp{sqrt(25)} must be calculated, | 27242 | number were @expr{(3,4)}, so that @samp{sqrt(25)} must be calculated, |
| 27243 | then symbolic mode will not help because @samp{sqrt(25)} can be | 27243 | then Symbolic mode will not help because @samp{sqrt(25)} can be |
| 27244 | evaluated exactly to 5.) | 27244 | evaluated exactly to 5.) |
| 27245 | 27245 | ||
| 27246 | One subtle restriction that normally only manifests itself with | 27246 | One subtle restriction that normally only manifests itself with |
| @@ -27347,7 +27347,7 @@ A surprisingly useful rewrite rule is @samp{a/(b-c) := a*(b+c)/(b^2-c^2)}. | |||
| 27347 | This will simplify the formula whenever @expr{b} and/or @expr{c} can | 27347 | This will simplify the formula whenever @expr{b} and/or @expr{c} can |
| 27348 | be made simpler by squaring. For example, applying this rule to | 27348 | be made simpler by squaring. For example, applying this rule to |
| 27349 | @samp{2 / (sqrt(2) + 3)} yields @samp{6:7 - 2:7 sqrt(2)} (assuming | 27349 | @samp{2 / (sqrt(2) + 3)} yields @samp{6:7 - 2:7 sqrt(2)} (assuming |
| 27350 | Symbolic Mode has been enabled to keep the square root from being | 27350 | Symbolic mode has been enabled to keep the square root from being |
| 27351 | evaluated to a floating-point approximation). This rule is also | 27351 | evaluated to a floating-point approximation). This rule is also |
| 27352 | useful when working with symbolic complex numbers, e.g., | 27352 | useful when working with symbolic complex numbers, e.g., |
| 27353 | @samp{(a + b i) / (c + d i)}. | 27353 | @samp{(a + b i) / (c + d i)}. |
| @@ -27457,7 +27457,7 @@ formula @samp{1 mm} is ``simplified'' to @samp{mm}. This is only a | |||
| 27457 | display anomaly, however; @samp{mm} will work just fine as a | 27457 | display anomaly, however; @samp{mm} will work just fine as a |
| 27458 | representation of one millimeter. | 27458 | representation of one millimeter. |
| 27459 | 27459 | ||
| 27460 | You may find that Algebraic Mode (@pxref{Algebraic Entry}) makes working | 27460 | You may find that Algebraic mode (@pxref{Algebraic Entry}) makes working |
| 27461 | with units expressions easier. Otherwise, you will have to remember | 27461 | with units expressions easier. Otherwise, you will have to remember |
| 27462 | to hit the apostrophe key every time you wish to enter units. | 27462 | to hit the apostrophe key every time you wish to enter units. |
| 27463 | 27463 | ||
| @@ -28346,11 +28346,11 @@ including the current simplification mode. Recall that the | |||
| 28346 | formula @samp{x + y + x} is not handled by Calc's default | 28346 | formula @samp{x + y + x} is not handled by Calc's default |
| 28347 | simplifications, but the @kbd{a s} command will reduce it to | 28347 | simplifications, but the @kbd{a s} command will reduce it to |
| 28348 | the simpler form @samp{y + 2 x}. You can also type @kbd{m A} | 28348 | the simpler form @samp{y + 2 x}. You can also type @kbd{m A} |
| 28349 | to enable an algebraic-simplification mode in which the | 28349 | to enable an Algebraic Simplification mode in which the |
| 28350 | equivalent of @kbd{a s} is used on all of Calc's results. | 28350 | equivalent of @kbd{a s} is used on all of Calc's results. |
| 28351 | If you enter @samp{x + y + x =>} normally, the result will | 28351 | If you enter @samp{x + y + x =>} normally, the result will |
| 28352 | be @samp{x + y + x => x + y + x}. If you change to | 28352 | be @samp{x + y + x => x + y + x}. If you change to |
| 28353 | algebraic-simplification mode, the result will be | 28353 | Algebraic Simplification mode, the result will be |
| 28354 | @samp{x + y + x => y + 2 x}. However, just pressing @kbd{a s} | 28354 | @samp{x + y + x => y + 2 x}. However, just pressing @kbd{a s} |
| 28355 | once will have no effect on @samp{x + y + x => x + y + x}, | 28355 | once will have no effect on @samp{x + y + x => x + y + x}, |
| 28356 | because the righthand side depends only on the lefthand side | 28356 | because the righthand side depends only on the lefthand side |
| @@ -28389,13 +28389,13 @@ side effects. | |||
| 28389 | @pindex calc-assign | 28389 | @pindex calc-assign |
| 28390 | @tindex assign | 28390 | @tindex assign |
| 28391 | @tindex := | 28391 | @tindex := |
| 28392 | Embedded Mode also uses @samp{=>} operators. In embedded mode, | 28392 | Embedded mode also uses @samp{=>} operators. In Embedded mode, |
| 28393 | the lefthand side of an @samp{=>} operator can refer to variables | 28393 | the lefthand side of an @samp{=>} operator can refer to variables |
| 28394 | assigned elsewhere in the file by @samp{:=} operators. The | 28394 | assigned elsewhere in the file by @samp{:=} operators. The |
| 28395 | assignment operator @samp{a := 17} does not actually do anything | 28395 | assignment operator @samp{a := 17} does not actually do anything |
| 28396 | by itself. But Embedded Mode recognizes it and marks it as a sort | 28396 | by itself. But Embedded mode recognizes it and marks it as a sort |
| 28397 | of file-local definition of the variable. You can enter @samp{:=} | 28397 | of file-local definition of the variable. You can enter @samp{:=} |
| 28398 | operators in algebraic mode, or by using the @kbd{s :} | 28398 | operators in Algebraic mode, or by using the @kbd{s :} |
| 28399 | (@code{calc-assign}) [@code{assign}] command which takes a variable | 28399 | (@code{calc-assign}) [@code{assign}] command which takes a variable |
| 28400 | and value from the stack and replaces them with an assignment. | 28400 | and value from the stack and replaces them with an assignment. |
| 28401 | 28401 | ||
| @@ -29096,7 +29096,7 @@ killing GNUPLOT because you think it has gotten stuck. | |||
| 29096 | The commands in this chapter move information between the Calculator and | 29096 | The commands in this chapter move information between the Calculator and |
| 29097 | other Emacs editing buffers. | 29097 | other Emacs editing buffers. |
| 29098 | 29098 | ||
| 29099 | In many cases Embedded Mode is an easier and more natural way to | 29099 | In many cases Embedded mode is an easier and more natural way to |
| 29100 | work with Calc from a regular editing buffer. @xref{Embedded Mode}. | 29100 | work with Calc from a regular editing buffer. @xref{Embedded Mode}. |
| 29101 | 29101 | ||
| 29102 | @menu | 29102 | @menu |
| @@ -29367,7 +29367,7 @@ just by double-clicking on it in the shell, then middle-clicking | |||
| 29367 | in the Calc window. | 29367 | in the Calc window. |
| 29368 | 29368 | ||
| 29369 | @node Keypad Mode, Embedded Mode, Kill and Yank, Introduction | 29369 | @node Keypad Mode, Embedded Mode, Kill and Yank, Introduction |
| 29370 | @chapter ``Keypad'' Mode | 29370 | @chapter Keypad Mode |
| 29371 | 29371 | ||
| 29372 | @noindent | 29372 | @noindent |
| 29373 | @kindex M-# k | 29373 | @kindex M-# k |
| @@ -29376,7 +29376,7 @@ The @kbd{M-# k} (@code{calc-keypad}) command starts the Calculator | |||
| 29376 | and displays a picture of a calculator-style keypad. If you are using | 29376 | and displays a picture of a calculator-style keypad. If you are using |
| 29377 | the X window system, you can click on any of the ``keys'' in the | 29377 | the X window system, you can click on any of the ``keys'' in the |
| 29378 | keypad using the left mouse button to operate the calculator. | 29378 | keypad using the left mouse button to operate the calculator. |
| 29379 | The original window remains the selected window; in keypad mode | 29379 | The original window remains the selected window; in Keypad mode |
| 29380 | you can type in your file while simultaneously performing | 29380 | you can type in your file while simultaneously performing |
| 29381 | calculations with the mouse. | 29381 | calculations with the mouse. |
| 29382 | 29382 | ||
| @@ -29392,11 +29392,11 @@ the @samp{*Calc Keypad*} window, place the cursor on the desired | |||
| 29392 | ``key,'' and type @key{SPC} or @key{RET}. If you think this | 29392 | ``key,'' and type @key{SPC} or @key{RET}. If you think this |
| 29393 | is easier than using Calc normally, go right ahead. | 29393 | is easier than using Calc normally, go right ahead. |
| 29394 | 29394 | ||
| 29395 | Calc commands are more or less the same in keypad mode. Certain | 29395 | Calc commands are more or less the same in Keypad mode. Certain |
| 29396 | keypad keys differ slightly from the corresponding normal Calc | 29396 | keypad keys differ slightly from the corresponding normal Calc |
| 29397 | keystrokes; all such deviations are described below. | 29397 | keystrokes; all such deviations are described below. |
| 29398 | 29398 | ||
| 29399 | Keypad Mode includes many more commands than will fit on the keypad | 29399 | Keypad mode includes many more commands than will fit on the keypad |
| 29400 | at once. Click the right mouse button [@code{calc-keypad-menu}] | 29400 | at once. Click the right mouse button [@code{calc-keypad-menu}] |
| 29401 | to switch to the next menu. The bottom five rows of the keypad | 29401 | to switch to the next menu. The bottom five rows of the keypad |
| 29402 | stay the same; the top three rows change to a new set of commands. | 29402 | stay the same; the top three rows change to a new set of commands. |
| @@ -29444,7 +29444,7 @@ original buffer. | |||
| 29444 | @end smallexample | 29444 | @end smallexample |
| 29445 | 29445 | ||
| 29446 | @noindent | 29446 | @noindent |
| 29447 | This is the menu that appears the first time you start Keypad Mode. | 29447 | This is the menu that appears the first time you start Keypad mode. |
| 29448 | It will show up in a vertical window on the right side of your screen. | 29448 | It will show up in a vertical window on the right side of your screen. |
| 29449 | Above this menu is the traditional Calc stack display. On a 24-line | 29449 | Above this menu is the traditional Calc stack display. On a 24-line |
| 29450 | screen you will be able to see the top three stack entries. | 29450 | screen you will be able to see the top three stack entries. |
| @@ -29461,7 +29461,7 @@ At other times it changes the sign of the number on the top of the | |||
| 29461 | stack. | 29461 | stack. |
| 29462 | 29462 | ||
| 29463 | The @key{INV} and @key{HYP} keys modify other keys. As well as | 29463 | The @key{INV} and @key{HYP} keys modify other keys. As well as |
| 29464 | having the effects described elsewhere in this manual, Keypad Mode | 29464 | having the effects described elsewhere in this manual, Keypad mode |
| 29465 | defines several other ``inverse'' operations. These are described | 29465 | defines several other ``inverse'' operations. These are described |
| 29466 | below and in the following sections. | 29466 | below and in the following sections. |
| 29467 | 29467 | ||
| @@ -29481,7 +29481,7 @@ The @key{EXEC} key prompts you to enter any keystroke sequence | |||
| 29481 | that would normally work in Calc mode. This can include a | 29481 | that would normally work in Calc mode. This can include a |
| 29482 | numeric prefix if you wish. It is also possible simply to | 29482 | numeric prefix if you wish. It is also possible simply to |
| 29483 | switch into the Calc window and type commands in it; there is | 29483 | switch into the Calc window and type commands in it; there is |
| 29484 | nothing ``magic'' about this window when Keypad Mode is active. | 29484 | nothing ``magic'' about this window when Keypad mode is active. |
| 29485 | 29485 | ||
| 29486 | The other keys in this display perform their obvious calculator | 29486 | The other keys in this display perform their obvious calculator |
| 29487 | functions. @key{CLN2} rounds the top-of-stack by temporarily | 29487 | functions. @key{CLN2} rounds the top-of-stack by temporarily |
| @@ -29760,16 +29760,16 @@ The @key{OVER} key duplicates the second-to-top stack element. | |||
| 29760 | The @key{STO} and @key{RCL} keys are analogous to @kbd{s t} and | 29760 | The @key{STO} and @key{RCL} keys are analogous to @kbd{s t} and |
| 29761 | @kbd{s r} in regular Calc. @xref{Store and Recall}. Click the | 29761 | @kbd{s r} in regular Calc. @xref{Store and Recall}. Click the |
| 29762 | @key{STO} or @key{RCL} key, then one of the ten digits. (Named | 29762 | @key{STO} or @key{RCL} key, then one of the ten digits. (Named |
| 29763 | variables are not available in Keypad Mode.) You can also use, | 29763 | variables are not available in Keypad mode.) You can also use, |
| 29764 | for example, @kbd{STO + 3} to add to register 3. | 29764 | for example, @kbd{STO + 3} to add to register 3. |
| 29765 | 29765 | ||
| 29766 | @node Embedded Mode, Programming, Keypad Mode, Top | 29766 | @node Embedded Mode, Programming, Keypad Mode, Top |
| 29767 | @chapter Embedded Mode | 29767 | @chapter Embedded Mode |
| 29768 | 29768 | ||
| 29769 | @noindent | 29769 | @noindent |
| 29770 | Embedded Mode in Calc provides an alternative to copying numbers | 29770 | Embedded mode in Calc provides an alternative to copying numbers |
| 29771 | and formulas back and forth between editing buffers and the Calc | 29771 | and formulas back and forth between editing buffers and the Calc |
| 29772 | stack. In Embedded Mode, your editing buffer becomes temporarily | 29772 | stack. In Embedded mode, your editing buffer becomes temporarily |
| 29773 | linked to the stack and this copying is taken care of automatically. | 29773 | linked to the stack and this copying is taken care of automatically. |
| 29774 | 29774 | ||
| 29775 | @menu | 29775 | @menu |
| @@ -29794,7 +29794,7 @@ are visiting your own files. | |||
| 29794 | 29794 | ||
| 29795 | Calc normally scans backward and forward in the buffer for the | 29795 | Calc normally scans backward and forward in the buffer for the |
| 29796 | nearest opening and closing @dfn{formula delimiters}. The simplest | 29796 | nearest opening and closing @dfn{formula delimiters}. The simplest |
| 29797 | delimiters are blank lines. Other delimiters that Embedded Mode | 29797 | delimiters are blank lines. Other delimiters that Embedded mode |
| 29798 | understands are: | 29798 | understands are: |
| 29799 | 29799 | ||
| 29800 | @enumerate | 29800 | @enumerate |
| @@ -30352,15 +30352,15 @@ use @kbd{M-# u} to update the buffer by hand. | |||
| 30352 | @section Mode Settings in Embedded Mode | 30352 | @section Mode Settings in Embedded Mode |
| 30353 | 30353 | ||
| 30354 | @noindent | 30354 | @noindent |
| 30355 | Embedded Mode has a rather complicated mechanism for handling mode | 30355 | Embedded mode has a rather complicated mechanism for handling mode |
| 30356 | settings in Embedded formulas. It is possible to put annotations | 30356 | settings in Embedded formulas. It is possible to put annotations |
| 30357 | in the file that specify mode settings either global to the entire | 30357 | in the file that specify mode settings either global to the entire |
| 30358 | file or local to a particular formula or formulas. In the latter | 30358 | file or local to a particular formula or formulas. In the latter |
| 30359 | case, different modes can be specified for use when a formula | 30359 | case, different modes can be specified for use when a formula |
| 30360 | is the enabled Embedded Mode formula. | 30360 | is the enabled Embedded mode formula. |
| 30361 | 30361 | ||
| 30362 | When you give any mode-setting command, like @kbd{m f} (for fraction | 30362 | When you give any mode-setting command, like @kbd{m f} (for Fraction |
| 30363 | mode) or @kbd{d s} (for scientific notation), Embedded Mode adds | 30363 | mode) or @kbd{d s} (for scientific notation), Embedded mode adds |
| 30364 | a line like the following one to the file just before the opening | 30364 | a line like the following one to the file just before the opening |
| 30365 | delimiter of the formula. | 30365 | delimiter of the formula. |
| 30366 | 30366 | ||
| @@ -30413,7 +30413,7 @@ sure the value is of a legal type or range; if you write an | |||
| 30413 | annotation by hand, be sure to give a proper value or results | 30413 | annotation by hand, be sure to give a proper value or results |
| 30414 | will be unpredictable. Mode-setting annotations are case-sensitive. | 30414 | will be unpredictable. Mode-setting annotations are case-sensitive. |
| 30415 | 30415 | ||
| 30416 | While Embedded Mode is enabled, the word @code{Local} appears in | 30416 | While Embedded mode is enabled, the word @code{Local} appears in |
| 30417 | the mode line. This is to show that mode setting commands generate | 30417 | the mode line. This is to show that mode setting commands generate |
| 30418 | annotations that are ``local'' to the current formula or set of | 30418 | annotations that are ``local'' to the current formula or set of |
| 30419 | formulas. The @kbd{m R} (@code{calc-mode-record-mode}) command | 30419 | formulas. The @kbd{m R} (@code{calc-mode-record-mode}) command |
| @@ -30429,7 +30429,7 @@ that look like this, respectively: | |||
| 30429 | @end example | 30429 | @end example |
| 30430 | 30430 | ||
| 30431 | The first kind of annotation will be used only while a formula | 30431 | The first kind of annotation will be used only while a formula |
| 30432 | is enabled in Embedded Mode. The second kind will be used only | 30432 | is enabled in Embedded mode. The second kind will be used only |
| 30433 | when the formula is @emph{not} enabled. (Whether the formula | 30433 | when the formula is @emph{not} enabled. (Whether the formula |
| 30434 | is ``active'' or not, i.e., whether Calc has seen this formula | 30434 | is ``active'' or not, i.e., whether Calc has seen this formula |
| 30435 | yet, is not relevant here.) | 30435 | yet, is not relevant here.) |
| @@ -30471,21 +30471,21 @@ We would have to go down to the other formula and press @kbd{M-# u} | |||
| 30471 | on it in order to get it to notice the new annotation. | 30471 | on it in order to get it to notice the new annotation. |
| 30472 | 30472 | ||
| 30473 | Two more mode-recording modes selectable by @kbd{m R} are @code{Save} | 30473 | Two more mode-recording modes selectable by @kbd{m R} are @code{Save} |
| 30474 | (which works even outside of Embedded Mode), in which mode settings | 30474 | (which works even outside of Embedded mode), in which mode settings |
| 30475 | are recorded permanently in your Emacs startup file @file{~/.emacs} | 30475 | are recorded permanently in your Emacs startup file @file{~/.emacs} |
| 30476 | rather than by annotating the current document, and no-recording | 30476 | rather than by annotating the current document, and no-recording |
| 30477 | mode (where there is no symbol like @code{Save} or @code{Local} in | 30477 | mode (where there is no symbol like @code{Save} or @code{Local} in |
| 30478 | the mode line), in which mode-changing commands do not leave any | 30478 | the mode line), in which mode-changing commands do not leave any |
| 30479 | annotations at all. | 30479 | annotations at all. |
| 30480 | 30480 | ||
| 30481 | When Embedded Mode is not enabled, mode-recording modes except | 30481 | When Embedded mode is not enabled, mode-recording modes except |
| 30482 | for @code{Save} have no effect. | 30482 | for @code{Save} have no effect. |
| 30483 | 30483 | ||
| 30484 | @node Customizing Embedded Mode, , Mode Settings in Embedded Mode, Embedded Mode | 30484 | @node Customizing Embedded Mode, , Mode Settings in Embedded Mode, Embedded Mode |
| 30485 | @section Customizing Embedded Mode | 30485 | @section Customizing Embedded Mode |
| 30486 | 30486 | ||
| 30487 | @noindent | 30487 | @noindent |
| 30488 | You can modify Embedded Mode's behavior by setting various Lisp | 30488 | You can modify Embedded mode's behavior by setting various Lisp |
| 30489 | variables described here. Use @kbd{M-x set-variable} or | 30489 | variables described here. Use @kbd{M-x set-variable} or |
| 30490 | @kbd{M-x edit-options} to adjust a variable on the fly, or | 30490 | @kbd{M-x edit-options} to adjust a variable on the fly, or |
| 30491 | put a suitable @code{setq} statement in your @file{~/.emacs} | 30491 | put a suitable @code{setq} statement in your @file{~/.emacs} |
| @@ -30495,7 +30495,7 @@ file; @pxref{File Variables, , Local Variables in Files, emacs, the | |||
| 30495 | Emacs manual}.) | 30495 | Emacs manual}.) |
| 30496 | 30496 | ||
| 30497 | While none of these variables will be buffer-local by default, you | 30497 | While none of these variables will be buffer-local by default, you |
| 30498 | can make any of them local to any embedded-mode buffer. (Their | 30498 | can make any of them local to any Embedded mode buffer. (Their |
| 30499 | values in the @samp{*Calculator*} buffer are never used.) | 30499 | values in the @samp{*Calculator*} buffer are never used.) |
| 30500 | 30500 | ||
| 30501 | @vindex calc-embedded-open-formula | 30501 | @vindex calc-embedded-open-formula |
| @@ -30584,7 +30584,7 @@ The default string is @code{"%%% "} (note the trailing space). | |||
| 30584 | @vindex calc-embedded-close-plain | 30584 | @vindex calc-embedded-close-plain |
| 30585 | The @code{calc-embedded-close-plain} variable is a string which | 30585 | The @code{calc-embedded-close-plain} variable is a string which |
| 30586 | ends a ``plain'' formula. The default is @code{" %%%\n"}. Without | 30586 | ends a ``plain'' formula. The default is @code{" %%%\n"}. Without |
| 30587 | the trailing newline here, the first line of a ``big'' mode formula | 30587 | the trailing newline here, the first line of a Big mode formula |
| 30588 | that followed might be shifted over with respect to the other lines. | 30588 | that followed might be shifted over with respect to the other lines. |
| 30589 | 30589 | ||
| 30590 | @vindex calc-embedded-open-new-formula | 30590 | @vindex calc-embedded-open-new-formula |
| @@ -31045,7 +31045,7 @@ conditional and looping commands. | |||
| 31045 | @cindex Restoring saved modes | 31045 | @cindex Restoring saved modes |
| 31046 | Keyboard macros sometimes want to operate under known conditions | 31046 | Keyboard macros sometimes want to operate under known conditions |
| 31047 | without affecting surrounding conditions. For example, a keyboard | 31047 | without affecting surrounding conditions. For example, a keyboard |
| 31048 | macro may wish to turn on Fraction Mode, or set a particular | 31048 | macro may wish to turn on Fraction mode, or set a particular |
| 31049 | precision, independent of the user's normal setting for those | 31049 | precision, independent of the user's normal setting for those |
| 31050 | modes. | 31050 | modes. |
| 31051 | 31051 | ||
| @@ -31094,7 +31094,7 @@ for all mode-setting commands inside the macro. | |||
| 31094 | In fact, @kbd{C-u Z `} is like @kbd{Z `} except that it sets the modes | 31094 | In fact, @kbd{C-u Z `} is like @kbd{Z `} except that it sets the modes |
| 31095 | listed above to their default values. As usual, the matching @kbd{Z '} | 31095 | listed above to their default values. As usual, the matching @kbd{Z '} |
| 31096 | will restore the modes to their settings from before the @kbd{C-u Z `}. | 31096 | will restore the modes to their settings from before the @kbd{C-u Z `}. |
| 31097 | Also, @w{@kbd{Z `}} with a negative prefix argument resets algebraic mode | 31097 | Also, @w{@kbd{Z `}} with a negative prefix argument resets the algebraic mode |
| 31098 | to its default (off) but leaves the other modes the same as they were | 31098 | to its default (off) but leaves the other modes the same as they were |
| 31099 | outside the construct. | 31099 | outside the construct. |
| 31100 | 31100 | ||
| @@ -32166,7 +32166,7 @@ If the first argument to @code{calc-eval} is a list whose first | |||
| 32166 | element is a formula string, then @code{calc-eval} sets all the | 32166 | element is a formula string, then @code{calc-eval} sets all the |
| 32167 | various Calc modes to their default values while the formula is | 32167 | various Calc modes to their default values while the formula is |
| 32168 | evaluated and formatted. For example, the precision is set to 12 | 32168 | evaluated and formatted. For example, the precision is set to 12 |
| 32169 | digits, digit grouping is turned off, and the normal language | 32169 | digits, digit grouping is turned off, and the Normal language |
| 32170 | mode is used. | 32170 | mode is used. |
| 32171 | 32171 | ||
| 32172 | This same principle applies to the other options discussed below. | 32172 | This same principle applies to the other options discussed below. |
| @@ -32189,7 +32189,7 @@ It's usually best to use this form of @code{calc-eval} unless your | |||
| 32189 | program actually considers the interaction with Calc's mode settings | 32189 | program actually considers the interaction with Calc's mode settings |
| 32190 | to be a feature. This will avoid all sorts of potential ``gotchas''; | 32190 | to be a feature. This will avoid all sorts of potential ``gotchas''; |
| 32191 | consider what happens with @samp{(calc-eval "sqrt(2)" 'num)} | 32191 | consider what happens with @samp{(calc-eval "sqrt(2)" 'num)} |
| 32192 | when the user has left Calc in symbolic mode or no-simplify mode. | 32192 | when the user has left Calc in Symbolic mode or No-Simplify mode. |
| 32193 | 32193 | ||
| 32194 | As another example, @samp{(equal (calc-eval '("$<$$") nil a b) "1")} | 32194 | As another example, @samp{(equal (calc-eval '("$<$$") nil a b) "1")} |
| 32195 | checks if the number in string @expr{a} is less than the one in | 32195 | checks if the number in string @expr{a} is less than the one in |
| @@ -32765,7 +32765,7 @@ will be used. | |||
| 32765 | This function takes a Calc object and ``normalizes'' it. At the very | 32765 | This function takes a Calc object and ``normalizes'' it. At the very |
| 32766 | least this involves re-rounding floating-point values according to the | 32766 | least this involves re-rounding floating-point values according to the |
| 32767 | current precision and other similar jobs. Also, unless the user has | 32767 | current precision and other similar jobs. Also, unless the user has |
| 32768 | selected no-simplify mode (@pxref{Simplification Modes}), this involves | 32768 | selected No-Simplify mode (@pxref{Simplification Modes}), this involves |
| 32769 | actually evaluating a formula object by executing the function calls | 32769 | actually evaluating a formula object by executing the function calls |
| 32770 | it contains, and possibly also doing algebraic simplification, etc. | 32770 | it contains, and possibly also doing algebraic simplification, etc. |
| 32771 | @end defun | 32771 | @end defun |
| @@ -33127,13 +33127,13 @@ function call which led here will be left in symbolic form. | |||
| 33127 | @end defun | 33127 | @end defun |
| 33128 | 33128 | ||
| 33129 | @defun inexact-value | 33129 | @defun inexact-value |
| 33130 | If Symbolic Mode is enabled, this will signal an error that causes | 33130 | If Symbolic mode is enabled, this will signal an error that causes |
| 33131 | @code{normalize} to leave the formula in symbolic form, with the message | 33131 | @code{normalize} to leave the formula in symbolic form, with the message |
| 33132 | ``Inexact result.'' (This function has no effect when not in Symbolic Mode.) | 33132 | ``Inexact result.'' (This function has no effect when not in Symbolic mode.) |
| 33133 | Note that if your function calls @samp{(sin 5)} in Symbolic Mode, the | 33133 | Note that if your function calls @samp{(sin 5)} in Symbolic mode, the |
| 33134 | @code{sin} function will call @code{inexact-value}, which will cause your | 33134 | @code{sin} function will call @code{inexact-value}, which will cause your |
| 33135 | function to be left unsimplified. You may instead wish to call | 33135 | function to be left unsimplified. You may instead wish to call |
| 33136 | @samp{(normalize (list 'calcFunc-sin 5))}, which in Symbolic Mode will | 33136 | @samp{(normalize (list 'calcFunc-sin 5))}, which in Symbolic mode will |
| 33137 | return the formula @samp{sin(5)} to your function. | 33137 | return the formula @samp{sin(5)} to your function. |
| 33138 | @end defun | 33138 | @end defun |
| 33139 | 33139 | ||
| @@ -33179,9 +33179,9 @@ number of parameters, or because it returns @code{nil} or calls | |||
| 33179 | @code{reject-arg} or @code{inexact-result}, @code{normalize} returns | 33179 | @code{reject-arg} or @code{inexact-result}, @code{normalize} returns |
| 33180 | the formula still in symbolic form. | 33180 | the formula still in symbolic form. |
| 33181 | 33181 | ||
| 33182 | If the current Simplification Mode is ``none'' or ``numeric arguments | 33182 | If the current simplification mode is ``none'' or ``numeric arguments |
| 33183 | only,'' @code{normalize} will act appropriately. However, the more | 33183 | only,'' @code{normalize} will act appropriately. However, the more |
| 33184 | powerful simplification modes (like algebraic simplification) are | 33184 | powerful simplification modes (like Algebraic Simplification) are |
| 33185 | not handled by @code{normalize}. They are handled by @code{calc-normalize}, | 33185 | not handled by @code{normalize}. They are handled by @code{calc-normalize}, |
| 33186 | which calls @code{normalize} and possibly some other routines, such | 33186 | which calls @code{normalize} and possibly some other routines, such |
| 33187 | as @code{simplify} or @code{simplify-units}. Programs generally will | 33187 | as @code{simplify} or @code{simplify-units}. Programs generally will |
| @@ -33369,7 +33369,7 @@ again to 30 digits for use in the present request. | |||
| 33369 | If the current angular mode is Degrees or HMS, this function returns the | 33369 | If the current angular mode is Degrees or HMS, this function returns the |
| 33370 | integer 360. In Radians mode, this function returns either the | 33370 | integer 360. In Radians mode, this function returns either the |
| 33371 | corresponding value in radians to the current precision, or the formula | 33371 | corresponding value in radians to the current precision, or the formula |
| 33372 | @samp{2*pi}, depending on the Symbolic Mode. There are also similar | 33372 | @samp{2*pi}, depending on the Symbolic mode. There are also similar |
| 33373 | function @code{half-circle} and @code{quarter-circle}. | 33373 | function @code{half-circle} and @code{quarter-circle}. |
| 33374 | @end defun | 33374 | @end defun |
| 33375 | 33375 | ||
| @@ -33427,12 +33427,12 @@ If @var{a} is a formula, this returns the formula @samp{deg(@var{a})}. | |||
| 33427 | @end defun | 33427 | @end defun |
| 33428 | 33428 | ||
| 33429 | @defun to-radians-2 a | 33429 | @defun to-radians-2 a |
| 33430 | Like @code{to-radians}, except that in Symbolic Mode a degrees to | 33430 | Like @code{to-radians}, except that in Symbolic mode a degrees to |
| 33431 | radians conversion yields a formula like @samp{@var{a}*pi/180}. | 33431 | radians conversion yields a formula like @samp{@var{a}*pi/180}. |
| 33432 | @end defun | 33432 | @end defun |
| 33433 | 33433 | ||
| 33434 | @defun from-radians-2 a | 33434 | @defun from-radians-2 a |
| 33435 | Like @code{from-radians}, except that in Symbolic Mode a radians to | 33435 | Like @code{from-radians}, except that in Symbolic mode a radians to |
| 33436 | degrees conversion yields a formula like @samp{@var{a}*180/pi}. | 33436 | degrees conversion yields a formula like @samp{@var{a}*180/pi}. |
| 33437 | @end defun | 33437 | @end defun |
| 33438 | 33438 | ||