(math-apply-units): Change the places in which units are simplified.
This commit is contained in:
parent
c330dafe8a
commit
2e2b4fbe92
1 changed files with 4 additions and 4 deletions
|
@ -810,10 +810,10 @@ Entries are (SYMBOL EXPR DOC-STRING TEMP-TYPE BASE-UNITS).")
|
|||
(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)
|
||||
(setq expr (math-simplify-units expr))
|
||||
(or (math-numberp expr)
|
||||
(error "Incompatible units"))
|
||||
(while (cdr ulist)
|
||||
|
@ -826,9 +826,9 @@ Entries are (SYMBOL EXPR DOC-STRING TEMP-TYPE BASE-UNITS).")
|
|||
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)))))
|
||||
(if pure
|
||||
expr
|
||||
(math-simplify-units (list '* expr units)))))
|
||||
|
||||
(defvar math-decompose-units-cache nil)
|
||||
(defun math-decompose-units (units)
|
||||
|
|
Loading…
Add table
Reference in a new issue