[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calc/calc-units.el
From: |
Jay Belanger |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calc/calc-units.el |
Date: |
Fri, 08 Jul 2005 00:32:51 -0400 |
Index: emacs/lisp/calc/calc-units.el
diff -c emacs/lisp/calc/calc-units.el:1.16 emacs/lisp/calc/calc-units.el:1.17
*** emacs/lisp/calc/calc-units.el:1.16 Fri May 20 22:37:14 2005
--- emacs/lisp/calc/calc-units.el Fri Jul 8 04:32:51 2005
***************
*** 810,819 ****
(mapcar 'math-to-standard-rec (cdr expr))))))
(defun math-apply-units (expr units ulist &optional pure)
(if ulist
(let ((new 0)
value)
- (setq expr (math-simplify-units expr))
(or (math-numberp expr)
(error "Incompatible units"))
(while (cdr ulist)
--- 810,819 ----
(mapcar 'math-to-standard-rec (cdr expr))))))
(defun math-apply-units (expr units ulist &optional pure)
+ (setq expr (math-simplify-units expr))
(if ulist
(let ((new 0)
value)
(or (math-numberp expr)
(error "Incompatible units"))
(while (cdr ulist)
***************
*** 826,834 ****
ulist (cdr ulist)))
(math-add new (math-mul (math-div expr (nth 1 (car ulist)))
(car (car ulist)))))
! (math-simplify-units (if pure
! expr
! (list '* expr units)))))
(defvar math-decompose-units-cache nil)
(defun math-decompose-units (units)
--- 826,834 ----
ulist (cdr ulist)))
(math-add new (math-mul (math-div expr (nth 1 (car ulist)))
(car (car ulist)))))
! (if pure
! expr
! (math-simplify-units (list '* expr units)))))
(defvar math-decompose-units-cache nil)
(defun math-decompose-units (units)
- [Emacs-diffs] Changes to emacs/lisp/calc/calc-units.el,
Jay Belanger <=