diff options
author | Miles Bader <miles@gnu.org> | 2005-02-18 00:41:50 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2005-02-18 00:41:50 +0000 |
commit | 8d46efcc0f2045a1e5a2739c55ba6a88fbf4bcfc (patch) | |
tree | bc968a02587d51199537bb335d5494e756e35fdf /lisp/calc/calc-units.el | |
parent | 8589dc17f80450f5773a2d449fa6d94c9bb04fe3 (diff) | |
parent | 9b516537a9899900647d4eae5ec8778e6837ad3c (diff) | |
download | emacs-8d46efcc0f2045a1e5a2739c55ba6a88fbf4bcfc.tar.gz emacs-8d46efcc0f2045a1e5a2739c55ba6a88fbf4bcfc.tar.bz2 emacs-8d46efcc0f2045a1e5a2739c55ba6a88fbf4bcfc.zip |
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-15
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-95
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-96
Move Gnus images into etc/images
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-97
- miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-105
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-14
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-15
Update from CVS: lisp/imap.el (imap-log): Doc fix.
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-16
Merge from emacs--cvs-trunk--0
Diffstat (limited to 'lisp/calc/calc-units.el')
-rw-r--r-- | lisp/calc/calc-units.el | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index e8a3abfe958..4b3c284ddad 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el @@ -1241,6 +1241,45 @@ Entries are (SYMBOL EXPR DOC-STRING TEMP-TYPE BASE-UNITS).") (eq (nth 1 (nth 2 rad)) 'rad) (list 'calcFunc-tan (nth 1 rad)))))) +(math-defsimplify calcFunc-sec + (and math-simplifying-units + (math-units-in-expr-p (nth 1 math-simplify-expr) nil) + (let ((rad (math-simplify-units + (math-evaluate-expr + (math-to-standard-units (nth 1 math-simplify-expr) nil)))) + (calc-angle-mode 'rad)) + (and (eq (car-safe rad) '*) + (math-realp (nth 1 rad)) + (eq (car-safe (nth 2 rad)) 'var) + (eq (nth 1 (nth 2 rad)) 'rad) + (list 'calcFunc-sec (nth 1 rad)))))) + +(math-defsimplify calcFunc-csc + (and math-simplifying-units + (math-units-in-expr-p (nth 1 math-simplify-expr) nil) + (let ((rad (math-simplify-units + (math-evaluate-expr + (math-to-standard-units (nth 1 math-simplify-expr) nil)))) + (calc-angle-mode 'rad)) + (and (eq (car-safe rad) '*) + (math-realp (nth 1 rad)) + (eq (car-safe (nth 2 rad)) 'var) + (eq (nth 1 (nth 2 rad)) 'rad) + (list 'calcFunc-csc (nth 1 rad)))))) + +(math-defsimplify calcFunc-cot + (and math-simplifying-units + (math-units-in-expr-p (nth 1 math-simplify-expr) nil) + (let ((rad (math-simplify-units + (math-evaluate-expr + (math-to-standard-units (nth 1 math-simplify-expr) nil)))) + (calc-angle-mode 'rad)) + (and (eq (car-safe rad) '*) + (math-realp (nth 1 rad)) + (eq (car-safe (nth 2 rad)) 'var) + (eq (nth 1 (nth 2 rad)) 'rad) + (list 'calcFunc-cot (nth 1 rad)))))) + (defun math-remove-units (expr) (if (math-check-unit-name expr) |