Mercurial > emacs
comparison man/calc.texi @ 62389:fbb23c0ada57
(Storing Variables): Mention `calc-copy-special-constant'.
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Mon, 16 May 2005 03:50:34 +0000 |
parents | 5f5acca0e152 |
children | 3b0d4409ce3f f042e7c0fe20 |
comparison
equal
deleted
inserted
replaced
62388:413b0a1cca76 | 62389:fbb23c0ada57 |
---|---|
28296 contain no value at all. If they appear in an algebraic formula they | 28296 contain no value at all. If they appear in an algebraic formula they |
28297 will be left alone even if you press @kbd{=} (@code{calc-evaluate}). | 28297 will be left alone even if you press @kbd{=} (@code{calc-evaluate}). |
28298 The @kbd{s u} (@code{calc-unstore}) command returns a variable to the | 28298 The @kbd{s u} (@code{calc-unstore}) command returns a variable to the |
28299 void state. | 28299 void state. |
28300 | 28300 |
28301 @kindex s c | |
28302 @pindex calc-copy-variable | |
28303 The @kbd{s c} (@code{calc-copy-variable}) command copies the stored | |
28304 value of one variable to another. One way it differs from a simple | |
28305 @kbd{s r} followed by an @kbd{s t} (aside from saving keystrokes) is | |
28306 that the value never goes on the stack and thus is never rounded, | |
28307 evaluated, or simplified in any way; it is not even rounded down to the | |
28308 current precision. | |
28309 | |
28301 The only variables with predefined values are the ``special constants'' | 28310 The only variables with predefined values are the ``special constants'' |
28302 @code{pi}, @code{e}, @code{i}, @code{phi}, and @code{gamma}. You are free | 28311 @code{pi}, @code{e}, @code{i}, @code{phi}, and @code{gamma}. You are free |
28303 to unstore these variables or to store new values into them if you like, | 28312 to unstore these variables or to store new values into them if you like, |
28304 although some of the algebraic-manipulation functions may assume these | 28313 although some of the algebraic-manipulation functions may assume these |
28305 variables represent their standard values. Calc displays a warning if | 28314 variables represent their standard values. Calc displays a warning if |
28306 you change the value of one of these variables, or of one of the other | 28315 you change the value of one of these variables, or of one of the other |
28307 special variables @code{inf}, @code{uinf}, and @code{nan} (which are | 28316 special variables @code{inf}, @code{uinf}, and @code{nan} (which are |
28308 normally void). | 28317 normally void). |
28309 | 28318 |
28310 Note that @code{pi} doesn't actually have 3.14159265359 stored | 28319 Note that @code{pi} doesn't actually have 3.14159265359 stored in it, |
28311 in it, but rather a special magic value that evaluates to @cpi{} | 28320 but rather a special magic value that evaluates to @cpi{} at the current |
28312 at the current precision. Likewise @code{e}, @code{i}, and | 28321 precision. Likewise @code{e}, @code{i}, and @code{phi} evaluate |
28313 @code{phi} evaluate according to the current precision or polar mode. | 28322 according to the current precision or polar mode. If you recall a value |
28314 If you recall a value from @code{pi} and store it back, this magic | 28323 from @code{pi} and store it back, this magic property will be lost. The |
28315 property will be lost. | 28324 magic property is preserved, however, when a variable is copied with |
28316 | 28325 @kbd{s c}. |
28317 @kindex s c | 28326 |
28318 @pindex calc-copy-variable | 28327 @kindex s k |
28319 The @kbd{s c} (@code{calc-copy-variable}) command copies the stored | 28328 @pindex calc-copy-special-constant |
28320 value of one variable to another. It differs from a simple @kbd{s r} | 28329 If one of the ``special constants'' is redefined (or undefined) so that |
28321 followed by an @kbd{s t} in two important ways. First, the value never | 28330 it no longer has its magic property, the property can be restored with |
28322 goes on the stack and thus is never rounded, evaluated, or simplified | 28331 @kbd{s k} (@code{calc-copy-special-constant}). This command will prompt |
28323 in any way; it is not even rounded down to the current precision. | 28332 for a special constant and a variable to store it in, and so a special |
28324 Second, the ``magic'' contents of a variable like @code{e} can | 28333 constant can be stored in any variable. Here, the special constant that |
28325 be copied into another variable with this command, perhaps because | 28334 you enter doesn't depend on the value of the corresponding variable; |
28326 you need to unstore @code{e} right now but you wish to put it | 28335 @code{pi} will represent 3.14159@dots{} regardless of what is currently |
28327 back when you're done. The @kbd{s c} command is the only way to | 28336 stored in the Calc variable @code{pi}. If one of the other special |
28328 manipulate these magic values intact. | 28337 variables, @code{inf}, @code{uinf} or @code{nan}, is given a value, its |
28338 original behavior can be restored by voiding it with @kbd{s u}. | |
28329 | 28339 |
28330 @node Recalling Variables, Operations on Variables, Storing Variables, Store and Recall | 28340 @node Recalling Variables, Operations on Variables, Storing Variables, Store and Recall |
28331 @section Recalling Variables | 28341 @section Recalling Variables |
28332 | 28342 |
28333 @noindent | 28343 @noindent |
35613 @c | 35623 @c |
35614 @r{ @: s c @:var1, var2 @: 29 @:calc-copy-variable@:} | 35624 @r{ @: s c @:var1, var2 @: 29 @:calc-copy-variable@:} |
35615 @r{ @: s d @:var, decl @: @:calc-declare-variable@:} | 35625 @r{ @: s d @:var, decl @: @:calc-declare-variable@:} |
35616 @r{ @: s e @:var, editing @: 29,30 @:calc-edit-variable@:} | 35626 @r{ @: s e @:var, editing @: 29,30 @:calc-edit-variable@:} |
35617 @r{ @: s i @:buffer @: @:calc-insert-variables@:} | 35627 @r{ @: s i @:buffer @: @:calc-insert-variables@:} |
35628 @r{ @: s k @:const, var @: 29 @:calc-copy-special-constant@:} | |
35618 @r{ a b@: s l @:var @: 29 @:@:a (letting var=b)} | 35629 @r{ a b@: s l @:var @: 29 @:@:a (letting var=b)} |
35619 @r{ a ...@: s m @:op, var @: 22,29 @:calc-store-map@:} | 35630 @r{ a ...@: s m @:op, var @: 22,29 @:calc-store-map@:} |
35620 @r{ @: s n @:var @: 29,47 @:calc-store-neg@: (v/-1)} | 35631 @r{ @: s n @:var @: 29,47 @:calc-store-neg@: (v/-1)} |
35621 @r{ @: s p @:var @: 29 @:calc-permanent-variable@:} | 35632 @r{ @: s p @:var @: 29 @:calc-permanent-variable@:} |
35622 @r{ @: s r @:var @: 29 @:@:v (recalled value)} | 35633 @r{ @: s r @:var @: 29 @:@:v (recalled value)} |