[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103675: * lisp/calc/README: Mention
From: |
Jay Belanger |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103675: * lisp/calc/README: Mention musical notes. |
Date: |
Wed, 16 Mar 2011 20:30:08 -0500 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 103675
committer: Jay Belanger <address@hidden>
branch nick: trunk
timestamp: Wed 2011-03-16 20:30:08 -0500
message:
* lisp/calc/README: Mention musical notes.
* lisp/calc-units.el (calc-lu-quant): Rename from
`calc-logunits-quantity'.
(calcFunc-lupquant): Rename from `calcFunc-powerquant'.
(calcFunc-lufquant): Rename from `calcFunc-fieldquant'.
(calc-db): Rename from `calc-dblevel'.
(calcFunc-dbpower): Rename from `calcFunc-dbpowerlevel'.
(calcFunc-dbfield): Rename from `calcFunc-dbfieldlevel'.
(calc-np): Rename from `calc-nplevel'.
(calcFunc-nppower): Rename from `calcFunc-nppowerlevel'.
(calcFunc-npfield): Rename from `calcFunc-npfieldlevel'.
(calc-lu-plus): Rename from `calc-logunits-add'.
(calcFunc-lupadd): Rename from `calcFunc-lupoweradd'.
(calcFunc-lufadd): Rename from `calcFunc-lufieldadd'.
(calc-lu-minus): Rename from `calc-logunits-sub'.
(calcFunc-lupsub): Rename from `calcFunc-lupowersub'.
(calcFunc-lufsub): Rename from `calcFunc-lufieldsub'.
(calc-lu-times): Rename from `calc-logunits-mul'.
(calcFunc-lupmul): Rename from `calcFunc-lupowermul'.
(calcFunc-lufmul): Rename from `calcFunc-lufieldmul'.
(calc-lu-divide): Rename from `calc-logunits-div'.
(calcFunc-lupdiv): Rename from `calcFunc-lupowerdiv'.
(calcFunc-lufdiv): Rename from `calcFunc-lufielddiv'.
* lisp/calc/calc-ext.el (calc-init-extensions): Update the names of the
functions being autoloaded.
* lisp/calc/calc.el (calc-lu-power-reference): Rename from
`calc-logunits-power-reference'.
(calc-lu-field-reference): Rename from
`calc-logunits-field-reference'.
* lisp/calc/calc-help (calc-l-prefix-help): Mention musical note functions.
* doc/misc/calc.texi (Logarithmic Units): Update the function names.
modified:
doc/misc/ChangeLog
doc/misc/calc.texi
lisp/ChangeLog
lisp/calc/README
lisp/calc/calc-ext.el
lisp/calc/calc-help.el
lisp/calc/calc-units.el
lisp/calc/calc.el
=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog 2011-03-15 22:38:41 +0000
+++ b/doc/misc/ChangeLog 2011-03-17 01:30:08 +0000
@@ -1,3 +1,7 @@
+2011-03-17 Jay Belanger <address@hidden>
+
+ * calc.texi (Logarithmic Units): Update the function names.
+
2011-03-15 Antoine Levitt <address@hidden>
* message.texi (Insertion Variables): Document message-cite-style.
=== modified file 'doc/misc/calc.texi'
--- a/doc/misc/calc.texi 2011-03-06 04:28:39 +0000
+++ b/doc/misc/calc.texi 2011-03-17 01:30:08 +0000
@@ -28126,47 +28126,15 @@
@section Logarithmic Units
The units @code{dB} (decibels) and @code{Np} (nepers) are logarithmic
-units which are typically manipulated differently than standard units.
-Calc provides commands to work with these logarithmic units.
+units which are manipulated differently than standard units. Calc
+provides commands to work with these logarithmic units.
Decibels and nepers are used to measure power quantities as well as
-field quantities (quantities whose squares are proportional to power).
-The decibel and neper values of a quantity are relative to
-a reference quantity; for example, the decibel value of a sound
-pressure level of
address@hidden @math{60 uPa}
address@hidden @math{60 \mu{\rm Pa}}
-relative to
address@hidden @math{20 uPa}
address@hidden @math{20 \mu{\rm Pa}}
-(the threshhold of human hearing) is
address@hidden @math{20 log10(60 uPa/ 20 uPa) dB = 20 log10(3) dB},
address@hidden @math{20 \log_{10}(60 \mu{\rm Pa}/20 \mu{\rm Pa}) {\rm dB} = 20
\log_{10}(3) {\rm dB}},
-which is about
address@hidden @math{9.54 dB}.
address@hidden @math{9.54 {\rm dB}}.
-Note that in taking the ratio, the original units cancel and so these
-logarithmic units are dimensionless.
-
address@hidden calc-logunits-power-reference
address@hidden calc-logunits-field-reference
-The Calc commands for the logarithmic units assume that power quantities
-are being used unless the @kbd{H} prefix is used, in which case they assume
that
-field quantities are being used. For power quantities, Calc uses
address@hidden @math{1 mW}
address@hidden @math{1 {\rm mW}}
-as the default reference quantity; this default can be changed by changing
-the value of the customizable variable
address@hidden (@pxref{Customizing Calc}).
-For field quantities, Calc uses
address@hidden @math{20 uPa}
address@hidden @math{20 \mu{\rm Pa}}
-as the default reference quantity; this is the value used in acoustics
-which is where decibels are commonly encountered. This default can be
-changed by changing the value of the customizable variable
address@hidden (@pxref{Customizing Calc}). A
-non-default reference quantity will be read from the stack if the
-capital @kbd{O} prefix is used.
+field quantities (quantities whose squares are proportional to power);
+these two types of quantities are handled slightly different from each
+other. By default the Calc commands work as if power quantities are
+being used; with the @kbd{H} prefix the Calc commands work as if field
+quantities are being used.
The decibel level of a power
@infoline @math{P1},
@@ -28214,6 +28182,20 @@
is defined as
@infoline @math{20 log10(F1/F0) dB}.
@texline @math{20 \log_{10}(F_{1}/F_{0}) {\rm dB}}.
+For example, the decibel value of a sound pressure level of
address@hidden @math{60 uPa}
address@hidden @math{60 \mu{\rm Pa}}
+relative to
address@hidden @math{20 uPa}
address@hidden @math{20 \mu{\rm Pa}}
+(the threshhold of human hearing) is
address@hidden @math{20 log10(60 uPa/ 20 uPa) dB = 20 log10(3) dB},
address@hidden @math{20 \log_{10}(60 \mu{\rm Pa}/20 \mu{\rm Pa}) {\rm dB} = 20
\log_{10}(3) {\rm dB}},
+which is about
address@hidden @math{9.54 dB}.
address@hidden @math{9.54 {\rm dB}}.
+Note that in taking the ratio, the original units cancel and so these
+logarithmic units are dimensionless.
Nepers (named after John Napier, who is credited with inventing the
logarithm) are similar to bels except they use natural logarithms instead
@@ -28236,55 +28218,72 @@
@infoline @math{ln(F1/F0) Np}.
@texline @math{\ln(F_1/F_0) {\rm Np}}.
address@hidden calc-lu-power-reference
address@hidden calc-lu-field-reference
+For power quantities, Calc uses
address@hidden @math{1 mW}
address@hidden @math{1 {\rm mW}}
+as the default reference quantity; this default can be changed by changing
+the value of the customizable variable
address@hidden (@pxref{Customizing Calc}).
+For field quantities, Calc uses
address@hidden @math{20 uPa}
address@hidden @math{20 \mu{\rm Pa}}
+as the default reference quantity; this is the value used in acoustics
+which is where decibels are commonly encountered. This default can be
+changed by changing the value of the customizable variable
address@hidden (@pxref{Customizing Calc}). A
+non-default reference quantity will be read from the stack if the
+capital @kbd{O} prefix is used.
+
@kindex l q
address@hidden calc-logunits-quantity
address@hidden powerquant
address@hidden fieldquant
-The @kbd{l q} (@code{calc-logunits-quantity}) address@hidden
address@hidden calc-lu-quant
address@hidden pquant
address@hidden fquant
+The @kbd{l q} (@code{calc-lu-quant}) address@hidden
command computes the power quantity corresponding to a given number of
logarithmic units. With the capital @kbd{O} prefix, @kbd{O l q}, the
reference level will be read from the top of the stack. (In an
-algebraic formula, @code{powerquant} can be given an optional second
+algebraic formula, @code{pquant} can be given an optional second
argument which will be used for the reference level.) For example,
@code{20 dB @key{RET} l q} will return @code{100 mW};
@code{20 dB @key{RET} 4 W @key{RET} O l q} will return @code{400 W}.
-The @kbd{H l q} address@hidden command behaves like @kbd{l q} but
+The @kbd{H l q} address@hidden command behaves like @kbd{l q} but
computes field quantities instead of power quantities.
@kindex l d
address@hidden calc-dblevel
address@hidden dbpowerlevel
address@hidden dbfieldlevel
address@hidden calc-db
address@hidden dbpower
address@hidden dbfield
@kindex l n
address@hidden calc-nplevel
address@hidden nppowerlevel
address@hidden npfieldlevel
-The @kbd{l d} (@code{calc-dblevel}) address@hidden
-command will compute the decibel level of a power quantity using the
-default reference level; @kbd{H l d} address@hidden will
-compute the decibel level of a field quantity. The commands @kbd{l n}
-(@code{calc-nplevel}) address@hidden and @kbd{H l n}
address@hidden will similarly compute neper levels. With the
-capital @kbd{O} prefix these commands will read a reference level
-from the stack; in an algebraic formula the reference level can be
-given as an optional second argument.
address@hidden calc-np
address@hidden nppower
address@hidden npfield
+The @kbd{l d} (@code{calc-db}) address@hidden command will compute
+the decibel level of a power quantity using the default reference
+level; @kbd{H l d} address@hidden will compute the decibel level of
+a field quantity. The commands @kbd{l n} (@code{calc-np})
address@hidden and @kbd{H l n} address@hidden will similarly
+compute neper levels. With the capital @kbd{O} prefix these commands
+will read a reference level from the stack; in an algebraic formula
+the reference level can be given as an optional second argument.
@kindex l +
address@hidden calc-logunits-add
address@hidden lupoweradd
address@hidden lufieldadd
address@hidden calc-lu-plus
address@hidden lupadd
address@hidden lufadd
@kindex l -
address@hidden calc-logunits-sub
address@hidden lupowersub
address@hidden lufieldsub
address@hidden calc-lu-minus
address@hidden lupsub
address@hidden lufsub
@kindex l *
address@hidden calc-logunits-mul
address@hidden lupowermul
address@hidden lufieldmul
address@hidden calc-lu-times
address@hidden lupmul
address@hidden lufmul
@kindex l /
address@hidden calc-logunits-div
address@hidden lupowerdiv
address@hidden lufielddiv
address@hidden calc-lu-divide
address@hidden lupdiv
address@hidden lufdiv
The sum of two power or field quantities doesn't correspond to the sum
of the corresponding decibel or neper levels. If the powers
corresponding to decibel levels
@@ -28305,13 +28304,13 @@
@end tex
@noindent
-When field quantities are combined, it often means the
-corresponding powers are added and so the above formula might be used.
-In acoustics, for example, the decibel sound pressure level is defined
-using the field formula but the sound pressure levels are combined
-as the sound power levels, and so the above formula should be used. If
-two field quantities themselves are added, the new decibel level will be
-
+When field quantities are combined, it often means the corresponding
+powers are added and so the above formula might be used. In
+acoustics, for example, the sound pressure level is a field quantity
+and so the decibels are often defined using the field formula, but the
+sound pressure levels are combined as the sound power levels, and so
+the above formula should be used. If two field quantities themselves
+are added, the new decibel level will be
@ifnottex
@example
@@ -28349,20 +28348,18 @@
@end tex
@noindent
-There are similar formulas for combining nepers.
-The @kbd{l +} (@code{calc-logunits-add}) address@hidden command
-will ``add'' two logarithmic unit power levels this way; with the
address@hidden prefix, @kbd{H l +} address@hidden will add logarithmic
-unit field levels. Similarly, logarithmic units can be
-``subtracted'' with @kbd{l -} (@code{calc-logunits-sub})
address@hidden or @kbd{H l -} address@hidden
-The @kbd{l *} (@code{calc-logunits-mul}) address@hidden
-and @kbd{H l *} address@hidden commands will ``multiply''
-a logarithmic unit by a number; the @kbd{l /}
-(@code{calc-logunits-divide}) address@hidden and
address@hidden l /} address@hidden commands will ``divide'' a
-logarithmic unit by a number. Note that the reference quantities don't
-play a role in this arithmetic.
+There are similar formulas for combining nepers. The @kbd{l +}
+(@code{calc-lu-plus}) address@hidden command will ``add'' two
+logarithmic unit power levels this way; with the @kbd{H} prefix,
address@hidden l +} address@hidden will add logarithmic unit field levels.
+Similarly, logarithmic units can be ``subtracted'' with @kbd{l -}
+(@code{calc-lu-minus}) address@hidden or @kbd{H l -} address@hidden
+The @kbd{l *} (@code{calc-lu-times}) address@hidden and @kbd{H l *}
address@hidden commands will ``multiply'' a logarithmic unit by a
+number; the @kbd{l /} (@code{calc-lu-divide}) address@hidden and
address@hidden l /} address@hidden commands will ``divide'' a logarithmic
+unit by a number. Note that the reference quantities don't play a role
+in this arithmetic.
@node Musical Notes, , Logarithmic Units, Units
@section Musical Notes
@@ -35539,16 +35536,16 @@
and @code{calc-embedded-open-close-plain-alist}.
@end defvar
address@hidden calc-logunits-power-reference
address@hidden calc-logunits-field-reference
address@hidden calc-lu-power-reference
address@hidden calc-lu-field-reference
See @ref{Logarithmic address@hidden
-The variables @code{calc-logunits-power-reference} and
address@hidden are unit expressions (written as
+The variables @code{calc-lu-power-reference} and
address@hidden are unit expressions (written as
strings) which Calc will use as reference quantities for logarithmic
units.
-The default value of @code{calc-logunits-power-reference} is @code{"mW"}
-and the default value of @code{calc-logunits-field-reference} is
+The default value of @code{calc-lu-power-reference} is @code{"mW"}
+and the default value of @code{calc-lu-field-reference} is
@code{"20 uPa"}.
@end defvar
@@ -36209,26 +36206,26 @@
@r{ v x@: I k T @: @: @:ltpt@:(x,v)}
@c
address@hidden a b@: l + @: @: @:lupoweradd@:(a,b)}
address@hidden a b@: H l + @: @: @:lufieldadd@:(a,b)}
address@hidden a b@: l - @: @: @:lupowersub@:(a,b)}
address@hidden a b@: H l - @: @: @:lufieldsub@:(a,b)}
address@hidden a b@: l * @: @: @:lupowermul@:(a,b)}
address@hidden a b@: H l * @: @: @:lufieldmul@:(a,b)}
address@hidden a b@: l / @: @: @:lupowerdiv@:(a,b)}
address@hidden a b@: H l / @: @: @:lufielddiv@:(a,b)}
address@hidden a@: l d @: @: @:dbpowerlevel@:(a)}
address@hidden a b@: O l d @: @:
@:dbpowerlevel@:(a,b)}
address@hidden a@: H l d @: @: @:dbfieldlevel@:(a)}
address@hidden a b@: O H l d @: @:
@:dbfieldlevel@:(a,b)}
address@hidden a@: l n @: @: @:nppowerlevel@:(a)}
address@hidden a b@: O l n @: @:
@:nppowerlevel@:(a,b)}
address@hidden a@: H l n @: @: @:npfieldlevel@:(a)}
address@hidden a b@: O H l n @: @:
@:npfieldlevel@:(a,b)}
address@hidden a@: l q @: @: @:powerquant@:(a)}
address@hidden a b@: O l q @: @: @:powerquant@:(a,b)}
address@hidden a@: H l q @: @: @:fieldquant@:(a)}
address@hidden a b@: O H l q @: @: @:fieldquant@:(a,b)}
address@hidden a b@: l + @: @: @:lupadd@:(a,b)}
address@hidden a b@: H l + @: @: @:lufadd@:(a,b)}
address@hidden a b@: l - @: @: @:lupsub@:(a,b)}
address@hidden a b@: H l - @: @: @:lufsub@:(a,b)}
address@hidden a b@: l * @: @: @:lupmul@:(a,b)}
address@hidden a b@: H l * @: @: @:lufmul@:(a,b)}
address@hidden a b@: l / @: @: @:lupdiv@:(a,b)}
address@hidden a b@: H l / @: @: @:lufdiv@:(a,b)}
address@hidden a@: l d @: @: @:dbpower@:(a)}
address@hidden a b@: O l d @: @: @:dbpower@:(a,b)}
address@hidden a@: H l d @: @: @:dbfield@:(a)}
address@hidden a b@: O H l d @: @: @:dbfield@:(a,b)}
address@hidden a@: l n @: @: @:nppower@:(a)}
address@hidden a b@: O l n @: @: @:nppower@:(a,b)}
address@hidden a@: H l n @: @: @:npfield@:(a)}
address@hidden a b@: O H l n @: @: @:npfield@:(a,b)}
address@hidden a@: l q @: @: @:pquant@:(a)}
address@hidden a b@: O l q @: @: @:pquant@:(a,b)}
address@hidden a@: H l q @: @: @:fquant@:(a)}
address@hidden a b@: O H l q @: @: @:fquant@:(a,b)}
@r{ a@: l s @: @: @:spn@:(a)}
@r{ a@: l m @: @: @:midi@:(a)}
@r{ a@: l f @: @: @:freq@:(a)}
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-03-17 00:43:54 +0000
+++ b/lisp/ChangeLog 2011-03-17 01:30:08 +0000
@@ -1,3 +1,40 @@
+2011-03-17 Jay Belanger <address@hidden>
+
+ * calc/README: Mention inclusion of musical notes.
+
+ * calc/calc-units.el (calc-lu-quant): Rename from
+ `calc-logunits-quantity'.
+ (calcFunc-lupquant): Rename from `calcFunc-powerquant'.
+ (calcFunc-lufquant): Rename from `calcFunc-fieldquant'.
+ (calc-db): Rename from `calc-dblevel'.
+ (calcFunc-dbpower): Rename from `calcFunc-dbpowerlevel'.
+ (calcFunc-dbfield): Rename from `calcFunc-dbfieldlevel'.
+ (calc-np): Rename from `calc-nplevel'.
+ (calcFunc-nppower): Rename from `calcFunc-nppowerlevel'.
+ (calcFunc-npfield): Rename from `calcFunc-npfieldlevel'.
+ (calc-lu-plus): Rename from `calc-logunits-add'.
+ (calcFunc-lupadd): Rename from `calcFunc-lupoweradd'.
+ (calcFunc-lufadd): Rename from `calcFunc-lufieldadd'.
+ (calc-lu-minus): Rename from `calc-logunits-sub'.
+ (calcFunc-lupsub): Rename from `calcFunc-lupowersub'.
+ (calcFunc-lufsub): Rename from `calcFunc-lufieldsub'.
+ (calc-lu-times): Rename from `calc-logunits-mul'.
+ (calcFunc-lupmul): Rename from `calcFunc-lupowermul'.
+ (calcFunc-lufmul): Rename from `calcFunc-lufieldmul'.
+ (calc-lu-divide): Rename from `calc-logunits-div'.
+ (calcFunc-lupdiv): Rename from `calcFunc-lupowerdiv'.
+ (calcFunc-lufdiv): Rename from `calcFunc-lufielddiv'.
+
+ * calc/calc-ext.el (calc-init-extensions): Update the names of the
+ functions being autoloaded.
+
+ * calc/calc.el (calc-lu-power-reference): Rename from
+ `calc-logunits-power-reference'.
+ (calc-lu-field-reference): Rename from
+ `calc-logunits-field-reference'.
+
+ * calc/calc-help (calc-l-prefix-help): Mention musical note functions.
+
2011-03-17 Stefan Monnier <address@hidden>
* minibuffer.el (completion-all-sorted-completions):
=== modified file 'lisp/calc/README'
--- a/lisp/calc/README 2011-02-07 00:54:23 +0000
+++ b/lisp/calc/README 2011-03-17 01:30:08 +0000
@@ -72,6 +72,8 @@
Emacs 24.1
+* Support for musical notes added.
+
* Support for logarithmic units added.
* Calc no longer uses the tex prefix for TeX specific unit
=== modified file 'lisp/calc/calc-ext.el'
--- a/lisp/calc/calc-ext.el 2011-03-06 04:28:39 +0000
+++ b/lisp/calc/calc-ext.el 2011-03-17 01:30:08 +0000
@@ -422,13 +422,13 @@
(define-key calc-mode-map "kT" 'calc-utpt)
(define-key calc-mode-map "l" nil)
- (define-key calc-mode-map "lq" 'calc-logunits-quantity)
- (define-key calc-mode-map "ld" 'calc-dblevel)
- (define-key calc-mode-map "ln" 'calc-nplevel)
- (define-key calc-mode-map "l+" 'calc-logunits-add)
- (define-key calc-mode-map "l-" 'calc-logunits-sub)
- (define-key calc-mode-map "l*" 'calc-logunits-mul)
- (define-key calc-mode-map "l/" 'calc-logunits-divide)
+ (define-key calc-mode-map "lq" 'calc-lu-quant)
+ (define-key calc-mode-map "ld" 'calc-db)
+ (define-key calc-mode-map "ln" 'calc-np)
+ (define-key calc-mode-map "l+" 'calc-lu-plus)
+ (define-key calc-mode-map "l-" 'calc-lu-minus)
+ (define-key calc-mode-map "l*" 'calc-lu-times)
+ (define-key calc-mode-map "l/" 'calc-lu-divide)
(define-key calc-mode-map "ls" 'calc-spn)
(define-key calc-mode-map "lm" 'calc-midi)
(define-key calc-mode-map "lf" 'calc-freq)
@@ -943,12 +943,11 @@
("calc-stuff" calc-explain-why calcFunc-clean
calcFunc-pclean calcFunc-pfloat calcFunc-pfrac)
- ("calc-units" calcFunc-usimplify calcFunc-lufieldadd
-calcFunc-lupoweradd calcFunc-lufieldsub calcFunc-lupowersub
-calcFunc-lufieldmul calcFunc-lupowermul calcFunc-lufielddiv
-calcFunc-lupowerdiv calcFunc-fieldquant calcFunc-powerquant
-calcFunc-dbfieldlevel calcFunc-dbpowerlevel calcFunc-npfieldlevel
-calcFunc-nppowerlevel calcFunc-spn calcFunc-midi calcFunc-freq
+ ("calc-units" calcFunc-usimplify calcFunc-lufadd calcFunc-lupadd
+calcFunc-lufsub calcFunc-lupsub calcFunc-lufmul calcFunc-lupmul
+calcFunc-lufdiv calcFunc-lupdiv calcFunc-fquant calcFunc-pquant
+calcFunc-dbfield calcFunc-dbpower calcFunc-npfield
+calcFunc-nppower calcFunc-spn calcFunc-midi calcFunc-freq
math-build-units-table math-build-units-table-buffer
math-check-unit-name math-convert-temperature math-convert-units
math-extract-units math-remove-units math-simplify-units
@@ -1180,9 +1179,9 @@
calc-enter-units-table calc-explain-units calc-extract-units
calc-get-unit-definition calc-permanent-units calc-quick-units
calc-remove-units calc-simplify-units calc-undefine-unit
-calc-view-units-table calc-logunits-quantity calc-dblevel
-calc-nplevel calc-logunits-add calc-logunits-sub
-calc-logunits-mul calc-logunits-divide calc-spn calc-midi
+calc-view-units-table calc-lu-quant calc-db
+calc-np calc-lu-plus calc-lu-minus
+calc-lu-times calc-lu-divide calc-spn calc-midi
calc-freq)
("calc-vec" calc-arrange-vector calc-build-vector calc-cnorm
=== modified file 'lisp/calc/calc-help.el'
--- a/lisp/calc/calc-help.el 2011-02-06 22:42:14 +0000
+++ b/lisp/calc/calc-help.el 2011-03-17 01:30:08 +0000
@@ -673,7 +673,9 @@
(interactive)
(calc-do-prefix-help
'("Quantity, DB level, Np level"
- "+, -, *, /")
+ "+, -, *, /"
+ "Scientific pitch notation, Midi number, Frequency"
+ )
"log units" ?l))
(defun calc-v-prefix-help ()
=== modified file 'lisp/calc/calc-units.el'
--- a/lisp/calc/calc-units.el 2011-03-06 04:36:15 +0000
+++ b/lisp/calc/calc-units.el 2011-03-17 01:30:08 +0000
@@ -1623,39 +1623,39 @@
coef)))
units)))))))
-(defun calcFunc-lufieldplus (a b)
+(defun calcFunc-lufadd (a b)
(math-logunits-add a b nil nil))
-(defun calcFunc-lupowerplus (a b)
+(defun calcFunc-lupadd (a b)
(math-logunits-add a b nil t))
-(defun calcFunc-lufieldminus (a b)
+(defun calcFunc-lufsub (a b)
(math-logunits-add a b t nil))
-(defun calcFunc-lupowerminus (a b)
+(defun calcFunc-lupsub (a b)
(math-logunits-add a b t t))
-(defun calc-logunits-add (arg)
+(defun calc-lu-plus (arg)
(interactive "P")
(calc-slow-wrapper
(if (calc-is-inverse)
(if (calc-is-hyperbolic)
- (calc-binary-op "lu-" 'calcFunc-lufieldminus arg)
- (calc-binary-op "lu-" 'calcFunc-lupowerminus arg))
+ (calc-binary-op "lu-" 'calcFunc-lufsub arg)
+ (calc-binary-op "lu-" 'calcFunc-lupsub arg))
(if (calc-is-hyperbolic)
- (calc-binary-op "lu+" 'calcFunc-lufieldplus arg)
- (calc-binary-op "lu+" 'calcFunc-lupowerplus arg)))))
+ (calc-binary-op "lu+" 'calcFunc-lufadd arg)
+ (calc-binary-op "lu+" 'calcFunc-lupadd arg)))))
-(defun calc-logunits-sub (arg)
+(defun calc-lu-minus (arg)
(interactive "P")
(calc-slow-wrapper
(if (calc-is-inverse)
(if (calc-is-hyperbolic)
- (calc-binary-op "lu+" 'calcFunc-lufieldplus arg)
- (calc-binary-op "lu+" 'calcFunc-lupowerplus arg))
+ (calc-binary-op "lu+" 'calcFunc-lufadd arg)
+ (calc-binary-op "lu+" 'calcFunc-lupadd arg))
(if (calc-is-hyperbolic)
- (calc-binary-op "lu-" 'calcFunc-lufieldminus arg)
- (calc-binary-op "lu-" 'calcFunc-lupowerminus arg)))))
+ (calc-binary-op "lu-" 'calcFunc-lufsub arg)
+ (calc-binary-op "lu-" 'calcFunc-lupsub arg)))))
(defun math-logunits-mul (a b power)
(let (logunit coef units number)
@@ -1719,39 +1719,39 @@
(math-div (math-conditional-apply 'calcFunc-ln b) (if power 2 1)))
units)))))))))
-(defun calcFunc-lufieldtimes (a b)
+(defun calcFunc-lufmul (a b)
(math-logunits-mul a b nil))
-(defun calcFunc-lupowertimes (a b)
+(defun calcFunc-lupmul (a b)
(math-logunits-mul a b t))
-(defun calc-logunits-mul (arg)
+(defun calc-lu-times (arg)
(interactive "P")
(calc-slow-wrapper
(if (calc-is-inverse)
(if (calc-is-hyperbolic)
- (calc-binary-op "lu/" 'calcFunc-lufielddiv arg)
- (calc-binary-op "lu/" 'calcFunc-lupowerdiv arg))
+ (calc-binary-op "lu/" 'calcFunc-lufdiv arg)
+ (calc-binary-op "lu/" 'calcFunc-lupdiv arg))
(if (calc-is-hyperbolic)
- (calc-binary-op "lu*" 'calcFunc-lufieldtimes arg)
- (calc-binary-op "lu*" 'calcFunc-lupowertimes arg)))))
+ (calc-binary-op "lu*" 'calcFunc-lufmul arg)
+ (calc-binary-op "lu*" 'calcFunc-lupmul arg)))))
-(defun calcFunc-lufielddiv (a b)
+(defun calcFunc-lufdiv (a b)
(math-logunits-divide a b nil))
-(defun calcFunc-lupowerdiv (a b)
+(defun calcFunc-lupdiv (a b)
(math-logunits-divide a b t))
-(defun calc-logunits-divide (arg)
+(defun calc-lu-divide (arg)
(interactive "P")
(calc-slow-wrapper
(if (calc-is-inverse)
(if (calc-is-hyperbolic)
- (calc-binary-op "lu*" 'calcFunc-lufieldtimes arg)
- (calc-binary-op "lu*" 'calcFunc-lupowertimes arg))
+ (calc-binary-op "lu*" 'calcFunc-lufmul arg)
+ (calc-binary-op "lu*" 'calcFunc-lupmul arg))
(if (calc-is-hyperbolic)
- (calc-binary-op "lu/" 'calcFunc-lufielddiv arg)
- (calc-binary-op "lu/" 'calcFunc-lupowerdiv arg)))))
+ (calc-binary-op "lu/" 'calcFunc-lufdiv arg)
+ (calc-binary-op "lu/" 'calcFunc-lupdiv arg)))))
(defun math-logunits-quant (val ref power)
(let* ((units (math-simplify (math-extract-units val)))
@@ -1777,29 +1777,29 @@
coeff))))
runits)))))
-(defvar calc-logunits-field-reference)
-(defvar calc-logunits-power-reference)
+(defvar calc-lu-field-reference)
+(defvar calc-lu-power-reference)
-(defun calcFunc-fieldquant (val &optional ref)
+(defun calcFunc-fquant (val &optional ref)
(unless ref
- (setq ref (math-read-expr calc-logunits-field-reference)))
+ (setq ref (math-read-expr calc-lu-field-reference)))
(math-logunits-quant val ref nil))
-(defun calcFunc-powerquant (val &optional ref)
+(defun calcFunc-pquant (val &optional ref)
(unless ref
- (setq ref (math-read-expr calc-logunits-power-reference)))
+ (setq ref (math-read-expr calc-lu-power-reference)))
(math-logunits-quant val ref t))
-(defun calc-logunits-quantity (arg)
+(defun calc-lu-quant (arg)
(interactive "P")
(calc-slow-wrapper
(if (calc-is-hyperbolic)
(if (calc-is-option)
- (calc-binary-op "lupq" 'calcFunc-fieldquant arg)
- (calc-unary-op "lupq" 'calcFunc-fieldquant arg))
+ (calc-binary-op "lupq" 'calcFunc-fquant arg)
+ (calc-unary-op "lupq" 'calcFunc-fquant arg))
(if (calc-is-option)
- (calc-binary-op "lufq" 'calcFunc-powerquant arg)
- (calc-unary-op "lufq" 'calcFunc-powerquant arg)))))
+ (calc-binary-op "lufq" 'calcFunc-pquant arg)
+ (calc-unary-op "lufq" 'calcFunc-pquant arg)))))
(defun math-logunits-level (val ref db power)
"Compute the value of VAL in decibels or nepers."
@@ -1817,47 +1817,47 @@
'(var Np var-Np)))
units)))
-(defun calcFunc-dbfieldlevel (val &optional ref)
+(defun calcFunc-dbfield (val &optional ref)
(unless ref
- (setq ref (math-read-expr calc-logunits-field-reference)))
+ (setq ref (math-read-expr calc-lu-field-reference)))
(math-logunits-level val ref t nil))
-(defun calcFunc-dbpowerlevel (val &optional ref)
+(defun calcFunc-dbpower (val &optional ref)
(unless ref
- (setq ref (math-read-expr calc-logunits-power-reference)))
+ (setq ref (math-read-expr calc-lu-power-reference)))
(math-logunits-level val ref t t))
-(defun calcFunc-npfieldlevel (val &optional ref)
+(defun calcFunc-npfield (val &optional ref)
(unless ref
- (setq ref (math-read-expr calc-logunits-field-reference)))
+ (setq ref (math-read-expr calc-lu-field-reference)))
(math-logunits-level val ref nil nil))
-(defun calcFunc-nppowerlevel (val &optional ref)
+(defun calcFunc-nppower (val &optional ref)
(unless ref
- (setq ref (math-read-expr calc-logunits-power-reference)))
+ (setq ref (math-read-expr calc-lu-power-reference)))
(math-logunits-level val ref nil t))
-(defun calc-dblevel (arg)
+(defun calc-db (arg)
(interactive "P")
(calc-slow-wrapper
(if (calc-is-hyperbolic)
(if (calc-is-option)
- (calc-binary-op "ludb" 'calcFunc-dbfieldlevel arg)
- (calc-unary-op "ludb" 'calcFunc-dbfieldlevel arg))
+ (calc-binary-op "ludb" 'calcFunc-dbfield arg)
+ (calc-unary-op "ludb" 'calcFunc-dbfield arg))
(if (calc-is-option)
- (calc-binary-op "ludb" 'calcFunc-dbpowerlevel arg)
- (calc-unary-op "ludb" 'calcFunc-dbpowerlevel arg)))))
+ (calc-binary-op "ludb" 'calcFunc-dbpower arg)
+ (calc-unary-op "ludb" 'calcFunc-dbpower arg)))))
-(defun calc-nplevel (arg)
+(defun calc-np (arg)
(interactive "P")
(calc-slow-wrapper
(if (calc-is-hyperbolic)
(if (calc-is-option)
- (calc-binary-op "lunp" 'calcFunc-npfieldlevel arg)
- (calc-unary-op "lunp" 'calcFunc-npfieldlevel arg))
+ (calc-binary-op "lunp" 'calcFunc-npfield arg)
+ (calc-unary-op "lunp" 'calcFunc-npfield arg))
(if (calc-is-option)
- (calc-binary-op "lunp" 'calcFunc-nppowerlevel arg)
- (calc-unary-op "lunp" 'calcFunc-nppowerlevel arg)))))
+ (calc-binary-op "lunp" 'calcFunc-nppower arg)
+ (calc-unary-op "lunp" 'calcFunc-nppower arg)))))
;;; Musical notes
=== modified file 'lisp/calc/calc.el'
--- a/lisp/calc/calc.el 2011-03-09 23:38:16 +0000
+++ b/lisp/calc/calc.el 2011-03-17 01:30:08 +0000
@@ -434,13 +434,13 @@
:group 'calc
:type 'boolean)
-(defcustom calc-logunits-field-reference
+(defcustom calc-lu-field-reference
"20 uPa"
"The default reference level for logarithmic units (field)."
:group 'calc
:type '(string))
-(defcustom calc-logunits-power-reference
+(defcustom calc-lu-power-reference
"mW"
"The default reference level for logarithmic units (power)."
:group 'calc
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103675: * lisp/calc/README: Mention musical notes.,
Jay Belanger <=