• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/calc/

Lines Matching +defs:expr +defs:string

663 math-build-polynomial-expr math-expand-formula math-expr-contains
664 math-expr-contains-count math-expr-depends math-expr-height
665 math-expr-subst math-expr-weight math-integer-plus math-is-linear
677 calcFunc-tderiv math-expr-calls math-integral-q02 math-integral-q12
735 math-comp-height math-comp-width math-compose-expr
736 math-composition-to-string math-stack-value-offset-fancy
737 math-vector-is-string math-vector-to-string)
745 calc-do-embedded-activate calc-embedded-evaluate-expr
835 math-factor-contains math-factor-expr math-factor-expr-part
836 math-factor-expr-try math-factor-finish math-factor-poly-coefs
890 math-single-units-in-expr-p math-to-standard-units
891 math-units-in-expr-p)
1234 (make-string
1239 (concat " " (char-to-string key)
1583 (math-evaluate-expr (calc-top (- n)))
1585 (calc-pop-push-record-list n "eval" (mapcar 'math-evaluate-expr
1600 (calc-pop-push-record 1 "num" (math-evaluate-expr (calc-top 1)))))
1640 (let ((val (math-read-expr (symbol-value v))))
1832 (name (if (string-match "\\`calc-" name)
1834 (pos (string-match (char-to-string key) name))
1847 (char-to-string (upcase key)))))
2273 (math-evaluate-expr b))))))
2607 (defun math-evaluate-expr (x) ; [Public]
2609 (calc-embedded-evaluate-expr x)
2610 (calc-normalize (math-evaluate-expr-rec x))))
2612 (defalias 'calcFunc-evalv 'math-evaluate-expr)
2632 (math-evaluate-expr x))))
2634 (defun math-evaluate-expr-rec (x)
2640 (list (car x) (nth 1 x) (math-evaluate-expr-rec (nth 2 x)))
2655 (cons (car x) (mapcar 'math-evaluate-expr-rec (cdr x))))))
2658 (defun math-any-floats (expr)
2659 (if (Math-primp expr)
2660 (math-floatp expr)
2661 (while (and (setq expr (cdr expr)) (not (math-any-floats (car expr)))))
2662 expr))
2669 (defun math-map-tree (math-mt-func mmt-expr &optional math-mt-many)
2671 (math-map-tree-rec mmt-expr))
2673 (defun math-map-tree-rec (mmt-expr)
2679 (setq mmt-nextval (funcall math-mt-func mmt-expr))
2680 (not (equal mmt-expr mmt-nextval)))
2681 (setq mmt-expr mmt-nextval
2685 (if (or (Math-primp mmt-expr)
2688 (setq mmt-nextval (cons (car mmt-expr)
2690 (cdr mmt-expr))))
2691 (if (equal mmt-nextval mmt-expr)
2693 (setq mmt-expr mmt-nextval))))))
2694 mmt-expr)
2696 (defun math-is-true (expr)
2697 (if (Math-numberp expr)
2698 (not (Math-zerop expr))
2699 (math-known-nonzerop expr)))
2701 (defun math-const-var (expr)
2702 (and (consp expr)
2703 (eq (car expr) 'var)
2704 (or (and (symbolp (nth 2 expr))
2705 (boundp (nth 2 expr))
2706 (eq (car-safe (symbol-value (nth 2 expr))) 'special-const))
2707 (memq (nth 2 expr) '(var-inf var-uinf var-nan)))))
2757 (if (string-match "\\`var-." (symbol-name name))
2770 ((string-match "^\\([0-9]*\\)[:/]\\([0-9]*\\)[:/]\\([0-9]*\\)$" s)
2783 ((string-match "^\\([0-9]*\\)[:/]\\([0-9]*\\)$" s)
2793 ((string-match "^\\(.*\\) *mod *\\(.*\\)$" s)
2802 ((string-match "^\\(.*\\) *\\+/- *\\(.*\\)$" s)
2811 ((or (string-match "^\\([^#^]+\\)[@oOhH]\\(.*\\)$" s)
2812 (string-match "^\\([^#^]+\\)[dD][eE]?[gG]?\\(.*\\)$" s))
2829 ((string-match "^\\([^'#^]+\\)[mM']\\(.*\\)$" s)
2847 ((string-match "^\\([^\"#^]+\\)[sS\"]$" s)
2855 ((string-match "^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]\\)$" s)
2856 (let ((radix (string-to-number (math-match-substring s 1)))
2869 ((string-match "^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]*\\)$" s)
2870 (let ((radix (string-to-number (math-match-substring s 1)))
2878 ((or (string-match "^0*\\(\\([2-9]\\|1[0-4]\\)\\(#\\|\\^\\^\\)[0-9a-dA-D.]+\\)[eE]\\([-+]?[0-9]+\\)$" s)
2879 (string-match "^\\(\\([0-9]+\\)\\(#\\|\\^\\^\\)[0-9a-zA-Z.]+\\) *\\* *\\2\\.? *\\^ *\\([-+]?[0-9]+\\)$" s))
2880 (let ((radix (string-to-number (math-match-substring s 2)))
2889 ((string-match "^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]*\\)\\.\\([0-9a-zA-Z]*\\)$" s)
2890 (let ((radix (string-to-number (math-match-substring s 1)))
2900 ((string-match "^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]+\\)$" s)
2902 (string-to-number (math-match-substring s 1))))
2906 (string-match "^0[xX]\\([0-9a-fA-F]+\\)$" s))
2912 (string-match "^\\$\\([0-9a-fA-F]+\\)$" s))
2917 ((string-match "^\\([0-9]+\\)/\\([0-9/]+\\)$" s)
2941 (defvar math-expr-data)
2943 (defun math-read-expr (math-exp-str)
2947 math-exp-token math-expr-data)
2948 (setq math-exp-str (math-read-preprocess-string math-exp-str))
2949 (while (setq math-exp-token (string-match "\\.\\.\\([^.]\\|.[^.]\\)" math-exp-str))
2954 (let ((val (catch 'syntax (math-read-expr-level 0))))
2961 (defun math-read-plain-expr (exp-str &optional error-check)
2963 (math-expr-opers math-standard-opers)
2964 (val (math-read-expr exp-str)))
2971 (defun math-read-string ()
2972 (let ((str (read-from-string (concat math-expr-data "\""))))
2973 (or (and (= (cdr str) (1+ (length math-expr-data)))
2975 (throw 'syntax "Error in string constant"))
2983 (defun math-read-big-expr (str)
2985 (string-match (concat "^" (regexp-quote calc-left-label)) str)
2989 (string-match (concat (regexp-quote calc-right-label) " *$") str)
2992 (if (string-match "\\\\[^ \n|]" str)
2994 (math-read-expr str)
2997 (math-expr-opers (get 'latex 'math-oper-table))
2998 (math-expr-function-mapping (get 'latex 'math-function-table))
2999 (math-expr-variable-mapping (get 'latex 'math-variable-table)))
3000 (math-read-expr str)))
3007 (while (setq new-pos (string-match "\n" str pos))
3022 (math-read-expr str)))))
3065 (defun math-format-flat-expr-fancy (a prec)
3075 (math-format-flat-expr (nth 1 a) 0) ", "
3076 (math-format-flat-expr (nth 2 a) 0) ", "
3077 (math-format-flat-expr (nth 3 a) 0) ", ..., "
3078 (math-format-flat-expr (nth (1- (length a)) a) 0) "]")))
3081 (math-format-flat-expr (nth 2 a) 1000)
3083 (math-format-flat-expr (nth 3 a) 1000)
3099 (math-format-flat-expr (nth (1- (length a)) a) 0)
3112 ((and (memq (car a) '(calcFunc-string calcFunc-bstring))
3115 (math-vector-is-string (nth 1 a)))
3117 "(" (math-vector-to-string (nth 1 a) t) ")"))
3122 (concat "(" (math-format-flat-expr a 0) ")")
3123 (let ((lhs (math-format-flat-expr (nth 1 a) (nth 2 op)))
3124 (rhs (math-format-flat-expr (nth 2 a) (nth 3 op))))
3132 (concat "-" (math-format-flat-expr (nth 1 a) 1000)))
3135 (if (string-match "\\`calcFunc-\\([a-zA-Z0-9']+\\)\\'"
3145 (let ((buf (math-format-flat-expr (car vec) prec)))
3147 (setq buf (concat buf sep (math-format-flat-expr (car vec) prec))))
3151 (defun math-format-nice-expr (x w)
3163 (let ((str (math-format-flat-expr x 0))
3165 (or (string-match "\"" str)
3194 (if (and prec (> prec 191) (string-match "\\*" str))
3231 (math-compose-expr (list '* (nth 2 a) '(cplx 0 1)) prec)
3235 (math-compose-expr (list (if (math-negp (nth 2 a)) '- '+)
3269 (math-format-flat-expr a 0))
3298 (setq str (concat (make-string (- digs len) ?0) str)))))
3319 (let* ((pt (or (string-match "[^0-9a-zA-Z]" str) (length str)))
3341 Each key should be a list of a label string, plus a Calc command name spec.
3342 A command spec is a command name symbol, a keyboard macro string, a
3343 list containing a numeric entry string, or nil.