Commit 43fdb2a0 authored by Jay Belanger's avatar Jay Belanger
Browse files

* lisp/calc/calc-units.el (math-consistent-units-p): Strengthen the

  test for consistent units.
parent d1cb2f78
......@@ -2,6 +2,7 @@
* lisp/calc/calc-units.el (calc-convert-exact-units): New function.
(calc-convert-units): Check for missing units.
(math-consistent-units-p): Strengthen the test for consistent units.
* lisp/calc/calc-ext.el (calc-init-extensions): Autoload
`calc-convert-exact-units' and assign it a keybinding.
......
......@@ -979,7 +979,7 @@ If COMP or STD is non-nil, put that in the units table instead."
(or
(and (eq (car-safe newunits) 'var)
(assq (nth 1 newunits) math-standard-units-systems))
(math-numberp (math-get-units (list '/ expr newunits)))))
(math-numberp (math-get-units (math-to-standard-units (list '/ expr newunits) nil)))))
(defun math-check-unit-consistency (expr units)
"Give an error if EXPR and UNITS do not have consistent units."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment