unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16706: emacs 24.3.1; calc/A command
@ 2014-02-10 11:15 Bart Nielsen
  2014-02-10 18:23 ` Achim Gratz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Bart Nielsen @ 2014-02-10 11:15 UTC (permalink / raw)
  To: 16706

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)







^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#16706: emacs 24.3.1; calc/A command
  2014-02-10 11:15 bug#16706: emacs 24.3.1; calc/A command Bart Nielsen
@ 2014-02-10 18:23 ` Achim Gratz
  2014-02-11  3:41 ` Jay Belanger
  2020-01-17 22:26 ` Mattias Engdegård
  2 siblings, 0 replies; 4+ messages in thread
From: Achim Gratz @ 2014-02-10 18:23 UTC (permalink / raw)
  To: Bart Nielsen; +Cc: 16706

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#16706: emacs 24.3.1; calc/A command
  2014-02-10 11:15 bug#16706: emacs 24.3.1; calc/A command Bart Nielsen
  2014-02-10 18:23 ` Achim Gratz
@ 2014-02-11  3:41 ` Jay Belanger
  2020-01-17 22:26 ` Mattias Engdegård
  2 siblings, 0 replies; 4+ messages in thread
From: Jay Belanger @ 2014-02-11  3:41 UTC (permalink / raw)
  To: Bart Nielsen; +Cc: 16706


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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#16706: emacs 24.3.1; calc/A command
  2014-02-10 11:15 bug#16706: emacs 24.3.1; calc/A command Bart Nielsen
  2014-02-10 18:23 ` Achim Gratz
  2014-02-11  3:41 ` Jay Belanger
@ 2020-01-17 22:26 ` Mattias Engdegård
  2 siblings, 0 replies; 4+ messages in thread
From: Mattias Engdegård @ 2020-01-17 22:26 UTC (permalink / raw)
  To: 16706-done; +Cc: Jay Belanger, Bart Nielsen

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.






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-17 22:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-10 11:15 bug#16706: emacs 24.3.1; calc/A command Bart Nielsen
2014-02-10 18:23 ` Achim Gratz
2014-02-11  3:41 ` Jay Belanger
2020-01-17 22:26 ` Mattias Engdegård

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).