summaryrefslogtreecommitdiff
path: root/lisp/calc/calc-arith.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/calc/calc-arith.el')
-rw-r--r--lisp/calc/calc-arith.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/calc/calc-arith.el b/lisp/calc/calc-arith.el
index 4d76e1eab5b..dc341cb7aec 100644
--- a/lisp/calc/calc-arith.el
+++ b/lisp/calc/calc-arith.el
@@ -1856,8 +1856,9 @@
;;; Division from the left.
(defun calcFunc-ldiv (a b)
- (math-mul (math-pow a -1) b))
-
+ (if (math-known-scalarp a)
+ (math-div b a)
+ (math-mul (math-pow a -1) b)))
(defun calcFunc-mod (a b)
(math-normalize (list '% a b)))