comparison lisp/calc/calc-arith.el @ 66866:28b28c1cd22f

(calcFunc-ldiv): Check to see if the first argument is a scalar.
author Jay Belanger <jay.p.belanger@gmail.com>
date Mon, 14 Nov 2005 20:19:00 +0000
parents 5827a5ed37b9
children 1da5034b091b 7beb78bc1f8e
comparison
equal deleted inserted replaced
66865:7e4742b0d788 66866:28b28c1cd22f
1854 (math-mul-zero b a)))) 1854 (math-mul-zero b a))))
1855 (list '/ a b))) 1855 (list '/ a b)))
1856 1856
1857 ;;; Division from the left. 1857 ;;; Division from the left.
1858 (defun calcFunc-ldiv (a b) 1858 (defun calcFunc-ldiv (a b)
1859 (math-mul (math-pow a -1) b)) 1859 (if (math-known-scalarp a)
1860 1860 (math-div b a)
1861 (math-mul (math-pow a -1) b)))
1861 1862
1862 (defun calcFunc-mod (a b) 1863 (defun calcFunc-mod (a b)
1863 (math-normalize (list '% a b))) 1864 (math-normalize (list '% a b)))
1864 1865
1865 (defun math-mod-fancy (a b) 1866 (defun math-mod-fancy (a b)