1 ;;; calc-menu.el --- a menu for Calc
3 ;; Copyright (C) 2007 Free Software Foundation, Inc.
5 ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
7 ;; This file is part of GNU Emacs.
9 ;; GNU Emacs is free software; you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation; either version 3, or (at your option)
14 ;; GNU Emacs is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details.
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the
21 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 ;; Boston, MA 02110-1301, USA.
26 (defvar calc-arithmetic-menu
29 ["-(1:)" calc-change-sign
30 :keys
"n" :active
(>= (calc-stack-size) 1)]
31 ["(2:) + (1:)" calc-plus
32 :keys
"+" :active
(>= (calc-stack-size) 2)]
33 ["(2:) - (1:)" calc-minus
34 :keys
"-" :active
(>= (calc-stack-size) 2)]
35 ["(2:) * (1:)" calc-times
36 :keys
"*" :active
(>= (calc-stack-size) 2)]
37 ["(2:) / (1:)" calc-divide
38 :keys
"/" :active
(>= (calc-stack-size) 2)]
39 ["(2:) ^ (1:)" calc-power
40 :keys
"^" :active
(>= (calc-stack-size) 2)]
44 (let ((calc-inverse-flag t
))
45 (call-interactively 'calc-power
)))
47 :active
(>= (calc-stack-size) 2)
48 :help
"The (1:)th root of (2:)"]
52 (call-interactively 'calc-abs
))
54 :active
(>= (calc-stack-size) 1)
55 :help
"Absolute value"]
59 (call-interactively 'calc-inv
))
61 :active
(>= (calc-stack-size) 1)]
65 (call-interactively 'calc-sqrt
))
67 :active
(>= (calc-stack-size) 1)]
71 (call-interactively 'calc-idiv
))
73 :active
(>= (calc-stack-size) 2)
74 :help
"The integer quotient of (2:) over (1:)"]
78 (call-interactively 'calc-mod
))
80 :active
(>= (calc-stack-size) 2)
81 :help
"The remainder when (2:) is divided by (1:)"])
86 (call-interactively 'calc-floor
))
88 :active
(>= (calc-stack-size) 1)
89 :help
"The greatest integer less than or equal to (1:)"]
93 (call-interactively 'calc-ceiling
))
95 :active
(>= (calc-stack-size) 1)
96 :help
"The smallest integer greater than or equal to (1:)"]
100 (call-interactively 'calc-round
))
102 :active
(>= (calc-stack-size) 1)
103 :help
"The nearest integer to (1:)"]
106 (require 'calc-arith
)
107 (call-interactively 'calc-trunc
))
109 :active
(>= (calc-stack-size) 1)
110 :help
"The integer part of (1:)"])
111 (list "Complex Numbers"
115 (call-interactively 'calc-re
))
117 :active
(>= (calc-stack-size) 1)]
121 (call-interactively 'calc-im
))
123 :active
(>= (calc-stack-size) 1)]
127 (call-interactively 'calc-conj
))
129 :active
(>= (calc-stack-size) 1)
130 :help
"The complex conjugate of (1:)"]
132 (progn (require 'calc-arith
)
133 (call-interactively 'calc-abs
))
135 :active
(>= (calc-stack-size) 1)
136 :help
"The length (absolute value) of (1:)"]
140 (call-interactively 'calc-argument
))
142 :active
(>= (calc-stack-size) 1)
143 :help
"The argument (polar angle) of (1:)"])
145 ["Convert (1:) to a float"
148 (call-interactively 'calc-float
))
150 :active
(>= (calc-stack-size) 1)]
151 ["Convert (1:) to a fraction"
154 (call-interactively 'calc-fraction
))
156 :active
(>= (calc-stack-size) 1)])
161 (call-interactively 'calc-word-size
))
163 ["Clip (1:) to word size"
166 (call-interactively 'calc-clip
))
168 :active
(>= (calc-stack-size) 1)
169 :help
"Reduce (1:) modulo 2^wordsize"]
173 (call-interactively 'calc-and
))
175 :active
(>= (calc-stack-size) 2)
176 :help
"Bitwise AND [modulo 2^wordsize]"]
180 (call-interactively 'calc-or
))
182 :active
(>= (calc-stack-size) 2)
183 :help
"Bitwise inclusive OR [modulo 2^wordsize]"]
187 (call-interactively 'calc-xor
))
189 :active
(>= (calc-stack-size) 2)
190 :help
"Bitwise exclusive OR [modulo 2^wordsize]"]
194 (call-interactively 'calc-diff
))
196 :active
(>= (calc-stack-size) 2)
197 :help
"Bitwise difference [modulo 2^wordsize]"]
201 (call-interactively 'calc-not
))
203 :active
(>= (calc-stack-size) 1)
204 :help
"Bitwise NOT [modulo 2^wordsize]"]
208 (call-interactively 'calc-lshift-binary
))
210 :active
(>= (calc-stack-size) 1)
211 :help
"Shift (1:)[modulo 2^wordsize] one bit left"]
215 (call-interactively 'calc-rshift-binary
))
217 :active
(>= (calc-stack-size) 1)
218 :help
"Shift (1:)[modulo 2^wordsize] one bit right, putting 0s on the left"]
219 ["arithmetic right shift(1:)"
222 (call-interactively 'calc-rshift-arith
))
224 :active
(>= (calc-stack-size) 1)
225 :help
"Shift (1:)[modulo 2^wordsize] one bit right, duplicating the leftmost bit"]
229 (call-interactively 'calc-rotate-binary
))
231 :active
(>= (calc-stack-size) 1)
232 :help
"Rotate (1:)[modulo 2^wordsize] one bit left"])
234 ["Help on Arithmetic"
235 (calc-info-goto-node "Arithmetic")])
236 "Menu for Calc's arithmetic functions.")
238 (defvar calc-scientific-function-menu
239 (list "Scientific Functions"
244 (call-interactively 'calc-pi
))
249 (let ((calc-hyperbolic-flag t
))
250 (call-interactively 'calc-pi
)))
255 (let ((calc-inverse-flag t
)
256 (calc-hyperbolic-flag t
))
257 (call-interactively 'calc-pi
)))
259 :help
"The golden ratio"]
263 (let ((calc-inverse-flag t
))
264 (call-interactively 'calc-pi
)))
266 :help
"Euler's constant"])
267 (list "Logs and Exps"
271 (call-interactively 'calc-ln
))
273 :active
(>= (calc-stack-size) 1)
274 :help
"The natural logarithm"]
278 (call-interactively 'calc-exp
))
280 :active
(>= (calc-stack-size) 1)]
284 (call-interactively 'calc-log10
))
286 :active
(>= (calc-stack-size) 1)
287 :help
"The common logarithm"]
291 (let ((calc-inverse-flag t
))
292 (call-interactively 'calc-log10
)))
294 :active
(>= (calc-stack-size) 1)]
295 ["log(2:) [base(1:)]"
298 (call-interactively 'calc-log
))
300 :active
(>= (calc-stack-size) 2)
301 :help
"The logarithm with an arbitrary base"]
305 :active
(>= (calc-stack-size) 2)])
306 (list "Trigonometric Functions"
310 (call-interactively 'calc-sin
))
312 :active
(>= (calc-stack-size) 1)]
316 (call-interactively 'calc-cos
))
318 :active
(>= (calc-stack-size) 1)]
322 (call-interactively 'calc-tan
))
324 :active
(>= (calc-stack-size) 1)]
328 (call-interactively 'calc-arcsin
))
330 :active
(>= (calc-stack-size) 1)]
334 (call-interactively 'calc-arccos
))
336 :active
(>= (calc-stack-size) 1)]
340 (call-interactively 'calc-arctan
))
342 :active
(>= (calc-stack-size) 1)]
346 (call-interactively 'calc-arctan2
))
348 :active
(>= (calc-stack-size) 2)]
356 :selected
(eq calc-angle-mode
'rad
)]
363 :selected
(eq calc-angle-mode
'deg
)]
370 :selected
(eq calc-angle-mode
'hms
)])
371 (list "Hyperbolic Functions"
375 (call-interactively 'calc-sinh
))
377 :active
(>= (calc-stack-size) 1)]
381 (call-interactively 'calc-cosh
))
383 :active
(>= (calc-stack-size) 1)]
387 (call-interactively 'calc-tanh
))
389 :active
(>= (calc-stack-size) 1)]
393 (call-interactively 'calc-arcsinh
))
395 :active
(>= (calc-stack-size) 1)]
399 (call-interactively 'calc-arccosh
))
401 :active
(>= (calc-stack-size) 1)]
405 (call-interactively 'calc-arctanh
))
407 :active
(>= (calc-stack-size) 1)])
408 (list "Advanced Math Functions"
412 (call-interactively 'calc-gamma
))
414 :active
(>= (calc-stack-size) 1)
415 :help
"The Euler Gamma function"]
418 (require 'calc-funcs
)
419 (call-interactively 'calc-inc-gamma
))
421 :active
(>= (calc-stack-size) 2)
422 :help
"The lower incomplete Gamma function"]
425 (require 'calc-funcs
)
426 (call-interactively 'calc-beta
))
428 :active
(>= (calc-stack-size) 2)
429 :help
"The Euler Beta function"]
432 (require 'calc-funcs
)
433 (call-interactively 'calc-inc-beta
))
435 :active
(>= (calc-stack-size) 3)
436 :help
"The incomplete Beta function"]
439 (require 'calc-funcs
)
440 (call-interactively 'calc-erf
))
442 :active
(>= (calc-stack-size) 1)
443 :help
"The error function"]
446 (require 'calc-funcs
)
447 (call-interactively 'calc-bessel-J
))
449 :active
(>= (calc-stack-size) 2)
450 :help
"The Bessel function of the first kind (of order (2:))"]
453 (require 'calc-funcs
)
454 (call-interactively 'calc-bessel-Y
))
456 :active
(>= (calc-stack-size) 2)
457 :help
"The Bessel function of the second kind (of order (2:))"])
458 (list "Combinatorial Functions"
462 (call-interactively 'calc-gcd
))
464 :active
(>= (calc-stack-size) 2)]
468 (call-interactively 'calc-lcm
))
470 :active
(>= (calc-stack-size) 2)]
474 (call-interactively 'calc-factorial
))
476 :active
(>= (calc-stack-size) 1)]
480 (call-interactively 'calc-choose
))
482 :active
(>= (calc-stack-size) 2)]
483 ["permutations(2:,1:)"
486 (call-interactively 'calc-perm
))
488 :active
(>= (calc-stack-size) 2)]
489 ["Primality test for (1:)"
492 (call-interactively 'calc-prime-test
))
494 :active
(>= (calc-stack-size) 1)
495 :help
"For large (1:), a probabilistic test"]
496 ["Factor (1:) into primes"
499 (call-interactively 'calc-prime-factors
))
501 :active
(>= (calc-stack-size) 1)]
502 ["Next prime after (1:)"
505 (call-interactively 'calc-next-prime
))
507 :active
(>= (calc-stack-size) 1)]
508 ["Previous prime before (1:)"
511 (call-interactively 'calc-prev-prime
))
513 :active
(>= (calc-stack-size) 1)]
517 (call-interactively 'calc-totient
))
519 :active
(>= (calc-stack-size) 1)
520 :help
"Euler's totient function"]
524 (call-interactively 'calc-random
))
526 :active
(>= (calc-stack-size) 1)
527 :help
"A random number >=1 and < (1:)"])
529 ["Help on Scientific Functions"
530 (calc-info-goto-node "Scientific Functions")])
531 "Menu for Calc's scientific functions.")
533 (defvar calc-algebra-menu
535 (list "Simplification"
539 (call-interactively 'calc-simplify
))
541 :active
(>= (calc-stack-size) 1)]
542 ["Simplify (1:) with extended rules"
545 (call-interactively 'calc-simplify-extended
))
547 :active
(>= (calc-stack-size) 1)
548 :help
"Apply possibly unsafe simplifications"])
550 ["Expand formula (1:)"
553 (call-interactively 'calc-expand-formula
))
555 :active
(>= (calc-stack-size) 1)
556 :help
"Expand (1:) into its defining formula, if possible"]
557 ["Evaluate variables in (1:)"
560 (call-interactively 'calc-evaluate
))
562 :active
(>= (calc-stack-size) 1)]
563 ["Make substitution in (1:)"
566 (call-interactively 'calc-substitute
))
568 :active
(>= (calc-stack-size) 1)
570 "Substitute all occurrences of a sub-expression with a new sub-expression"])
575 (call-interactively 'calc-factor
))
577 :active
(>= (calc-stack-size) 1)]
578 ["Collect terms in (1:)"
581 (call-interactively 'calc-collect
))
583 :active
(>= (calc-stack-size) 1)
584 :help
"Arrange as a polynomial in a given variable"]
588 (call-interactively 'calc-expand
))
590 :active
(>= (calc-stack-size) 1)
591 :help
"Apply distributive law everywhere"]
592 ["Find roots of (1:)"
595 (call-interactively 'calc-poly-roots
))
597 :active
(>= (calc-stack-size) 1)])
599 ["Differentiate (1:)"
602 (call-interactively 'calc-derivative
))
604 :active
(>= (calc-stack-size) 1)]
605 ["Integrate (1:) [indefinite]"
608 (call-interactively 'calc-integral
))
610 :active
(>= (calc-stack-size) 1)]
611 ["Integrate (1:) [definite]"
614 (let ((var (read-string "Integration variable: ")))
615 (calc-tabular-command 'calcFunc-integ
"Integration"
616 "intg" nil var nil nil
)))
618 :active
(>= (calc-stack-size) 1)]
619 ["Integrate (1:) [numeric]"
622 (call-interactively 'calc-num-integral
))
624 :active
(>= (calc-stack-size) 1)
625 :help
"Integrate using the open Romberg method"]
626 ["Taylor expand (1:)"
629 (call-interactively 'calc-taylor
))
631 :active
(>= (calc-stack-size) 1)]
632 ["Minimize (2:) [initial guess = (1:)]"
635 (call-interactively 'calc-find-minimum
))
637 :active
(>= (calc-stack-size) 2)
638 :help
"Find a local minimum"]
639 ["Maximize (2:) [initial guess = (1:)]"
642 (call-interactively 'calc-find-maximum
))
644 :active
(>= (calc-stack-size) 2)
645 :help
"Find a local maximum"])
647 ["Solve equation (1:)"
650 (call-interactively 'calc-solve-for
))
652 :active
(>= (calc-stack-size) 1)]
653 ["Solve equation (2:) numerically [initial guess = (1:)]"
656 (call-interactively 'calc-find-root
))
658 :active
(>= (calc-stack-size) 2)]
659 ["Find roots of polynomial (1:)"
662 (call-interactively 'calc-poly-roots
))
664 :active
(>= (calc-stack-size) 1)])
665 (list "Curve Fitting"
666 ["Fit (1:)=[x values, y values] to a curve"
669 (call-interactively 'calc-curve-fit
))
671 :active
(>= (calc-stack-size) 1)])
674 (calc-info-goto-node "Algebra")])
675 "Menu for Calc's algebraic facilities.")
678 (defvar calc-graphics-menu
680 ["Graph 2D [(1:)= y values, (2:)= x values]"
682 (require 'calc-graph
)
683 (call-interactively 'calc-graph-fast
))
685 :active
(>= (calc-stack-size) 2)]
686 ["Graph 3D [(1:)= z values, (2:)= y values, (3:)= x values]"
688 (require 'calc-graph
)
689 (call-interactively 'calc-graph-fast-3d
))
691 :active
(>= (calc-stack-size) 3)]
694 (calc-info-goto-node "Graphics")])
695 "Menu for Calc's graphics.")
698 (defvar calc-vectors-menu
699 (list "Matrices/Vectors"
701 ["(2:) + (1:)" calc-plus
702 :keys
"+" :active
(>= (calc-stack-size) 2)]
703 ["(2:) - (1:)" calc-minus
704 :keys
"-" :active
(>= (calc-stack-size) 2)]
705 ["(2:) * (1:)" calc-times
706 :keys
"*" :active
(>= (calc-stack-size) 2)]
709 (require 'calc-arith
)
710 (call-interactively 'calc-inv
))
712 :active
(>= (calc-stack-size) 1)]
713 ["Create an identity matrix"
716 (call-interactively 'calc-ident
))
721 (call-interactively 'calc-transpose
))
723 :active
(>= (calc-stack-size) 1)]
727 (call-interactively 'calc-mdet
))
729 :active
(>= (calc-stack-size) 1)]
733 (call-interactively 'calc-mtrace
))
735 :active
(>= (calc-stack-size) 1)]
736 ["LUD decompose (1:)"
739 (call-interactively 'calc-mlud
))
741 :active
(>= (calc-stack-size) 1)]
742 ["Extract a row from (1:)"
745 (call-interactively 'calc-mrow
))
747 :active
(>= (calc-stack-size) 1)]
748 ["Extract a column from (1:)"
751 (call-interactively 'calc-mcol
))
753 :active
(>= (calc-stack-size) 1)])
755 ["Extract the first element of (1:)"
758 (call-interactively 'calc-head
))
760 :active
(>= (calc-stack-size) 1)]
761 ["Extract an element from (1:)"
764 (call-interactively 'calc-mrow
))
766 :active
(>= (calc-stack-size) 1)]
770 (call-interactively 'calc-reverse-vector
))
772 :active
(>= (calc-stack-size) 1)]
776 (call-interactively 'calc-unpack
))
778 :active
(>= (calc-stack-size) 1)
779 :help
"Separate the elements of (1:)"]
783 (call-interactively 'calc-cross
))
785 :active
(>= (calc-stack-size) 2)
786 :help
"The cross product in R^3"]
790 :active
(>= (calc-stack-size) 2)
791 :help
"The dot product"]
792 ["Map a function across (1:)"
795 (call-interactively 'calc-map
))
797 :active
(>= (calc-stack-size) 1)
798 :help
"Apply a function to each element"])
799 (list "Vectors As Sets"
800 ["Remove duplicates from (1:)"
803 (call-interactively 'calc-remove-duplicates
))
805 :active
(>= (calc-stack-size) 1)]
809 (call-interactively 'calc-set-union
))
811 :active
(>= (calc-stack-size) 2)]
812 ["(2:) intersect (1:)"
815 (call-interactively 'calc-set-intersect
))
817 :active
(>= (calc-stack-size) 2)]
821 (call-interactively 'calc-set-difference
))
823 :help
"Set difference"
824 :active
(>= (calc-stack-size) 2)])
825 (list "Statistics On Vectors"
829 (call-interactively 'calc-vector-count
))
831 :active
(>= (calc-stack-size) 1)
832 :help
"The number of data values"]
836 (call-interactively 'calc-vector-sum
))
838 :active
(>= (calc-stack-size) 1)
839 :help
"The sum of the data values"]
843 (call-interactively 'calc-vector-max
))
845 :active
(>= (calc-stack-size) 1)
846 :help
"The maximum of the data values"]
850 (call-interactively 'calc-vector-min
))
852 :active
(>= (calc-stack-size) 1)
853 :help
"The minumum of the data values"]
857 (call-interactively 'calc-vector-mean
))
859 :active
(>= (calc-stack-size) 1)
860 :help
"The average (arithmetic mean) of the data values"]
861 ["mean(1:) with error"
864 (call-interactively 'calc-vector-mean-error
))
866 :active
(>= (calc-stack-size) 1)
867 :help
"The average (arithmetic mean) of the data values as an error form"]
871 (call-interactively 'calc-vector-sdev
))
873 :active
(>= (calc-stack-size) 1)
874 :help
"The sample sdev, sqrt[sum((values - mean)^2)/(N-1)]"]
878 (call-interactively 'calc-vector-variance
))
880 :active
(>= (calc-stack-size) 1)
881 :help
"The sample variance, sum((values - mean)^2)/(N-1)"]
882 ["population sdev(1:)"
885 (call-interactively 'calc-vector-pop-sdev
))
887 :active
(>= (calc-stack-size) 1)
888 :help
"The population sdev, sqrt[sum((values - mean)^2)/N]"]
889 ["population variance(1:)"
892 (call-interactively 'calc-vector-pop-variance
))
894 :active
(>= (calc-stack-size) 1)
895 :help
"The population variance, sum((values - mean)^2)/N"]
899 (call-interactively 'calc-vector-median
))
901 :active
(>= (calc-stack-size) 1)
902 :help
"The median of the data values"]
906 (call-interactively 'calc-vector-harmonic-mean
))
908 :active
(>= (calc-stack-size) 1)]
909 ["geometric mean(1:)"
912 (call-interactively 'calc-vector-geometric-mean
))
914 :active
(>= (calc-stack-size) 1)]
915 ["arithmetic-geometric mean(1:)"
918 (let ((calc-hyperbolic-flag t
))
919 (call-interactively 'calc-vector-geometric-mean
)))
921 :active
(>= (calc-stack-size) 1)]
923 (progn (require 'calc-arith
)
924 (call-interactively 'calc-abs
))
926 :active
(>= (calc-stack-size) 1)
927 :help
"The root-mean-square, or quadratic mean"])
928 ["Abbreviate long vectors"
931 (call-interactively 'calc-full-vectors
))
934 :selected
(not calc-full-vectors
)]
936 ["Help on Matrices/Vectors"
937 (calc-info-goto-node "Matrix Functions")])
938 "Menu for Calc's vector and matrix functions.")
940 (defvar calc-units-menu
942 ["Convert units in (1:)"
944 (require 'calc-units
)
945 (call-interactively 'calc-convert-units
))
947 :active
(>= (calc-stack-size) 1)]
948 ["Convert temperature in (1:)"
950 (require 'calc-units
)
951 (call-interactively 'calc-convert-temperature
))
953 :active
(>= (calc-stack-size) 1)]
954 ["Simplify units in (1:)"
956 (require 'calc-units
)
957 (call-interactively 'calc-simplify-units
))
959 :active
(>= (calc-stack-size) 1)]
962 (require 'calc-units
)
963 (call-interactively 'calc-view-units-table
))
967 (calc-info-goto-node "Units")])
968 "Menu for Calc's units functions.")
970 (defvar calc-variables-menu
972 ["Store (1:) into a variable"
974 (require 'calc-store
)
975 (call-interactively 'calc-store
))
977 :active
(>= (calc-stack-size) 1)]
978 ["Recall a variable value"
980 (require 'calc-store
)
981 (call-interactively 'calc-recall
))
983 ["Edit the value of a variable"
985 (require 'calc-store
)
986 (call-interactively 'calc-edit-variable
))
988 ["Exchange (1:) with a variable value"
990 (require 'calc-store
)
991 (call-interactively 'calc-store-exchange
))
993 :active
(>= (calc-stack-size) 1)]
994 ["Clear variable value"
996 (require 'calc-store
)
997 (call-interactively 'calc-unstore
))
999 ["Evaluate variables in (1:)"
1002 (call-interactively 'calc-evaluate
))
1004 :active
(>= (calc-stack-size) 1)]
1005 ["Evaluate (1:), assigning a value to a variable"
1007 (require 'calc-store
)
1008 (call-interactively 'calc-let
))
1010 :active
(>= (calc-stack-size) 1)
1011 :help
"Evaluate (1:) under a temporary assignment of a variable"]
1013 ["Help on Variables"
1014 (calc-info-goto-node "Store and Recall")])
1015 "Menu for Calc's variables.")
1017 (defvar calc-stack-menu
1022 :active
(>= (calc-stack-size) 1)]
1023 ["Switch (1:) and (2:)"
1026 :active
(>= (calc-stack-size) 2)]
1030 :active
(>= (calc-stack-size) 1)]
1033 (require 'calc-yank
)
1034 (call-interactively calc-edit
))
1036 :active
(>= (calc-stack-size) 1)]
1039 (calc-info-goto-node "Stack and Trail")])
1040 "Menu for Calc's stack functions.")
1042 (defvar calc-errors-menu
1046 (require 'calc-undo
)
1047 (call-interactively 'calc-undo
))
1051 (require 'calc-undo
)
1052 (call-interactively 'calc-redo
))
1057 (calc-info-goto-node "Introduction")
1058 (Info-goto-node "Undo"))]))
1060 (defvar calc-modes-menu
1065 (call-interactively 'calc-precision
))
1067 :help
"Set the precision for floating point calculations"]
1070 (require 'calc-frac
)
1071 (call-interactively 'calc-frac-mode
))
1074 :selected calc-prefer-frac
1075 :help
"Leave integer quotients as fractions"]
1079 (require 'calc-mode
)
1080 (calc-symbolic-mode nil
))
1083 :selected calc-symbolic-mode
1084 :help
"Leave functions producing inexact answers in symbolic form"]
1088 (require 'calc-mode
)
1089 (calc-infinite-mode nil
))
1092 :selected calc-infinite-mode
1093 :help
"Let expressions like 1/0 produce infinite results"]
1094 ["Abbreviate long vectors"
1096 (require 'calc-mode
)
1097 (call-interactively 'calc-full-vectors
))
1100 :selected
(not calc-full-vectors
)]
1101 (list "Angle Measure"
1104 (require 'calc-math
)
1105 (call-interactively 'calc-radians-mode
))
1108 :selected
(eq calc-angle-mode
'rad
)]
1111 (require 'calc-math
)
1112 (call-interactively 'calc-degrees-mode
))
1115 :selected
(eq calc-angle-mode
'deg
)]
1118 (require 'calc-math
)
1119 (call-interactively 'calc-hms-mode
))
1122 :selected
(eq calc-angle-mode
'hms
)])
1127 (call-interactively 'calc-decimal-radix
))
1130 :selected
(= calc-number-radix
10)]
1134 (call-interactively 'calc-binary-radix
))
1137 :selected
(= calc-number-radix
2)]
1141 (call-interactively 'calc-octal-radix
))
1144 :selected
(= calc-number-radix
8)]
1148 (call-interactively 'calc-hex-radix
))
1151 :selected
(= calc-number-radix
16)]
1155 (call-interactively 'calc-radix
))
1160 (= calc-number-radix
10)
1161 (= calc-number-radix
2)
1162 (= calc-number-radix
8)
1163 (= calc-number-radix
16)))])
1164 (list "Float Format"
1167 (require 'calc-mode
)
1168 (call-interactively 'calc-normal-notation
))
1171 :selected
(eq (car-safe calc-float-format
) 'float
)]
1174 (require 'calc-mode
)
1175 (call-interactively 'calc-fix-notation
))
1178 :selected
(eq (car-safe calc-float-format
) 'fix
)]
1179 ["Scientific notation"
1181 (require 'calc-mode
)
1182 (call-interactively 'calc-sci-notation
))
1185 :selected
(eq (car-safe calc-float-format
) 'sci
)]
1186 ["Engineering notation"
1188 (require 'calc-mode
)
1189 (call-interactively 'calc-eng-notation
))
1192 :selected
(eq (car-safe calc-float-format
) 'eng
)])
1193 (list "Complex Format"
1196 (require 'calc-cplx
)
1197 (calc-complex-notation))
1199 :selected
(not calc-complex-format
)
1201 :help
"Display complex numbers as ordered pairs."]
1204 (require 'calc-cplx
)
1207 :selected
(eq calc-complex-format
'i
)
1209 :help
"Display complex numbers as a+bi."]
1212 (require 'calc-cplx
)
1215 :selected
(eq calc-complex-format
'j
)
1217 :help
"Display complex numbers as a+bj."]
1219 (calc-complex-notation)
1221 :selected
(and calc-complex-format
1222 (not (eq calc-complex-format
'i
))
1223 (not (eq calc-complex-format
'j
)))
1228 (require 'calc-cplx
)
1229 (calc-polar-mode nil
))
1231 :selected
(eq calc-complex-mode
'polar
)
1233 :help
"Prefer polar form for complex numbers."])
1237 (require 'calc-mode
)
1239 (calc-incomplete-algebraic-mode
1240 (calc-algebraic-mode t
))
1241 (calc-algebraic-mode
1242 (calc-algebraic-mode nil
))))
1244 :selected
(not calc-algebraic-mode
)]
1247 (require 'calc-mode
)
1249 calc-incomplete-algebraic-mode
1250 (not calc-algebraic-mode
))
1251 (calc-algebraic-mode nil
)))
1254 :selected
(and calc-algebraic-mode
1255 (not calc-incomplete-algebraic-mode
))
1256 :help
"Keys which start numeric entry also start algebraic entry"]
1257 ["Incomplete algebraic mode"
1259 (require 'calc-mode
)
1260 (unless calc-incomplete-algebraic-mode
1261 (calc-algebraic-mode t
)))
1264 :selected calc-incomplete-algebraic-mode
1265 :help
"Only ( and [ begin algebraic entry"]
1266 ["Total algebraic mode"
1268 (require 'calc-mode
)
1269 (unless (eq calc-algebraic-mode
'total
)
1270 (calc-total-algebraic-mode nil
)))
1273 :selected
(eq calc-algebraic-mode
'total
)
1274 :help
"All regular letters and punctuation begin algebraic entry"])
1278 (require 'calc-lang
)
1279 (call-interactively 'calc-normal-language
))
1282 :selected
(eq calc-language nil
)]
1285 (require 'calc-lang
)
1286 (call-interactively 'calc-big-language
))
1289 :selected
(eq calc-language
'big
)
1290 :help
"Use textual approximations to various mathematical notations"]
1293 (require 'calc-lang
)
1294 (call-interactively 'calc-flat-language
))
1297 :selected
(eq calc-language
'flat
)
1298 :help
"Write matrices on a single line"]
1301 (require 'calc-lang
)
1302 (call-interactively 'calc-c-language
))
1305 :selected
(eq calc-language
'c
)]
1308 (require 'calc-lang
)
1309 (call-interactively 'calc-pascal-language
))
1312 :selected
(eq calc-language
'pascal
)]
1315 (require 'calc-lang
)
1316 (call-interactively 'calc-fortran-language
))
1319 :selected
(eq calc-language
'fortran
)]
1322 (require 'calc-lang
)
1323 (call-interactively 'calc-tex-language
))
1326 :selected
(eq calc-language
'tex
)]
1329 (require 'calc-lang
)
1330 (call-interactively 'calc-latex-language
))
1333 :selected
(eq calc-language
'latex
)]
1336 (require 'calc-lang
)
1337 (call-interactively 'calc-eqn-language
))
1340 :selected
(eq calc-language
'eqn
)]
1343 (require 'calc-lang
)
1344 (call-interactively 'calc-yacas-language
))
1347 :selected
(eq calc-language
'yacas
)]
1350 (require 'calc-lang
)
1351 (call-interactively 'calc-maxima-language
))
1354 :selected
(eq calc-language
'maxima
)]
1357 (require 'calc-lang
)
1358 (call-interactively 'calc-giac-language
))
1361 :selected
(eq calc-language
'giac
)]
1364 (require 'calc-lang
)
1365 (call-interactively 'calc-mathematica-language
))
1368 :selected
(eq calc-language
'math
)]
1371 (require 'calc-lang
)
1372 (call-interactively 'calc-maple-language
))
1375 :selected
(eq calc-language
'maple
)])
1377 ["Save mode settings" calc-save-modes
:keys
"m m"]
1380 (calc-info-goto-node "Mode settings")])
1381 "Menu for Calc's mode settings.")
1383 (defvar calc-help-menu
1397 (calc-info-goto-node "Introduction")
1398 (Info-goto-node "Help Commands"))])
1399 "Menu for Calc's help functions.")
1401 (defvar calc-mode-map
)
1408 :visible
'(eq major-mode
'calc-mode
)
1409 calc-arithmetic-menu
1410 calc-scientific-function-menu
1423 (call-interactively 'calc-reset
))
1424 :help
"Reset Calc to its initial state"]
1425 ["Quit" calc-quit
]))
1427 (provide 'calc-menu
)
1429 ;; arch-tag: 9612c86a-cd4f-4baa-ab0b-40af7344d21f