Mercurial > emacs
annotate lisp/calc/calc-misc.el @ 58479:562c6a62c99e
(math-scalar-functions, math-nonscalar-functions)
(math-scalar-if-args-functions, math-real-functions)
(math-positive-functions, math-nonnegative-functions)
(math-real-scalar-functions, math-real-if-arg-functions)
(math-integer-functions, math-num-integer-functions)
(math-rounding-functions, math-float-rounding-functions)
(math-integer-if-args-functions, math-super-types):
Move declarations to earlier in file.
(math-unit-prefixes): Declared it.
(math-floor-prec, math-trunc-prec): New variables.
(math-trunc-fancy): Replace variable prec by declared variable.
(math-floor-fancy): Replace variable prec by declared variable.
(math-com-bterms): New variable.
(math-commutative-equal, math-commutative-collect): Replace variable
bterms by declared variable.
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Wed, 24 Nov 2004 21:45:04 +0000 |
parents | d9073880a6e4 |
children | d11199c971ec 0fe073a08cef |
rev | line source |
---|---|
41267
e9718841a5b1
(math-fixnump, math-fixnatnump, calcFunc-trunc)
Colin Walters <walters@gnu.org>
parents:
41045
diff
changeset
|
1 ;;; calc-misc.el --- miscellaenous functions for Calc |
e9718841a5b1
(math-fixnump, math-fixnatnump, calcFunc-trunc)
Colin Walters <walters@gnu.org>
parents:
41045
diff
changeset
|
2 |
40998
ee9c2872370b
Use `frame-width' instead of `screen-width',
Eli Zaretskii <eliz@gnu.org>
parents:
40785
diff
changeset
|
3 ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. |
41267
e9718841a5b1
(math-fixnump, math-fixnatnump, calcFunc-trunc)
Colin Walters <walters@gnu.org>
parents:
41045
diff
changeset
|
4 |
e9718841a5b1
(math-fixnump, math-fixnatnump, calcFunc-trunc)
Colin Walters <walters@gnu.org>
parents:
41045
diff
changeset
|
5 ;; Author: David Gillespie <daveg@synaptics.com> |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
49263
diff
changeset
|
6 ;; Maintainers: D. Goel <deego@gnufans.org> |
49263
f4d68f97221e
Add new maintainer (deego).
Deepak Goel <deego@gnufans.org>
parents:
44248
diff
changeset
|
7 ;; Colin Walters <walters@debian.org> |
40785 | 8 |
9 ;; This file is part of GNU Emacs. | |
10 | |
11 ;; GNU Emacs is distributed in the hope that it will be useful, | |
12 ;; but WITHOUT ANY WARRANTY. No author or distributor | |
13 ;; accepts responsibility to anyone for the consequences of using it | |
14 ;; or for whether it serves any particular purpose or works at all, | |
15 ;; unless he says so in writing. Refer to the GNU Emacs General Public | |
16 ;; License for full details. | |
17 | |
18 ;; Everyone is granted permission to copy, modify and redistribute | |
19 ;; GNU Emacs, but only under the conditions described in the | |
20 ;; GNU Emacs General Public License. A copy of this license is | |
21 ;; supposed to have been given to you along with GNU Emacs so you | |
22 ;; can know your rights and responsibilities. It should be in a | |
23 ;; file named COPYING. Among other things, the copyright notice | |
24 ;; and this notice must be preserved on all copies. | |
25 | |
41267
e9718841a5b1
(math-fixnump, math-fixnatnump, calcFunc-trunc)
Colin Walters <walters@gnu.org>
parents:
41045
diff
changeset
|
26 ;;; Commentary: |
40785 | 27 |
41267
e9718841a5b1
(math-fixnump, math-fixnatnump, calcFunc-trunc)
Colin Walters <walters@gnu.org>
parents:
41045
diff
changeset
|
28 ;;; Code: |
40785 | 29 |
30 ;; This file is autoloaded from calc.el. | |
31 (require 'calc) | |
32 | |
33 (require 'calc-macs) | |
34 | |
35 (defun calc-Need-calc-misc () nil) | |
36 | |
37 | |
38 (defun calc-dispatch-help (arg) | |
39 "M-# is a prefix key; follow it with one of these letters: | |
40 | |
41 For turning Calc on and off: | |
42 C calc. Start the Calculator in a window at the bottom of the screen. | |
43 O calc-other-window. Start the Calculator but don't select its window. | |
44 B calc-big-or-small. Control whether to use the full Emacs screen for Calc. | |
45 Q quick-calc. Use the Calculator in the minibuffer. | |
46 K calc-keypad. Start the Calculator in keypad mode (X window system only). | |
47 E calc-embedded. Use the Calculator on a formula in this editing buffer. | |
48 J calc-embedded-select. Like E, but select appropriate half of => or :=. | |
49 W calc-embedded-word. Like E, but activate a single word, i.e., a number. | |
50 Z calc-user-invocation. Invoke Calc in the way you defined with `Z I' cmd. | |
51 X calc-quit. Turn Calc off. | |
52 | |
53 For moving data into and out of Calc: | |
54 G calc-grab-region. Grab the region defined by mark and point into Calc. | |
55 R calc-grab-rectangle. Grab the rectangle defined by mark, point into Calc. | |
56 : calc-grab-sum-down. Grab a rectangle and sum the columns. | |
57 _ calc-grab-sum-across. Grab a rectangle and sum the rows. | |
58 Y calc-copy-to-buffer. Copy a value from the stack into the editing buffer. | |
59 | |
60 For use with Embedded mode: | |
61 A calc-embedded-activate. Find and activate all :='s and =>'s in buffer. | |
62 D calc-embedded-duplicate. Make a copy of this formula and select it. | |
63 F calc-embedded-new-formula. Insert a new formula at current point. | |
64 N calc-embedded-next. Advance cursor to next known formula in buffer. | |
65 P calc-embedded-previous. Advance cursor to previous known formula. | |
66 U calc-embedded-update-formula. Re-evaluate formula at point. | |
67 ` calc-embedded-edit. Use calc-edit to edit formula at point. | |
68 | |
69 Documentation: | |
70 I calc-info. Read the Calculator manual in the Emacs Info system. | |
71 T calc-tutorial. Run the Calculator Tutorial using the Emacs Info system. | |
72 S calc-summary. Read the Summary from the Calculator manual in Info. | |
73 | |
74 Miscellaneous: | |
75 L calc-load-everything. Load all parts of the Calculator into memory. | |
76 M read-kbd-macro. Read a region of keystroke names as a keyboard macro. | |
77 0 (zero) calc-reset. Reset Calc stack and modes to default state. | |
78 | |
79 Press twice (`M-# M-#' or `M-# #') to turn Calc on or off using the same | |
80 Calc user interface as before (either M-# C or M-# K; initially M-# C)." | |
81 (interactive "P") | |
82 (calc-check-defines) | |
83 (if calc-dispatch-help | |
84 (progn | |
85 (save-window-excursion | |
86 (describe-function 'calc-dispatch-help) | |
87 (let ((win (get-buffer-window "*Help*"))) | |
88 (if win | |
89 (let (key) | |
90 (select-window win) | |
91 (while (progn | |
92 (message "Calc options: Calc, Keypad, ... %s" | |
93 "press SPC, DEL to scroll, C-g to cancel") | |
94 (memq (car (setq key (calc-read-key t))) | |
95 '(? ?\C-h ?\C-? ?\C-v ?\M-v))) | |
96 (condition-case err | |
97 (if (memq (car key) '(? ?\C-v)) | |
98 (scroll-up) | |
99 (scroll-down)) | |
100 (error (beep)))) | |
101 (calc-unread-command (cdr key)))))) | |
102 (calc-do-dispatch nil)) | |
103 (let ((calc-dispatch-help t)) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
104 (calc-do-dispatch arg)))) |
40785 | 105 |
106 | |
107 (defun calc-big-or-small (arg) | |
108 "Toggle Calc between full-screen and regular mode." | |
109 (interactive "P") | |
110 (let ((cwin (get-buffer-window "*Calculator*")) | |
111 (twin (get-buffer-window "*Calc Trail*")) | |
112 (kwin (get-buffer-window "*Calc Keypad*"))) | |
113 (if cwin | |
114 (setq calc-full-mode | |
115 (if kwin | |
40998
ee9c2872370b
Use `frame-width' instead of `screen-width',
Eli Zaretskii <eliz@gnu.org>
parents:
40785
diff
changeset
|
116 (and twin (eq (window-width twin) (frame-width))) |
ee9c2872370b
Use `frame-width' instead of `screen-width',
Eli Zaretskii <eliz@gnu.org>
parents:
40785
diff
changeset
|
117 (eq (window-height cwin) (1- (frame-height)))))) |
40785 | 118 (setq calc-full-mode (if arg |
119 (> (prefix-numeric-value arg) 0) | |
120 (not calc-full-mode))) | |
121 (if kwin | |
122 (progn | |
123 (calc-quit) | |
124 (calc-do-keypad calc-full-mode nil)) | |
125 (if cwin | |
126 (progn | |
127 (calc-quit) | |
128 (calc nil calc-full-mode nil)))) | |
129 (message (if calc-full-mode | |
41267
e9718841a5b1
(math-fixnump, math-fixnatnump, calcFunc-trunc)
Colin Walters <walters@gnu.org>
parents:
41045
diff
changeset
|
130 "Now using full screen for Calc" |
e9718841a5b1
(math-fixnump, math-fixnatnump, calcFunc-trunc)
Colin Walters <walters@gnu.org>
parents:
41045
diff
changeset
|
131 "Now using partial screen for Calc")))) |
40785 | 132 |
57711
d9073880a6e4
(calc-other-window): Use an extra argument instead of `interactive-p'.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57430
diff
changeset
|
133 (defun calc-other-window (&optional interactive) |
40785 | 134 "Invoke the Calculator in another window." |
57711
d9073880a6e4
(calc-other-window): Use an extra argument instead of `interactive-p'.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57430
diff
changeset
|
135 (interactive "p") |
40785 | 136 (if (memq major-mode '(calc-mode calc-trail-mode)) |
137 (progn | |
138 (other-window 1) | |
139 (if (memq major-mode '(calc-mode calc-trail-mode)) | |
140 (other-window 1))) | |
141 (if (get-buffer-window "*Calculator*") | |
142 (calc-quit) | |
143 (let ((win (selected-window))) | |
57711
d9073880a6e4
(calc-other-window): Use an extra argument instead of `interactive-p'.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
57430
diff
changeset
|
144 (calc nil win interactive))))) |
40785 | 145 |
146 (defun another-calc () | |
147 "Create another, independent Calculator buffer." | |
148 (interactive) | |
149 (if (eq major-mode 'calc-mode) | |
150 (mapcar (function | |
151 (lambda (v) | |
152 (set-default v (symbol-value v)))) calc-local-var-list)) | |
153 (set-buffer (generate-new-buffer "*Calculator*")) | |
154 (pop-to-buffer (current-buffer)) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
155 (calc-mode)) |
40785 | 156 |
157 (defun calc-info () | |
158 "Run the Emacs Info system on the Calculator documentation." | |
159 (interactive) | |
160 (select-window (get-largest-window)) | |
41359
5042a5269efd
(calc-info): Don't perform voodoo, just (info "Calc").
Colin Walters <walters@gnu.org>
parents:
41267
diff
changeset
|
161 (info "Calc")) |
40785 | 162 |
57430
f4e473491598
(calc-info-goto-node): New function.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
163 (defun calc-info-goto-node (node) |
f4e473491598
(calc-info-goto-node): New function.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
164 "Go to a node in the Calculator info documentation." |
f4e473491598
(calc-info-goto-node): New function.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
165 (interactive) |
f4e473491598
(calc-info-goto-node): New function.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
166 (select-window (get-largest-window)) |
f4e473491598
(calc-info-goto-node): New function.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
167 (Info-goto-node (concat "(Calc)" node))) |
f4e473491598
(calc-info-goto-node): New function.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
168 |
40785 | 169 (defun calc-tutorial () |
170 "Run the Emacs Info system on the Calculator Tutorial." | |
171 (interactive) | |
172 (if (get-buffer-window "*Calculator*") | |
173 (calc-quit)) | |
57430
f4e473491598
(calc-info-goto-node): New function.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
174 (calc-info-goto-node "Interactive Tutorial") |
40785 | 175 (calc-other-window) |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
176 (message "Welcome to the Calc Tutorial!")) |
40785 | 177 |
178 (defun calc-info-summary () | |
179 "Run the Emacs Info system on the Calculator Summary." | |
180 (interactive) | |
57430
f4e473491598
(calc-info-goto-node): New function.
Jay Belanger <jay.p.belanger@gmail.com>
parents:
52401
diff
changeset
|
181 (calc-info-goto-node "Summary")) |
40785 | 182 |
183 (defun calc-help () | |
184 (interactive) | |
185 (let ((msgs (append | |
186 '("Press `h' for complete help; press `?' repeatedly for a summary" | |
187 "Letter keys: Negate; Precision; Yank; Why; Xtended cmd; Quit" | |
188 "Letter keys: SHIFT + Undo, reDo; Keep-args; Inverse, Hyperbolic" | |
189 "Letter keys: SHIFT + sQrt; Sin, Cos, Tan; Exp, Ln, logB" | |
190 "Letter keys: SHIFT + Floor, Round; Abs, conJ, arG; Pi" | |
191 "Letter keys: SHIFT + Num-eval; More-recn; eXec-kbd-macro" | |
192 "Other keys: +, -, *, /, ^, \\ (int div), : (frac div)" | |
193 "Other keys: & (1/x), | (concat), % (modulo), ! (factorial)" | |
194 "Other keys: ' (alg-entry), = (eval), ` (edit); M-RET (last-args)" | |
195 "Other keys: SPC/RET (enter/dup), LFD (over); < > (scroll horiz)" | |
196 "Other keys: DEL (drop), M-DEL (drop-above); { } (scroll vert)" | |
197 "Other keys: TAB (swap/roll-dn), M-TAB (roll-up)" | |
198 "Other keys: [ , ; ] (vector), ( , ) (complex), ( ; ) (polar)" | |
199 "Prefix keys: Algebra, Binary/business, Convert, Display" | |
200 "Prefix keys: Functions, Graphics, Help, J (select)" | |
201 "Prefix keys: Kombinatorics/statistics, Modes, Store/recall" | |
202 "Prefix keys: Trail/time, Units/statistics, Vector/matrix" | |
203 "Prefix keys: Z (user), SHIFT + Z (define)" | |
204 "Prefix keys: prefix + ? gives further help for that prefix") | |
205 (list (format | |
206 " Calc %s by Dave Gillespie, daveg@synaptics.com" | |
207 calc-version))))) | |
208 (if calc-full-help-flag | |
209 msgs | |
210 (if (or calc-inverse-flag calc-hyperbolic-flag) | |
211 (if calc-inverse-flag | |
212 (if calc-hyperbolic-flag | |
213 (calc-inv-hyp-prefix-help) | |
214 (calc-inverse-prefix-help)) | |
215 (calc-hyperbolic-prefix-help)) | |
216 (setq calc-help-phase | |
217 (if (eq this-command last-command) | |
218 (% (1+ calc-help-phase) (1+ (length msgs))) | |
219 0)) | |
220 (let ((msg (nth calc-help-phase msgs))) | |
221 (message "%s" (if msg | |
222 (concat msg ":" | |
223 (make-string (- (apply 'max | |
224 (mapcar 'length | |
225 msgs)) | |
226 (length msg)) 32) | |
227 " [?=MORE]") | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
228 ""))))))) |
40785 | 229 |
230 | |
231 | |
232 | |
233 ;;;; Stack and buffer management. | |
234 | |
235 | |
236 (defun calc-do-handle-whys () | |
237 (setq calc-why (sort calc-next-why | |
238 (function | |
239 (lambda (x y) | |
240 (and (eq (car x) '*) (not (eq (car y) '*)))))) | |
241 calc-next-why nil) | |
242 (if (and calc-why (or (eq calc-auto-why t) | |
243 (and (eq (car (car calc-why)) '*) | |
244 calc-auto-why))) | |
245 (progn | |
246 (calc-extensions) | |
247 (calc-explain-why (car calc-why) | |
248 (if (eq calc-auto-why t) | |
249 (cdr calc-why) | |
250 (if calc-auto-why | |
251 (eq (car (nth 1 calc-why)) '*)))) | |
252 (setq calc-last-why-command this-command) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
253 (calc-clear-command-flag 'clear-message)))) |
40785 | 254 |
255 (defun calc-record-why (&rest stuff) | |
256 (if (eq (car stuff) 'quiet) | |
257 (setq stuff (cdr stuff)) | |
258 (if (and (symbolp (car stuff)) | |
259 (cdr stuff) | |
260 (or (Math-objectp (nth 1 stuff)) | |
261 (and (Math-vectorp (nth 1 stuff)) | |
262 (math-constp (nth 1 stuff))) | |
263 (math-infinitep (nth 1 stuff)))) | |
264 (setq stuff (cons '* stuff)) | |
265 (if (and (stringp (car stuff)) | |
266 (string-match "\\`\\*" (car stuff))) | |
267 (setq stuff (cons '* (cons (substring (car stuff) 1) | |
268 (cdr stuff))))))) | |
269 (setq calc-next-why (cons stuff calc-next-why)) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
270 nil) |
40785 | 271 |
272 ;;; True if A is a constant or vector of constants. [P x] [Public] | |
273 (defun math-constp (a) | |
274 (or (Math-scalarp a) | |
275 (and (memq (car a) '(sdev intv mod vec)) | |
276 (progn | |
277 (while (and (setq a (cdr a)) | |
278 (or (Math-scalarp (car a)) ; optimization | |
279 (math-constp (car a))))) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
280 (null a))))) |
40785 | 281 |
282 | |
283 (defun calc-roll-down-stack (n &optional m) | |
284 (if (< n 0) | |
285 (calc-roll-up-stack (- n) m) | |
286 (if (or (= n 0) (> n (calc-stack-size))) (setq n (calc-stack-size))) | |
287 (or m (setq m 1)) | |
288 (and (> n 1) | |
289 (< m n) | |
290 (if (and calc-any-selections | |
291 (not calc-use-selections)) | |
292 (calc-roll-down-with-selections n m) | |
293 (calc-pop-push-list n | |
294 (append (calc-top-list m 1) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
295 (calc-top-list (- n m) (1+ m)))))))) |
40785 | 296 |
297 (defun calc-roll-up-stack (n &optional m) | |
298 (if (< n 0) | |
299 (calc-roll-down-stack (- n) m) | |
300 (if (or (= n 0) (> n (calc-stack-size))) (setq n (calc-stack-size))) | |
301 (or m (setq m 1)) | |
302 (and (> n 1) | |
303 (< m n) | |
304 (if (and calc-any-selections | |
305 (not calc-use-selections)) | |
306 (calc-roll-up-with-selections n m) | |
307 (calc-pop-push-list n | |
308 (append (calc-top-list (- n m) 1) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
309 (calc-top-list m (- n m -1)))))))) |
40785 | 310 |
311 | |
312 (defun calc-do-refresh () | |
313 (if calc-hyperbolic-flag | |
314 (progn | |
315 (setq calc-display-dirty t) | |
316 nil) | |
317 (calc-refresh) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
318 t)) |
40785 | 319 |
320 | |
321 (defun calc-record-list (vals &optional prefix) | |
322 (while vals | |
323 (or (eq (car vals) 'top-of-stack) | |
324 (progn | |
325 (calc-record (car vals) prefix) | |
326 (setq prefix "..."))) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
327 (setq vals (cdr vals)))) |
40785 | 328 |
329 | |
330 (defun calc-last-args-stub (arg) | |
331 (interactive "p") | |
332 (calc-extensions) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
333 (calc-last-args arg)) |
40785 | 334 |
335 | |
336 (defun calc-power (arg) | |
337 (interactive "P") | |
338 (calc-slow-wrapper | |
339 (if (and calc-extensions-loaded | |
340 (calc-is-inverse)) | |
341 (calc-binary-op "root" 'calcFunc-nroot arg nil nil) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
342 (calc-binary-op "^" 'calcFunc-pow arg nil nil '^)))) |
40785 | 343 |
344 (defun calc-mod (arg) | |
345 (interactive "P") | |
346 (calc-slow-wrapper | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
347 (calc-binary-op "%" 'calcFunc-mod arg nil nil '%))) |
40785 | 348 |
349 (defun calc-inv (arg) | |
350 (interactive "P") | |
351 (calc-slow-wrapper | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
352 (calc-unary-op "inv" 'calcFunc-inv arg))) |
40785 | 353 |
354 (defun calc-percent () | |
355 (interactive) | |
356 (calc-slow-wrapper | |
357 (calc-pop-push-record-list | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
358 1 "%" (list (list 'calcFunc-percent (calc-top-n 1)))))) |
40785 | 359 |
360 | |
361 (defun calc-over (n) | |
362 (interactive "P") | |
363 (if n | |
364 (calc-enter (- (prefix-numeric-value n))) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
365 (calc-enter -2))) |
40785 | 366 |
367 | |
368 (defun calc-pop-above (n) | |
369 (interactive "P") | |
370 (if n | |
371 (calc-pop (- (prefix-numeric-value n))) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
372 (calc-pop -2))) |
40785 | 373 |
374 (defun calc-roll-down (n) | |
375 (interactive "P") | |
376 (calc-wrapper | |
377 (let ((nn (prefix-numeric-value n))) | |
378 (cond ((null n) | |
379 (calc-roll-down-stack 2)) | |
380 ((> nn 0) | |
381 (calc-roll-down-stack nn)) | |
382 ((= nn 0) | |
383 (calc-pop-push-list (calc-stack-size) | |
384 (reverse | |
385 (calc-top-list (calc-stack-size))))) | |
386 (t | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
387 (calc-roll-down-stack (calc-stack-size) (- nn))))))) |
40785 | 388 |
389 (defun calc-roll-up (n) | |
390 (interactive "P") | |
391 (calc-wrapper | |
392 (let ((nn (prefix-numeric-value n))) | |
393 (cond ((null n) | |
394 (calc-roll-up-stack 3)) | |
395 ((> nn 0) | |
396 (calc-roll-up-stack nn)) | |
397 ((= nn 0) | |
398 (calc-pop-push-list (calc-stack-size) | |
399 (reverse | |
400 (calc-top-list (calc-stack-size))))) | |
401 (t | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
402 (calc-roll-up-stack (calc-stack-size) (- nn))))))) |
40785 | 403 |
404 | |
405 | |
406 | |
407 ;;; Other commands. | |
408 | |
409 (defun calc-num-prefix-name (n) | |
410 (cond ((eq n '-) "- ") | |
411 ((equal n '(4)) "C-u ") | |
412 ((consp n) (format "%d " (car n))) | |
413 ((integerp n) (format "%d " n)) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
414 (t ""))) |
40785 | 415 |
416 (defun calc-missing-key (n) | |
417 "This is a placeholder for a command which needs to be loaded from calc-ext. | |
418 When this key is used, calc-ext (the Calculator extensions module) will be | |
419 loaded and the keystroke automatically re-typed." | |
420 (interactive "P") | |
421 (calc-extensions) | |
422 (if (keymapp (key-binding (char-to-string last-command-char))) | |
423 (message "%s%c-" (calc-num-prefix-name n) last-command-char)) | |
424 (calc-unread-command) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
425 (setq prefix-arg n)) |
40785 | 426 |
427 (defun calc-shift-Y-prefix-help () | |
428 (interactive) | |
429 (calc-extensions) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
430 (calc-do-prefix-help calc-Y-help-msgs "other" ?Y)) |
40785 | 431 |
432 | |
433 | |
434 | |
435 (defun calcDigit-letter () | |
436 (interactive) | |
437 (if (calc-minibuffer-contains "[-+]?\\(1[1-9]\\|[2-9][0-9]\\)#.*") | |
438 (progn | |
439 (setq last-command-char (upcase last-command-char)) | |
440 (calcDigit-key)) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
441 (calcDigit-nondigit))) |
40785 | 442 |
443 | |
444 ;; A Lisp version of temp_minibuffer_message from minibuf.c. | |
445 (defun calc-temp-minibuffer-message (m) | |
446 (let ((savemax (point-max))) | |
447 (save-excursion | |
448 (goto-char (point-max)) | |
449 (insert m)) | |
450 (let ((okay nil)) | |
451 (unwind-protect | |
452 (progn | |
453 (sit-for 2) | |
454 (identity 1) ; this forces a call to QUIT; in bytecode.c. | |
455 (setq okay t)) | |
456 (progn | |
457 (delete-region savemax (point-max)) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
458 (or okay (abort-recursive-edit))))))) |
40785 | 459 |
460 | |
461 (put 'math-with-extra-prec 'lisp-indent-hook 1) | |
462 | |
463 | |
464 ;;; Concatenate two vectors, or a vector and an object. [V O O] [Public] | |
465 (defun math-concat (v1 v2) | |
466 (if (stringp v1) | |
467 (concat v1 v2) | |
468 (calc-extensions) | |
469 (if (and (or (math-objvecp v1) (math-known-scalarp v1)) | |
470 (or (math-objvecp v2) (math-known-scalarp v2))) | |
471 (append (if (and (math-vectorp v1) | |
472 (or (math-matrixp v1) | |
473 (not (math-matrixp v2)))) | |
474 v1 | |
475 (list 'vec v1)) | |
476 (if (and (math-vectorp v2) | |
477 (or (math-matrixp v2) | |
478 (not (math-matrixp v1)))) | |
479 (cdr v2) | |
480 (list v2))) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
481 (list '| v1 v2)))) |
40785 | 482 |
483 | |
484 ;;; True if A is zero. Works for un-normalized values. [P n] [Public] | |
485 (defun math-zerop (a) | |
486 (if (consp a) | |
487 (cond ((memq (car a) '(bigpos bigneg)) | |
488 (while (eq (car (setq a (cdr a))) 0)) | |
489 (null a)) | |
490 ((memq (car a) '(frac float polar mod)) | |
491 (math-zerop (nth 1 a))) | |
492 ((eq (car a) 'cplx) | |
493 (and (math-zerop (nth 1 a)) (math-zerop (nth 2 a)))) | |
494 ((eq (car a) 'hms) | |
495 (and (math-zerop (nth 1 a)) | |
496 (math-zerop (nth 2 a)) | |
497 (math-zerop (nth 3 a))))) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
498 (eq a 0))) |
40785 | 499 |
500 | |
501 ;;; True if A is real and negative. [P n] [Public] | |
502 | |
503 (defun math-negp (a) | |
504 (if (consp a) | |
505 (cond ((eq (car a) 'bigpos) nil) | |
506 ((eq (car a) 'bigneg) (cdr a)) | |
507 ((memq (car a) '(float frac)) | |
508 (Math-integer-negp (nth 1 a))) | |
509 ((eq (car a) 'hms) | |
510 (if (math-zerop (nth 1 a)) | |
511 (if (math-zerop (nth 2 a)) | |
512 (math-negp (nth 3 a)) | |
513 (math-negp (nth 2 a))) | |
514 (math-negp (nth 1 a)))) | |
515 ((eq (car a) 'date) | |
516 (math-negp (nth 1 a))) | |
517 ((eq (car a) 'intv) | |
518 (or (math-negp (nth 3 a)) | |
519 (and (math-zerop (nth 3 a)) | |
520 (memq (nth 1 a) '(0 2))))) | |
521 ((equal a '(neg (var inf var-inf))) t)) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
522 (< a 0))) |
40785 | 523 |
524 ;;; True if A is a negative number or an expression the starts with '-'. | |
525 (defun math-looks-negp (a) ; [P x] [Public] | |
526 (or (Math-negp a) | |
527 (eq (car-safe a) 'neg) | |
528 (and (memq (car-safe a) '(* /)) | |
529 (or (math-looks-negp (nth 1 a)) | |
530 (math-looks-negp (nth 2 a)))) | |
531 (and (eq (car-safe a) '-) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
532 (math-looks-negp (nth 1 a))))) |
40785 | 533 |
534 | |
535 ;;; True if A is real and positive. [P n] [Public] | |
536 (defun math-posp (a) | |
537 (if (consp a) | |
538 (cond ((eq (car a) 'bigpos) (cdr a)) | |
539 ((eq (car a) 'bigneg) nil) | |
540 ((memq (car a) '(float frac)) | |
541 (Math-integer-posp (nth 1 a))) | |
542 ((eq (car a) 'hms) | |
543 (if (math-zerop (nth 1 a)) | |
544 (if (math-zerop (nth 2 a)) | |
545 (math-posp (nth 3 a)) | |
546 (math-posp (nth 2 a))) | |
547 (math-posp (nth 1 a)))) | |
548 ((eq (car a) 'date) | |
549 (math-posp (nth 1 a))) | |
550 ((eq (car a) 'mod) | |
551 (not (math-zerop (nth 1 a)))) | |
552 ((eq (car a) 'intv) | |
553 (or (math-posp (nth 2 a)) | |
554 (and (math-zerop (nth 2 a)) | |
555 (memq (nth 1 a) '(0 1))))) | |
556 ((equal a '(var inf var-inf)) t)) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
557 (> a 0))) |
40785 | 558 |
41267
e9718841a5b1
(math-fixnump, math-fixnatnump, calcFunc-trunc)
Colin Walters <walters@gnu.org>
parents:
41045
diff
changeset
|
559 (defalias 'math-fixnump 'integerp) |
e9718841a5b1
(math-fixnump, math-fixnatnump, calcFunc-trunc)
Colin Walters <walters@gnu.org>
parents:
41045
diff
changeset
|
560 (defalias 'math-fixnatnump 'natnump) |
40785 | 561 |
562 | |
563 ;;; True if A is an even integer. [P R R] [Public] | |
564 (defun math-evenp (a) | |
565 (if (consp a) | |
566 (and (memq (car a) '(bigpos bigneg)) | |
567 (= (% (nth 1 a) 2) 0)) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
568 (= (% a 2) 0))) |
40785 | 569 |
570 ;;; Compute A / 2, for small or big integer A. [I i] | |
571 ;;; If A is negative, type of truncation is undefined. | |
572 (defun math-div2 (a) | |
573 (if (consp a) | |
574 (if (cdr a) | |
575 (math-normalize (cons (car a) (math-div2-bignum (cdr a)))) | |
576 0) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
577 (/ a 2))) |
40785 | 578 |
579 (defun math-div2-bignum (a) ; [l l] | |
580 (if (cdr a) | |
581 (cons (+ (/ (car a) 2) (* (% (nth 1 a) 2) 500)) | |
582 (math-div2-bignum (cdr a))) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
583 (list (/ (car a) 2)))) |
40785 | 584 |
585 | |
586 ;;; Reject an argument to a calculator function. [Public] | |
587 (defun math-reject-arg (&optional a p option) | |
588 (if option | |
589 (calc-record-why option p a) | |
590 (if p | |
591 (calc-record-why p a))) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
592 (signal 'wrong-type-argument (and a (if p (list p a) (list a))))) |
40785 | 593 |
594 | |
595 ;;; Coerce A to be an integer (by truncation toward zero). [I N] [Public] | |
596 (defun math-trunc (a &optional prec) | |
597 (cond (prec | |
598 (calc-extensions) | |
599 (math-trunc-special a prec)) | |
600 ((Math-integerp a) a) | |
601 ((Math-looks-negp a) | |
602 (math-neg (math-trunc (math-neg a)))) | |
603 ((eq (car a) 'float) | |
604 (math-scale-int (nth 1 a) (nth 2 a))) | |
605 (t (calc-extensions) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
606 (math-trunc-fancy a)))) |
41267
e9718841a5b1
(math-fixnump, math-fixnatnump, calcFunc-trunc)
Colin Walters <walters@gnu.org>
parents:
41045
diff
changeset
|
607 (defalias 'calcFunc-trunc 'math-trunc) |
40785 | 608 |
609 ;;; Coerce A to be an integer (by truncation toward minus infinity). [I N] | |
610 (defun math-floor (a &optional prec) ; [Public] | |
611 (cond (prec | |
612 (calc-extensions) | |
613 (math-floor-special a prec)) | |
614 ((Math-integerp a) a) | |
615 ((Math-messy-integerp a) (math-trunc a)) | |
616 ((Math-realp a) | |
617 (if (Math-negp a) | |
618 (math-add (math-trunc a) -1) | |
619 (math-trunc a))) | |
620 (t (calc-extensions) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
621 (math-floor-fancy a)))) |
41267
e9718841a5b1
(math-fixnump, math-fixnatnump, calcFunc-trunc)
Colin Walters <walters@gnu.org>
parents:
41045
diff
changeset
|
622 (defalias 'calcFunc-floor 'math-floor) |
40785 | 623 |
624 | |
625 (defun math-imod (a b) ; [I I I] [Public] | |
626 (if (and (not (consp a)) (not (consp b))) | |
627 (if (= b 0) | |
628 (math-reject-arg a "*Division by zero") | |
629 (% a b)) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
630 (cdr (math-idivmod a b)))) |
40785 | 631 |
632 | |
633 (defun calcFunc-inv (m) | |
634 (if (Math-vectorp m) | |
635 (progn | |
636 (calc-extensions) | |
637 (if (math-square-matrixp m) | |
638 (or (math-with-extra-prec 2 (math-matrix-inv-raw m)) | |
639 (math-reject-arg m "*Singular matrix")) | |
640 (math-reject-arg m 'square-matrixp))) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
641 (math-div 1 m))) |
40785 | 642 |
643 | |
644 (defun math-do-working (msg arg) | |
40998
ee9c2872370b
Use `frame-width' instead of `screen-width',
Eli Zaretskii <eliz@gnu.org>
parents:
40785
diff
changeset
|
645 (or executing-kbd-macro |
40785 | 646 (progn |
647 (calc-set-command-flag 'clear-message) | |
648 (if math-working-step | |
649 (if math-working-step-2 | |
650 (setq msg (format "[%d/%d] %s" | |
651 math-working-step math-working-step-2 msg)) | |
652 (setq msg (format "[%d] %s" math-working-step msg)))) | |
653 (message "Working... %s = %s" msg | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
654 (math-showing-full-precision (math-format-number arg)))))) |
40785 | 655 |
656 | |
657 ;;; Compute A modulo B, defined in terms of truncation toward minus infinity. | |
658 (defun math-mod (a b) ; [R R R] [Public] | |
659 (cond ((and (Math-zerop a) (not (eq (car-safe a) 'mod))) a) | |
660 ((Math-zerop b) | |
661 (math-reject-arg a "*Division by zero")) | |
662 ((and (Math-natnump a) (Math-natnump b)) | |
663 (math-imod a b)) | |
664 ((and (Math-anglep a) (Math-anglep b)) | |
665 (math-sub a (math-mul (math-floor (math-div a b)) b))) | |
666 (t (calc-extensions) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
667 (math-mod-fancy a b)))) |
40785 | 668 |
669 | |
670 | |
671 ;;; General exponentiation. | |
672 | |
673 (defun math-pow (a b) ; [O O N] [Public] | |
674 (cond ((equal b '(var nan var-nan)) | |
675 b) | |
676 ((Math-zerop a) | |
677 (if (and (Math-scalarp b) (Math-posp b)) | |
678 (if (math-floatp b) (math-float a) a) | |
679 (calc-extensions) | |
680 (math-pow-of-zero a b))) | |
681 ((or (eq a 1) (eq b 1)) a) | |
682 ((or (equal a '(float 1 0)) (equal b '(float 1 0))) a) | |
683 ((Math-zerop b) | |
684 (if (Math-scalarp a) | |
685 (if (or (math-floatp a) (math-floatp b)) | |
686 '(float 1 0) 1) | |
687 (calc-extensions) | |
688 (math-pow-zero a b))) | |
689 ((and (Math-integerp b) (or (Math-numberp a) (Math-vectorp a))) | |
690 (if (and (equal a '(float 1 1)) (integerp b)) | |
691 (math-make-float 1 b) | |
692 (math-with-extra-prec 2 | |
693 (math-ipow a b)))) | |
694 (t | |
695 (calc-extensions) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
696 (math-pow-fancy a b)))) |
40785 | 697 |
698 (defun math-ipow (a n) ; [O O I] [Public] | |
699 (cond ((Math-integer-negp n) | |
700 (math-ipow (math-div 1 a) (Math-integer-neg n))) | |
701 ((not (consp n)) | |
702 (if (and (Math-ratp a) (> n 20)) | |
703 (math-iipow-show a n) | |
704 (math-iipow a n))) | |
705 ((math-evenp n) | |
706 (math-ipow (math-mul a a) (math-div2 n))) | |
707 (t | |
708 (math-mul a (math-ipow (math-mul a a) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
709 (math-div2 (math-add n -1))))))) |
40785 | 710 |
711 (defun math-iipow (a n) ; [O O S] | |
712 (cond ((= n 0) 1) | |
713 ((= n 1) a) | |
714 ((= (% n 2) 0) (math-iipow (math-mul a a) (/ n 2))) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
715 (t (math-mul a (math-iipow (math-mul a a) (/ n 2)))))) |
40785 | 716 |
717 (defun math-iipow-show (a n) ; [O O S] | |
718 (math-working "pow" a) | |
719 (let ((val (cond | |
720 ((= n 0) 1) | |
721 ((= n 1) a) | |
722 ((= (% n 2) 0) (math-iipow-show (math-mul a a) (/ n 2))) | |
723 (t (math-mul a (math-iipow-show (math-mul a a) (/ n 2))))))) | |
724 (math-working "pow" val) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
725 val)) |
40785 | 726 |
727 | |
728 (defun math-read-radix-digit (dig) ; [D S; Z S] | |
729 (if (> dig ?9) | |
730 (if (< dig ?A) | |
731 nil | |
732 (- dig 55)) | |
733 (if (>= dig ?0) | |
734 (- dig ?0) | |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
735 nil))) |
40785 | 736 |
737 | |
738 ;;; Bug reporting | |
739 | |
41377
be3e9c2f0159
(report-calc-bug): Use `reporter-prompt-for-summary-p'.
Colin Walters <walters@gnu.org>
parents:
41363
diff
changeset
|
740 (defun report-calc-bug () |
40785 | 741 "Report a bug in Calc, the GNU Emacs calculator. |
742 Prompts for bug subject. Leaves you in a mail buffer." | |
41377
be3e9c2f0159
(report-calc-bug): Use `reporter-prompt-for-summary-p'.
Colin Walters <walters@gnu.org>
parents:
41363
diff
changeset
|
743 (interactive) |
be3e9c2f0159
(report-calc-bug): Use `reporter-prompt-for-summary-p'.
Colin Walters <walters@gnu.org>
parents:
41363
diff
changeset
|
744 (let ((reporter-prompt-for-summary-p t)) |
be3e9c2f0159
(report-calc-bug): Use `reporter-prompt-for-summary-p'.
Colin Walters <walters@gnu.org>
parents:
41363
diff
changeset
|
745 (reporter-submit-bug-report calc-bug-address "Calc" '(calc-version) |
be3e9c2f0159
(report-calc-bug): Use `reporter-prompt-for-summary-p'.
Colin Walters <walters@gnu.org>
parents:
41363
diff
changeset
|
746 nil nil |
be3e9c2f0159
(report-calc-bug): Use `reporter-prompt-for-summary-p'.
Colin Walters <walters@gnu.org>
parents:
41363
diff
changeset
|
747 "Please describe exactly what actions triggered the bug and the |
41363
f17cae9ea728
(report-calc-bug): Use reporter.el.
Colin Walters <walters@gnu.org>
parents:
41359
diff
changeset
|
748 precise symptoms of the bug. If possible, include a backtrace by |
f17cae9ea728
(report-calc-bug): Use reporter.el.
Colin Walters <walters@gnu.org>
parents:
41359
diff
changeset
|
749 doing 'M-x toggle-debug-on-error', then reproducing the bug. |
41377
be3e9c2f0159
(report-calc-bug): Use `reporter-prompt-for-summary-p'.
Colin Walters <walters@gnu.org>
parents:
41363
diff
changeset
|
750 " ))) |
41267
e9718841a5b1
(math-fixnump, math-fixnatnump, calcFunc-trunc)
Colin Walters <walters@gnu.org>
parents:
41045
diff
changeset
|
751 (defalias 'calc-report-bug 'report-calc-bug) |
40785 | 752 |
52401 | 753 ;;; arch-tag: 7984d9d0-62e5-41dc-afb8-e904b975f250 |
41045
3491bfbd825e
(math-fixnump, math-fixnatnump, calcFunc-trunc, calcFunc-floor,
Colin Walters <walters@gnu.org>
parents:
40998
diff
changeset
|
754 ;;; calc-misc.el ends here |