Mercurial > emacs
comparison lisp/calc/calc-ext.el @ 91204:53108e6cea98
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-294
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 06 Dec 2007 09:51:45 +0000 |
parents | 880960b70474 8eb59808e53f |
children | 2fcaae6177a5 |
comparison
equal
deleted
inserted
replaced
91203:db40129142b2 | 91204:53108e6cea98 |
---|---|
27 | 27 |
28 ;;; Code: | 28 ;;; Code: |
29 | 29 |
30 (require 'calc) | 30 (require 'calc) |
31 (require 'calc-macs) | 31 (require 'calc-macs) |
32 | |
33 ;; Declare functions which are defined elsewhere. | |
34 (declare-function math-clip "calc-bin" (a &optional w)) | |
35 (declare-function math-round "calc-arith" (a &optional prec)) | |
36 (declare-function math-simplify "calc-alg" (top-expr)) | |
37 (declare-function math-simplify-extended "calc-alg" (a)) | |
38 (declare-function math-simplify-units "calc-units" (a)) | |
39 (declare-function calc-set-language "calc-lang" (lang &optional option no-refresh)) | |
40 (declare-function calc-flush-caches "calc-stuff" (&optional inhibit-msg)) | |
41 (declare-function calc-save-modes "calc-mode" ()) | |
42 (declare-function calc-embedded-modes-change "calc-embed" (vars)) | |
43 (declare-function calc-embedded-var-change "calc-embed" (var &optional buf)) | |
44 (declare-function math-mul-float "calc-arith" (a b)) | |
45 (declare-function math-arctan-raw "calc-math" (x)) | |
46 (declare-function math-sqrt-raw "calc-math" (a &optional guess)) | |
47 (declare-function math-sqrt-float "calc-math" (a &optional guess)) | |
48 (declare-function math-exp-minus-1-raw "calc-math" (x)) | |
49 (declare-function math-normalize-polar "calc-cplx" (a)) | |
50 (declare-function math-normalize-hms "calc-forms" (a)) | |
51 (declare-function math-normalize-mod "calc-forms" (a)) | |
52 (declare-function math-make-sdev "calc-forms" (x sigma)) | |
53 (declare-function math-make-intv "calc-forms" (mask lo hi)) | |
54 (declare-function math-normalize-logical-op "calc-prog" (a)) | |
55 (declare-function math-possible-signs "calc-arith" (a &optional origin)) | |
56 (declare-function math-infinite-dir "calc-math" (a &optional inf)) | |
57 (declare-function math-calcFunc-to-var "calc-map" (f)) | |
58 (declare-function calc-embedded-evaluate-expr "calc-embed" (x)) | |
59 (declare-function math-known-nonzerop "calc-arith" (a)) | |
60 (declare-function math-read-expr-level "calc-aent" (exp-prec &optional exp-term)) | |
61 (declare-function math-read-big-rec "calc-lang" (math-rb-h1 math-rb-v1 math-rb-h2 math-rb-v2 &optional baseline prec short)) | |
62 (declare-function math-read-big-balance "calc-lang" (h v what &optional commas)) | |
63 (declare-function math-format-date "calc-forms" (math-fd-date)) | |
64 (declare-function math-vector-is-string "calccomp" (a)) | |
65 (declare-function math-vector-to-string "calccomp" (a &optional quoted)) | |
66 (declare-function math-format-radix-float "calc-bin" (a prec)) | |
67 (declare-function math-compose-expr "calccomp" (a prec)) | |
68 (declare-function math-abs "calc-arith" (a)) | |
69 (declare-function math-format-bignum-binary "calc-bin" (a)) | |
70 (declare-function math-format-bignum-octal "calc-bin" (a)) | |
71 (declare-function math-format-bignum-hex "calc-bin" (a)) | |
72 (declare-function math-format-bignum-radix "calc-bin" (a)) | |
73 (declare-function math-compute-max-digits "calc-bin" (w r)) | |
74 (declare-function math-map-vec "calc-vec" (f a)) | |
75 (declare-function math-make-frac "calc-frac" (num den)) | |
76 | |
32 | 77 |
33 (defvar math-simplifying nil) | 78 (defvar math-simplifying nil) |
34 (defvar math-living-dangerously nil) ; true if unsafe simplifications are okay. | 79 (defvar math-living-dangerously nil) ; true if unsafe simplifications are okay. |
35 (defvar math-integrating nil) | 80 (defvar math-integrating nil) |
36 | 81 |
2088 (= (length a) 2)))) | 2133 (= (length a) 2)))) |
2089 | 2134 |
2090 ;;; True if A is a real or will evaluate to a real. [P x] [Public] | 2135 ;;; True if A is a real or will evaluate to a real. [P x] [Public] |
2091 (defun math-provably-realp (a) | 2136 (defun math-provably-realp (a) |
2092 (or (Math-realp a) | 2137 (or (Math-realp a) |
2093 (math-provably-integer a) | 2138 (math-provably-integerp a) |
2094 (memq (car-safe a) '(abs arg)))) | 2139 (memq (car-safe a) '(abs arg)))) |
2095 | 2140 |
2096 ;;; True if A is a non-real, complex number. [P x] [Public] | 2141 ;;; True if A is a non-real, complex number. [P x] [Public] |
2097 (defun math-complexp (a) | 2142 (defun math-complexp (a) |
2098 (memq (car-safe a) '(cplx polar))) | 2143 (memq (car-safe a) '(cplx polar))) |