]> git.eshelyaron.com Git - emacs.git/commitdiff
calc-alg.el (math-simplify-divide): Don't cross multiply
authorJay Belanger <jay.p.belanger@gmail.com>
Wed, 25 Jul 2012 02:38:36 +0000 (21:38 -0500)
committerJay Belanger <jay.p.belanger@gmail.com>
Wed, 25 Jul 2012 02:38:36 +0000 (21:38 -0500)
in an equation when the lhs is a variable.

lisp/ChangeLog
lisp/calc/calc-alg.el

index 9377f334bd41c0ee88d59c37acb235633c9c0d71..7f612cb61a4ceb44cd13f5ec37e6185c8aee55c4 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-25  Jay Belanger  <jay.p.belanger@gmail.com>
+
+       * calc-alg.el (math-simplify-divide): Don't cross multiply
+       in an equation when the lhs is a variable.
+
 2012-07-24  Julien Danjou  <julien@danjou.info>
 
        * net/netrc.el (netrc-find-service-number, netrc-store-data):
index 8e41b175321b61eba3f2b429de70bab827749eff..50b31400a6a0c71c5c534d658c010b0033d32b16 100644 (file)
                            (not (Math-realp (nth 1 math-simplify-expr))))
                       (math-common-constant-factor (nth 1 math-simplify-expr))))
          (if (and (eq (car-safe nn) 'frac) (eq (nth 1 nn) 1) (not n))
-             (progn
+             (unless (and (eq (car-safe math-simplify-expr) 'calcFunc-eq)
+                           (eq (car-safe (nth 1 math-simplify-expr)) 'var)
+                           (not (math-expr-contains (nth 2 math-simplify-expr) 
+                                                    (nth 1 math-simplify-expr))))
                (setcar (cdr math-simplify-expr)
                         (math-mul (nth 2 nn) (nth 1 math-simplify-expr)))
                (setcar (cdr (cdr math-simplify-expr))