aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Belanger2012-07-24 21:38:36 -0500
committerJay Belanger2012-07-24 21:38:36 -0500
commit3cc5a3a8718bf0d9c06562a01fd86c22ff9840c0 (patch)
tree30fb0faabd4afa906ae42a122e57fa58d86842e8
parentb7af7f62e4b269d1e5ed6e85660a169b3a075232 (diff)
downloademacs-3cc5a3a8718bf0d9c06562a01fd86c22ff9840c0.tar.gz
emacs-3cc5a3a8718bf0d9c06562a01fd86c22ff9840c0.zip
calc-alg.el (math-simplify-divide): Don't cross multiply
in an equation when the lhs is a variable.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/calc/calc-alg.el5
2 files changed, 9 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9377f334bd4..7f612cb61a4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-07-25 Jay Belanger <jay.p.belanger@gmail.com>
2
3 * calc-alg.el (math-simplify-divide): Don't cross multiply
4 in an equation when the lhs is a variable.
5
12012-07-24 Julien Danjou <julien@danjou.info> 62012-07-24 Julien Danjou <julien@danjou.info>
2 7
3 * net/netrc.el (netrc-find-service-number, netrc-store-data): 8 * net/netrc.el (netrc-find-service-number, netrc-store-data):
diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el
index 8e41b175321..50b31400a6a 100644
--- a/lisp/calc/calc-alg.el
+++ b/lisp/calc/calc-alg.el
@@ -530,7 +530,10 @@
530 (not (Math-realp (nth 1 math-simplify-expr)))) 530 (not (Math-realp (nth 1 math-simplify-expr))))
531 (math-common-constant-factor (nth 1 math-simplify-expr)))) 531 (math-common-constant-factor (nth 1 math-simplify-expr))))
532 (if (and (eq (car-safe nn) 'frac) (eq (nth 1 nn) 1) (not n)) 532 (if (and (eq (car-safe nn) 'frac) (eq (nth 1 nn) 1) (not n))
533 (progn 533 (unless (and (eq (car-safe math-simplify-expr) 'calcFunc-eq)
534 (eq (car-safe (nth 1 math-simplify-expr)) 'var)
535 (not (math-expr-contains (nth 2 math-simplify-expr)
536 (nth 1 math-simplify-expr))))
534 (setcar (cdr math-simplify-expr) 537 (setcar (cdr math-simplify-expr)
535 (math-mul (nth 2 nn) (nth 1 math-simplify-expr))) 538 (math-mul (nth 2 nn) (nth 1 math-simplify-expr)))
536 (setcar (cdr (cdr math-simplify-expr)) 539 (setcar (cdr (cdr math-simplify-expr))