From 6188800ed0d67c48f645bce2bcc213c173e63fd9 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 16 May 2005 03:50:34 +0000 Subject: [PATCH] (Storing Variables): Mention `calc-copy-special-constant'. --- man/calc.texi | 49 ++++++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/man/calc.texi b/man/calc.texi index 4cf16da1515..5d0af765f15 100644 --- a/man/calc.texi +++ b/man/calc.texi @@ -28298,6 +28298,15 @@ will be left alone even if you press @kbd{=} (@code{calc-evaluate}). 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 @@ you change the value of one of these variables, or of one of the other 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 @@ keystrokes are not listed in this summary. @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)} -- 2.39.2