From d0158f73540f5f6de1861fb653cbb87832cb7ce3 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Mon, 14 Nov 2005 20:21:40 +0000 Subject: [PATCH] (calcFunc-ldiv): Check to see if the first argument is a scalar. --- lisp/ChangeLog | 17 +++++++++++++++++ lisp/calc/calc-arith.el | 5 +++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8084a793269..674a8ec5568 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,20 @@ +2005-11-14 Jay Belanger + + * calc-alg.el (calcFunc-write-out-power): Rename it to + calcFunc-powerexpand. + (math-write-out-power): Rename it to math-powerexpand; have it + handle negative exponents. + (calc-writeoutpower): Rename it to calc-powerexpand. + + * calc-ext.el: Change calcFunc-writeoutpower and + calc-writeoutpower to calcFunc-powerexpand and calc-powerexpand in + autoloads. + Add calcFunc-ldiv to autoloads. + + * calc-arith.el (calcFunc-ldiv): New function. + + * calc.el (calc-left-divide): New function. + 2005-11-14 Juri Linkov * cus-edit.el (custom-variable-prompt): Set the default value arg 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))) -- 2.39.5