Mercurial > emacs
changeset 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 | 413b0a1cca76 |
children | 3e124bbd072e |
files | man/calc.texi |
diffstat | 1 files changed, 30 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/man/calc.texi Mon May 16 03:37:46 2005 +0000 +++ b/man/calc.texi Mon May 16 03:50:34 2005 +0000 @@ -28298,6 +28298,15 @@ The @kbd{s u} (@code{calc-unstore}) command returns a variable to the void state. +@kindex s c +@pindex calc-copy-variable +The @kbd{s c} (@code{calc-copy-variable}) command copies the stored +value of one variable to another. One way it differs from a simple +@kbd{s r} followed by an @kbd{s t} (aside from saving keystrokes) is +that the value never goes on the stack and thus is never rounded, +evaluated, or simplified in any way; it is not even rounded down to the +current precision. + The only variables with predefined values are the ``special constants'' @code{pi}, @code{e}, @code{i}, @code{phi}, and @code{gamma}. You are free to unstore these variables or to store new values into them if you like, @@ -28307,25 +28316,26 @@ special variables @code{inf}, @code{uinf}, and @code{nan} (which are normally void). -Note that @code{pi} doesn't actually have 3.14159265359 stored -in it, but rather a special magic value that evaluates to @cpi{} -at the current precision. Likewise @code{e}, @code{i}, and -@code{phi} evaluate according to the current precision or polar mode. -If you recall a value from @code{pi} and store it back, this magic -property will be lost. - -@kindex s c -@pindex calc-copy-variable -The @kbd{s c} (@code{calc-copy-variable}) command copies the stored -value of one variable to another. It differs from a simple @kbd{s r} -followed by an @kbd{s t} in two important ways. First, the value never -goes on the stack and thus is never rounded, evaluated, or simplified -in any way; it is not even rounded down to the current precision. -Second, the ``magic'' contents of a variable like @code{e} can -be copied into another variable with this command, perhaps because -you need to unstore @code{e} right now but you wish to put it -back when you're done. The @kbd{s c} command is the only way to -manipulate these magic values intact. +Note that @code{pi} doesn't actually have 3.14159265359 stored in it, +but rather a special magic value that evaluates to @cpi{} at the current +precision. Likewise @code{e}, @code{i}, and @code{phi} evaluate +according to the current precision or polar mode. If you recall a value +from @code{pi} and store it back, this magic property will be lost. The +magic property is preserved, however, when a variable is copied with +@kbd{s c}. + +@kindex s k +@pindex calc-copy-special-constant +If one of the ``special constants'' is redefined (or undefined) so that +it no longer has its magic property, the property can be restored with +@kbd{s k} (@code{calc-copy-special-constant}). This command will prompt +for a special constant and a variable to store it in, and so a special +constant can be stored in any variable. Here, the special constant that +you enter doesn't depend on the value of the corresponding variable; +@code{pi} will represent 3.14159@dots{} regardless of what is currently +stored in the Calc variable @code{pi}. If one of the other special +variables, @code{inf}, @code{uinf} or @code{nan}, is given a value, its +original behavior can be restored by voiding it with @kbd{s u}. @node Recalling Variables, Operations on Variables, Storing Variables, Store and Recall @section Recalling Variables @@ -35615,6 +35625,7 @@ @r{ @: s d @:var, decl @: @:calc-declare-variable@:} @r{ @: s e @:var, editing @: 29,30 @:calc-edit-variable@:} @r{ @: s i @:buffer @: @:calc-insert-variables@:} +@r{ @: s k @:const, var @: 29 @:calc-copy-special-constant@:} @r{ a b@: s l @:var @: 29 @:@:a (letting var=b)} @r{ a ...@: s m @:op, var @: 22,29 @:calc-store-map@:} @r{ @: s n @:var @: 29,47 @:calc-store-neg@: (v/-1)}