[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/calc/calc-mtx.el
From: |
Jay Belanger |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/calc/calc-mtx.el |
Date: |
Fri, 26 Nov 2004 17:56:29 -0500 |
Index: emacs/lisp/calc/calc-mtx.el
diff -c emacs/lisp/calc/calc-mtx.el:1.7 emacs/lisp/calc/calc-mtx.el:1.8
*** emacs/lisp/calc/calc-mtx.el:1.7 Mon Sep 1 15:45:18 2003
--- emacs/lisp/calc/calc-mtx.el Fri Nov 26 22:36:10 2004
***************
*** 3,10 ****
;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
;; Author: David Gillespie <address@hidden>
! ;; Maintainers: D. Goel <address@hidden>
! ;; Colin Walters <address@hidden>
;; This file is part of GNU Emacs.
--- 3,9 ----
;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
;; Author: David Gillespie <address@hidden>
! ;; Maintainer: Jay Belanger <address@hidden>
;; This file is part of GNU Emacs.
***************
*** 176,181 ****
--- 175,184 ----
(nth 1 m)
(math-reject-arg m 'square-matrixp))))
+ ;; The variable math-det-lu is local to math-det-raw, but is
+ ;; used by math-det-step, which is called by math-det-raw.
+ (defvar math-det-lu)
+
(defun math-det-raw (m)
(let ((n (1- (length m))))
(cond ((= n 1)
***************
*** 211,223 ****
(nth 3 (nth 3 m))))))
(t (let ((lud (math-matrix-lud m)))
(if lud
! (let ((lu (car lud)))
(math-det-step n (nth 2 lud)))
0))))))
(defun math-det-step (n prod)
(if (> n 0)
! (math-det-step (1- n) (math-mul prod (nth n (nth n lu))))
prod))
;;; This returns a list (LU index d), or nil if not possible.
--- 214,226 ----
(nth 3 (nth 3 m))))))
(t (let ((lud (math-matrix-lud m)))
(if lud
! (let ((math-det-lu (car lud)))
(math-det-step n (nth 2 lud)))
0))))))
(defun math-det-step (n prod)
(if (> n 0)
! (math-det-step (1- n) (math-mul prod (nth n (nth n math-det-lu))))
prod))
;;; This returns a list (LU index d), or nil if not possible.
- [Emacs-diffs] Changes to emacs/lisp/calc/calc-mtx.el,
Jay Belanger <=