* ISO - functions to unpack a +/- b in calc
@ 2017-03-20 1:11 Bart Nielsen
0 siblings, 0 replies; only message in thread
From: Bart Nielsen @ 2017-03-20 1:11 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1070 bytes --]
the functions to unpack a +/- b into constituent components.
Jay Bellinger recommended something akin to:
(defun calcFunc-remsdev (a) [remove standard deviation]
(interactive)
(cond ((and (consp a)
(eq (car a) 'sdev))
(nth 1 a))
((and (consp a)
(eq (car a) 'vec))
(cons 'vec (mapcar 'calcFunc-remsdev (cdr a))))
(t
a)))
(defun calc-remsdev (arg) [get standard deviation]
(interactive "P")
(calc-slow-wrapper
(calc-unary-op "rsd" 'calcFunc-remsdev arg)))
(defun calcFunc-getsdev (a)
(interactive)
(cond ((and (consp a)
(eq (car a) 'sdev))
(nth 2 a))
((and (consp a)
(eq (car a) 'vec))
(cons 'vec (mapcar 'calcFunc-getsdev (cdr a))))
(t
a)))
(defun calc-getsdev (arg)
(interactive "P")
(calc-slow-wrapper
(calc-unary-op "gsd" 'calcFunc-getsdev arg)))
But if there is already something else out there, or if you have a better idea, I’d take that instead.
Thanks
Bart
[-- Attachment #2: Type: text/html, Size: 4838 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-20 1:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-20 1:11 ISO - functions to unpack a +/- b in calc Bart Nielsen
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).