;ELC   
;;; compiled by amu@mit.edu on Wed Dec 18 01:19:04 1996
;;; from file /afs/sipb.mit.edu/contrib/emacs/packages/calc-2.02e/calc-mat.el
;;; emacs version 19.30.1.
;;; bytecomp version FSF 2.10
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`calc-mat.el' was compiled for Emacs 19.29 or later"))


(byte-code "!!" [require calc-ext calc-macs] 2)
(defalias 'calc-Need-calc-mat #[nil "" [nil] 1])
(defalias 'calc-mdet #[(arg) "\"" [calc-do #[nil "#" [calc-unary-op "mdet" calcFunc-det arg] 4] 1247] 3 nil "P"])
(defalias 'calc-mtrace #[(arg) "\"" [calc-do #[nil "#" [calc-unary-op "mtr" calcFunc-tr arg] 4] 1359] 3 nil "P"])
(defalias 'calc-mlud #[(arg) "\"" [calc-do #[nil "#" [calc-unary-op "mlud" calcFunc-lud arg] 4] 1471] 3 nil "P"])
(defalias 'math-row-matrix #[(a) ": @= ! D" [a vec math-matrixp] 2])
(defalias 'math-col-matrix #[(a) ": @= ! A\"B" [a vec math-matrixp mapcar #[(x) "	D" [vec x] 2]] 4])
(defalias 'math-mul-mats #[(a b) "	A@G	A	k SV_ 	@A	A\f@@8\"\fAAV \n\f@@8\"\"= \nB# BB .B" [nil b accum bp ap col row cols mat a 0 math-mul math-add vec] 7])
(defalias 'math-mul-mat-vec #[(a b) "A\"B" [vec mapcar #[(row) "	\n\"" [math-dot-product row b] 3] a] 4])
(defalias 'calcFunc-tr #[(mat) "	! 	GS	A@A@$	\"" [math-square-matrixp mat math-matrix-trace-step 2 math-reject-arg square-matrixp] 5])
(defalias 'math-matrix-trace-step #[(n size mat sum) "	X T	88\"$" [n size math-matrix-trace-step mat math-add sum] 9])
(defalias 'math-matrix-inv-raw #[(m) "GSXE!\f!?A	U  ǂ?	UG ɉȉ88A@8!E8A@!A@A@EE?	U?ɉ88ȉ88\"8888\"\"A@888\"88A@8\"\"88A@8\"A@8ȉ88\"\"F888A@\"888A@\"\"88A@A@\"A@88A@\"\"A@88A@\"88A@A@\"\"F888A@\"ȉ888A@\"\"A@88A@\"88A@A@\"\"ȉ88A@A@\"A@88A@\"\"FF\f\")W!V	\"\"))" [m n 3 math-det-raw det math-zerop math-div 1 2 vec math-neg math-sub math-mul math-matrix-lud lud math-lud-solve calcFunc-idn] 14])
(defalias 'calcFunc-det #[(m) "	! \\	!)!	=- 	A@!) 	A@\"- 	A@	\"" [math-square-matrixp m math-normalize calc-internal-prec 2 math-det-raw calcFunc-idn math-zerop math-equal-int 1 math-reject-arg square-matrixp] 3])
(defalias 'math-det-raw #[(m) "GSU A@A@ 	U5 A@A@É88\"A@88A@\"\" 	U ĉǉA@A@É88Ɖ88\"\"A@8888A@\"\"\"A@88A@88\"\"\"A@8É888A@\"\"\"A@A@8888\"\"\"A@88A@Ɖ88\"\"\" !	 	@\n		8\") ))" [m n 1 2 math-sub math-mul 3 math-add math-matrix-lud lud lu math-det-step 0] 13])
(defalias 'math-det-step #[(n prod) "V S\f88\"\"\f" [n 0 math-det-step math-mul prod lu] 7])
(defalias 'math-matrix-lud #[(m) "	\n\"\fD A@ AAA ȍ		B\n7 \n> 	\nB\nB	**" [assoc m math-lud-cache calc-internal-prec calc-prefer-frac context old singular (math-do-matrix-lud m) lud entry] 4])
(byte-code "! B" [boundp math-lud-cache nil current-load-list] 2)
(defalias 'math-do-matrix-lud #[(m) "	!GS	\n\fXV	W =G #\"\n88\nWv \n\n88\n88\"\"\nTS \n8\nT0 X = #\"\n88\nW \n\n88\n88\"\"\nT \n8\n\n!\"U 	)T 	V\n	#\f[\f	B\n88!+\"LTXL\n8\n88\".)T! \n\fE.\n" [math-copy-matrix m lu n nil i 1 j k imax sum big d index 0 calc-display-working-message lots math-do-working "LUD step" format "%d/%d" math-sub math-mul math-abs-approx dum math-compare -1 math-swap-rows pivot math-zerop throw singular math-div] 8])
(defalias 'math-swap-rows #[(m r1 r2) "	U0 S\nA	S\nAA\f\fA\f-\n" [r1 r2 m r1prev row1 r2prev row2 r2next] 3])
(defalias 'math-lud-solve #[(lud b &optional need) "'\n!GSA@GS@\n\fX#=? \"\nA@\n\fX @\fA\f88\f8\n88 ! \n \nW \n8888\"\"T \n8\nT\nL \nS\nY\n88\nT\fX\n8888\"\" \n8\n88\" T- .1\"" [lud math-copy-matrix b x n m lu 1 col nil i j ip ii index sum calc-display-working-message lots math-do-working "LUD solver step" math-zerop math-sub math-mul math-div need math-reject-arg "*Singular matrix"] 8])
(defalias 'calcFunc-lud #[(m) "	! \\	! @!@!	@GS\n\n\"\nX W[ 8ѠTA 8̠T\nX 	8Ѡe T7 SY SA@8U #) 	F.*! 	\"	\"" [math-square-matrixp m math-normalize calc-internal-prec 2 math-matrix-lud lud math-copy-matrix lmat umat n calcFunc-idn 1 perm nil i j 0 pos math-swap-rows vec math-reject-arg "*Singular matrix" square-matrixp] 6])
