GNU bug report logs - #16706
emacs 24.3.1; calc/A command

Previous Next

Package: emacs;

Reported by: Bart Nielsen <bart.utahman <at> gmail.com>

Date: Mon, 10 Feb 2014 11:16:01 UTC

Severity: minor

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16706 in the body.
You can then email your comments to 16706 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16706; Package emacs. (Mon, 10 Feb 2014 11:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bart Nielsen <bart.utahman <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 10 Feb 2014 11:16:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bart Nielsen <bart.utahman <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: emacs 24.3.1; calc/A command
Date: Mon, 10 Feb 2014 06:15:07 -0500
calc - single variable statistics tells me:

   Another commonly used mean, the RMS (root-mean-square), can be
computed for a vector of numbers simply by using the `A' command.


So:

I believe the RMS value for the vector [21 23 25 25] is 23.5584379788.  (RMS means ‘the root, of the mean, of the square — so 

<ret>
vM*
uM
Q

(returns that value)


A returns
47.1168759576


q1:  How do I figure out what A is doing?

q2: Isn’t this wrong?

Thanks

=====
Here’s the standard form for an error report: (the above just seemed cleaner. Maybe not.)
23.5584379788  

his bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.  Please check that
the From: line contains a valid email address.  After a delay of up
to one day, you should receive an acknowledgment at that address.

Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':

M-x calc
'[ 21 23 25 25 ]
<ret>
vM*
uM
Q

'[21 23 25 25 ]
A

leaves
2:  23.5584379788
1:  47.1168759576

on the stack.  Shouldn't A return 23.5584379788?




If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/usr/local/Cellar/emacs/24.3/share/emacs/24.3/etc/DEBUG.


In GNU Emacs 24.3.1 (x86_64-apple-darwin13.0.0)
 of 2014-01-24 on bmac.home
Configured using:
 `configure '--prefix=/usr/local/Cellar/emacs/24.3' '--without-dbus'
 '--enable-locallisppath=/usr/local/share/emacs/site-lisp'
 '--infodir=/usr/local/Cellar/emacs/24.3/share/info/emacs'
 '--without-gnutls' '--without-x' 'CC=clang''

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Info

Minor modes in effect:
  display-time-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
" H SPC DEL DEL DEL DEL DEL DEL SPC - SPC C a l c SPC
V e c t o r SPC M e d i a n " C-e C-@ - - - SPC s o
r t SPC DEL , SPC a v e r g DEL a g e SPC t h e SPC
m i d d l e DEL DEL DEL l DEL d l e C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-p C-@ - SPC a r i t h m e t i
c SPC m e a n ESC O A ESC O A ESC O A ESC O A ESC O
A ESC O A ESC O A C-x o ESC x c a l c RET ' 2 1 * 2
1 SPC + SPC 2 3 * 2 3 SPC + SPC 2 5 * 2 5 * 2 C-a (
s DEL DEL s q r t ( ( C-e ) / 4 ) RET C-y A C-h a C-g
C-h k A C-x o C-x o a A DEL C-x o C-x o SPC - - - SPC
n o , SPC i t ' DEL SPC o u g h t SPC t o SPC b e SPC
2 3 . 5 5 8 4 C-x o C-x o C-x o C-h C-g ' Y DEL C-y
C-a C-d C-d C-d C-d C-e RET RET v M * u + S U C-h k
S C-g C-x o C-x o ' s q r t ( C-g 4 / L 2 / E C-x o
C-x o C-x o C-x o C-s A ESC x r e p o r t SPC e m a
c s SPC b SPC RET

Recent messages:
Working...
Map: (Press ? for help):
Working... [3 times]
Undo!

Quit
Auto-saving...done
Quit
Working... [4 times]
Mark saved where search started

Load-path shadows:
/usr/local/share/emacs/site-lisp/gnuplot hides /usr/local/share/emacs/site-lisp/gnuplot-2012-11-04/gnuplot
/usr/local/share/emacs/site-lisp/gnuplot-gui hides /usr/local/share/emacs/site-lisp/gnuplot-2012-11-04/gnuplot-gui

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils help-fns help-mode apropos calc-forms
calc-frac calc-mode calc-math calc-arith calc-units calc-misc jka-compr
info tool-bar calc-undo calc-map calc-stat calccomp calc-alg calc-vec
calc-aent calc-menu easymenu calc-yank calc-ext calc calc-loaddefs
calc-macs misearch multi-isearch time-date edmacro kmacro time image
ediff-hook vc-hooks lisp-float-type tabulated-list newcomment lisp-mode
register page menu-bar rfn-eshadow timer jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
make-network-process multi-tty emacs)






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16706; Package emacs. (Mon, 10 Feb 2014 18:24:01 GMT) Full text and rfc822 format available.

Message #8 received at 16706 <at> debbugs.gnu.org (full text, mbox):

From: Achim Gratz <Stromeko <at> nexgo.de>
To: Bart Nielsen <bart.utahman <at> gmail.com>
Cc: 16706 <at> debbugs.gnu.org
Subject: Re: bug#16706: emacs 24.3.1; calc/A command
Date: Mon, 10 Feb 2014 19:23:27 +0100
Bart Nielsen writes:
> A returns
> 47.1168759576
>
>
> q1:  How do I figure out what A is doing?

The result indicates that it returns the vector magnitude or absolute of
the vector, which is exactly twice the RMS value for a four-element
vector.  In other words, you'd need to divide by sqrt(n) after A.
Looking up "A" through the index leads to a correct description of what
it does.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16706; Package emacs. (Tue, 11 Feb 2014 03:43:01 GMT) Full text and rfc822 format available.

Message #11 received at 16706 <at> debbugs.gnu.org (full text, mbox):

From: Jay Belanger <jay.p.belanger <at> gmail.com>
To: Bart Nielsen <bart.utahman <at> gmail.com>
Cc: jay.p.belanger <at> gmail.com, 16706 <at> debbugs.gnu.org
Subject: Re: bug#16706: emacs 24.3.1; calc/A command
Date: Mon, 10 Feb 2014 21:41:42 -0600
Hi Bart,

> calc - single variable statistics tells me:
>
>    Another commonly used mean, the RMS (root-mean-square), can be
> computed for a vector of numbers simply by using the `A' command.
>
>
> So:
>
> I believe the RMS value for the vector [21 23 25 25] is 23.5584379788.
> (RMS means ‘the root, of the mean, of the square — so

Of course, rms means "Richard M Stallman", too!

But as you noted, the manual is wrong.  I'm really surprised that such
an error has been around so long.  "A" should stand for "absolute
value", which for a vector should be the norm.
Offhand, I don't see the RMS function in Calc.  If it isn't there, I'll
(for now) remove that paragraph from the manual, and after the Emacs
feature freeze is over I'll put in the RMS function.  Then I'll put the
paragraph back in the manual, with the correct keybinding.

Jay




Reply sent to Mattias Engdegård <mattiase <at> acm.org>:
You have taken responsibility. (Fri, 17 Jan 2020 22:28:02 GMT) Full text and rfc822 format available.

Notification sent to Bart Nielsen <bart.utahman <at> gmail.com>:
bug acknowledged by developer. (Fri, 17 Jan 2020 22:28:02 GMT) Full text and rfc822 format available.

Message #16 received at 16706-done <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: 16706-done <at> debbugs.gnu.org
Cc: Jay Belanger <jay.p.belanger <at> gmail.com>,
 Bart Nielsen <bart.utahman <at> gmail.com>
Subject: bug#16706: emacs 24.3.1; calc/A command
Date: Fri, 17 Jan 2020 23:26:58 +0100
This bug seems to have been resolved but not closed, so let's do that.
A root mean square function (u R) has been present since 2015.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 15 Feb 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 43 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.