;ELC   
;;; compiled by amu@mit.edu on Wed Dec 18 01:18:00 1996
;;; from file /afs/sipb.mit.edu/contrib/emacs/packages/calc-2.02e/calc-alg-3.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-alg-3.el' was compiled for Emacs 19.29 or later"))


(byte-code "!!" [require calc-ext calc-macs] 2)
(defalias 'calc-Need-calc-alg-3 #[nil "" [nil] 1])
(defalias 'calc-find-root #[(var) "\"" [calc-do #[nil " 	 \n \fŚ \fƚ) !!!F#` \f\"@ \f\"@ \fQ!C \f!=R \fA@\"!\f!F#))" [calc-is-hyperbolic calcFunc-wroot calcFunc-root func var "" "$" calc-enter-result 2 "root" calc-top-n 3 1 string-match ",\\|[^ ] +[^ ]" "\\[" math-read-expr "[" "]" error "Bad format in expression: %s"] 9] 1841] 3 nil "sVariable(s) to solve for: "])
(defalias 'calc-find-minimum #[(var) "\"" [calc-do #[nil "     Â   Ă  % Ƃ& 	\n˚8 \n̚L 	!!!F# \n\"f \n\"f \nQ!j \n!\n={ \nA@\"	!\n!F#)*" [calc-is-inverse calc-is-hyperbolic calcFunc-wmaximize calcFunc-maximize calcFunc-wminimize calcFunc-minimize "max" "min" tag func var "" "$" calc-enter-result 2 calc-top-n 3 1 string-match ",\\|[^ ] +[^ ]" "\\[" math-read-expr "[" "]" error "Bad format in expression: %s"] 9] 2689] 3 nil "sVariable(s) to minimize over: "])
(defalias 'calc-find-maximum #[(var) " \n!" [calc-invert-func calc-find-minimum var] 2 nil "sVariable to maximize over: "])
(defalias 'calc-poly-interp #[(arg) "\"" [calc-do #[nil "!: = = \"B' ' ! 9 \n!E#C \n!E#)" [calc-top 2 data arg 0 vec calc-top-list error "Bad prefix argument" calc-is-hyperbolic calc-enter-result 1 "rati" calcFunc-ratint "poli" calcFunc-polint] 7] 3264] 3 nil "P"])
(defalias 'calc-curve-fit #[(arg &optional model coefnames varnames) "\"" [calc-do #[nil "  Â   ł 	\n\f	8\nD ՂE # UW  / Uj T	G/ >y \n?\n/ =   T! : = \\!! S!C\" S!E !V T\"B\\ !!AA!GZ)*U@T\n-#)*ABB\"1 YkXkZ\nZ#)A*A@\"1 UA@GS\n#)A*A@\"1 UT\n#)A@*)AAB#\"\"1 UT\n#)A@)AAB*#\"\"1 >+T\n#)A@=@ )AAB*#\"\"\"1 A >oT\n?#)*ABB\"B =`C DiD E E1 F >T\n#)G =H I *\"ABB\"1 J U\\T\n#)*KLA@KAKLAAL M N L@D O K@LA@EEE\"*/ P U1Q R !S *T ))GS\n,#/ U >VWX =YZ[\\] ց^ \"GUj_ !@` W[VYG[Za Y!B)\\Vb \\!B)+Bc =d e !f =d g !!h !i !BGj ><k A@!<i 8!<l 8i l 8!<8*l 81m *\"B)A@Bn !*o =p)wpaTc)GSm )\"p%m \"qrqGZpZsWt !qsArspTqGrqp%,)Wu *)Fv \"*/ w  / ` xy z !{ O*GU*A@*)GU+)A@-)#x:Fu | x!} \".\n" [nil calc-aborted-prefix calc-is-inverse calcFunc-xfit calc-is-hyperbolic calcFunc-efit calcFunc-fit 0 ("(Press ? for help)" "1 = linear or multilinear" "2-9 = polynomial fits; i = interpolating polynomial" "p = a x^b, ^ = a b^x" "e = a exp(b x), x = exp(a + b x), l = a + b ln(x)" "E = a 10^(b x), X = 10^(a + b x), L = a + b log10(x)" "q = a + b (x-c)^2" "g = (a/b sqrt(2 pi)) exp(-0.5*((x-c)/b)^2)" "h prefix = homogeneous model (no constant term)" "' = alg entry, $ = stack, u = Model1, U = Model2") msgs homog data temp nvars n which key func model message "Fit to model: %s:%s" " h" "" read-char 7 keyboard-quit 63 (104 72) 36 1 arg calc-top 2 math-matrixp append vec prefix-numeric-value calc-top-list error "Bad prefix argument" "Data matrix is not a matrix!" coefnames varnames 49 calc-get-fit-variables math-mul 50 57 47 math-build-polynomial-expr 105 112 calcFunc-reduce (var mul var-mul) calcFunc-map (var pow var-pow) 94 (var mul var-mul) (var pow var-pow) (101 69) (var mul var-mul) 101 (var exp var-exp) (calcFunc-lambda (var a var-a) (^ 10 (var a var-a))) (var mul var-mul) (120 88) 120 calcFunc-exp ^ 10 (108 76) 108 (var ln var-ln) (var log10 var-log10) 113 v c math-add * - 103 math-read-expr "(AFit / BFit sqrt(2 pi)) exp(-0.5 * ((XFit - CFit) / BFit)^2)" (vec (var XFit var-XFit)) (vec (var AFit var-AFit) (var BFit var-BFit) (var CFit var-CFit)) (36 39 117 85) defvars record-entry 39 calc-arg-values calc-dollar-values calc-dollar-used calc-hashes-used calc-do-alg-entry "Model formula: " "Bad format" t reverse calc-invent-args 117 calc-var-value var-Model1 85 var-Model2 "User model not yet defined" math-vectorp (3 4) math-objvecp 3 math-all-vars-but "Incorrect model specifier" calcFunc-eq with-y coefs vars p "Not enough variables in model" calc-record "modl" beep calc-fit-to-trail calc-enter-result symbol-name 9 calc-normalize "parm"] 11] 10529] 3 nil "P"])
(defalias 'calc-invent-independent-variables #[(n &optional but) "	\n$" [calc-invent-variables n but (x y z t) "x"] 5])
(defalias 'calc-invent-parameter-variables #[(n &optional but) "	\n$" [calc-invent-variables n but (a b c d) "a"] 5])
(defalias 'calc-invent-variables #[(num but names base) "	VK K :! @( 	\fTP!\fB\"= BS9	 A	 UW _ 	\f	$," [nil num 0 var nn n vars names math-build-var-name base math-expr-contains vec but calc-invent-variables t] 5])
(defalias 'calc-get-fit-variables #[(nv nc &optional defv defc with-y homog) "	\n \nT \nU ! ' S/ !\n; \"\n\"#\n\"##!\"e !l Q!=} 8\"! ! B\nB A@! GU 8! 8A@ ! \nBGSU 	 TGSU U  #GSUU#$ABB)5+)AA#+,F+,AA#+),*" [nv with-y nvars error "Wrong number of data vectors for this type of model" defv homog nil nc calc-invent-independent-variables defc calc-invent-parameter-variables read-string format "Fitting variables: (default %s; %s) " mapconcat symbol-name mapcar #[(v) "A@" [v] 1] "," #[(v) "A@" [v] 1] coefs vars string-match "\\[" math-read-expr "[" "]" "Bad format in expression: %s" 2 math-vectorp "Expected a variable or vector of variables" (vec) vec 3 "Expected independent variables vector, then parameters vector" "Expected %d independent variable%s" 1 "" "s" "Expected %d parameter variable%s" varnames math-multi-subst model coefnames] 10])
(defalias 'math-newton-root #[(expr deriv guess orig-guess limit) "= \f\"\f\n!!:- @> :; @> :a @>h @=Z A@=e !e = \f\"\"\f!\" \n!E \"!\"U \n% \" \"+" [calc-display-working-message lots math-do-working "newton" guess var-DUMMY nil next dval math-evaluate-expr expr deriv (bigpos bigneg frac float cplx polar) (bigpos bigneg) float 0 math-zerop math-sub math-div math-nearly-equal math-float vec math-compare math-abs-approx orig-guess limit -1 math-newton-root math-reject-arg "*Newton's method failed to converge" "*Newton's method encountered a singularity"] 6])
(defalias 'math-newton-search-root #[(expr deriv guess vguess ostep oostep low vlow high vhigh) "( 	= F\" 	=: F\"\"\"\"!: @> \"\"!! \"\" !: @> \"!!: !@= !@=? !@> !A@: !A@@= !A@W !! !W:>@=B@=?B@>7A@:.A@@=BA@VB!BV=S((:(@=(@=?(@>(A@:(A@@=(A@W(!(W=!:@>@=A@=!=\"E\f.!:@>:@>!@=A@=!=!\"\"\f\"\f\"\f!:k@>q@=eA@=n!n=x\f\"\fE\f2\"!\"!\".!(&\n\f.\f!(&\n\f!:\n!@=!@=X!@>!A@:!A@@=!A@V!!!VX(:Q(@=(@=X(@>J(A@:A(A@@=U(A@VU(!U(V!:!@=!@=!@>!A@:!A@@=!A@W!!!W(:(@=(@=(@>(A@:(A@@=(A@W(!(W.!(&\f.!(&\n." [guess t nil vnext next step pos better var-DUMMY calc-display-working-message lots math-do-working "newton" intv 0 low high "bisect" math-mul-float math-sub-float (float 5 -1) ostep math-add-float math-evaluate-expr expr vguess (bigpos bigneg frac float) (float 6 -1) math-realp (float 123456 -5) math-reject-arg "*Newton's method encountered a singularity" math-float vlow bigneg bigpos (frac float) math-negp (frac float) math-posp vhigh (bigpos bigneg) float math-zerop math-nearly-equal vec deriv math-div-float math-lessp-float math-abs oostep (float 2 0) math-newton-search-root math-search-root] 12])
(defalias 'math-search-root #[(expr deriv low vlow high vhigh) "\n1\n= \\ \n= Ȃ \n\f!? !M !!=_ F\"TVv F\"U \"\"\n: \n@> \n@= \nA@= \n! \n= \"1 !!\" \n\")\f+!1 \n\")\f+!1 *\"\f*\f.e:E@>E\":Y@>Y\"DD:@=@=?@>A@:A@@=A@V!V\")23456785T5Xc	c83724\"43A	2@:2@@>3@2@3@4\")+!=#\":1@>@!6=@33AB22AB3AA32AA2.	:@>@=A@=!=E:@>@=A@=!=E>+>&\n@ +%فA FB \")" [nil found root-widen 0 point calc-internal-prec 10 20 (float 9 0) (float 16 -1) diff waslow vprev prev factor iterlim iters math-posp vlow vhigh math-negp calc-display-working-message lots math-do-working "widen" intv low high math-reject-arg "*Unable to bracket root" (float 16 -1) math-mul-float math-sub-float (bigpos bigneg) float math-zerop calcFunc-incr math-lessp-float math-abs t math-sub var-DUMMY math-evaluate-expr expr math-add (bigpos bigneg frac float) realp bigpos bigneg (frac float) yp xp step levels pos yvals xvals 5 (float 497 -3) math-add-float "search" vec deriv math-newton-search-root math-bisect-root 3 "*Unable to find a sign change in this interval"] 12])
(defalias 'math-bisect-root #[(expr low vlow high vhigh) "	\n\":= @=@ @=?@ @>7 A@:/ A@@=@ A@V@ !@ Vɉ\n\f\n\"\n\"\"\f!\n: \n@> \n@= \nA@= \n! \n== \"\n: \n@= \n@=? \n@> \nA@: \nA@@= \nA@V \n! \nV= \nM \nM \nE-" [math-sub-float high low vhigh bigpos bigneg (frac float) 0 math-posp nil vmid mid var-DUMMY pos step math-nearly-equal math-mul-float (float 5 -1) math-add-float math-evaluate-expr expr (bigpos bigneg) float math-zerop calc-display-working-message lots math-do-working "bisect" vlow vec] 6])
(defalias 'math-newton-multi #[(expr jacob n guess orig-guess limit) "	AT	W/ H8@L !!!E \f!J 	\"	!!\f!\"\"	=j \"AA @@\"j  \"!\"U 	& \" E." [-1 guess nil next jacob-val expr-val p2 p m n 2 math-root-vars math-evaluate-expr expr jacob math-constp math-reject-arg "*Newton's method encountered a singularity" math-add math-div math-float math-neg calc-display-working-message lots math-do-working "newton" math-nearly-equal math-compare math-abs-approx math-sub orig-guess limit math-newton-multi "*Newton's method failed to converge" vec] 7])
(byte-code "! B" [boundp math-root-vars [(var DUMMY var-DUMMY)] current-load-list] 2)
(defalias 'math-find-root #[(expr var guess root-widen) "=GSC	\n=- \"G\nTU:  !\nGYc G!P!E!\")> \fT\nW{ \fH8Le \fTA @= \"A @@\fH# = \"G\nTU  !A@: @@> \"@! Ag@+@A@@8\"@!C\fT\nW^@\fH$W\"!C9C!\n\f!肃\f\"&.=\"\"\"@A@8\".\\.#	!$1234511!1!!11!!\"%:(@>B23!45<@=!W\"82@ 83A@A >}B 2C 3#2A@D >B 32#32!43!5E !́F !G \"4:4@H > 4@I =4A@J =4!4J = 24E5:,5@H >>5@I =%5A@J =25!25J =>35E1v4:Q4@>v5:_5@>vK 12435&\n4:4@L =4@M = 4@N >4A@:4A@@L =4A@J VO 4!4J V 5:5@L =5@M = 5@N >5A@:5A@@L =5A@J VO 5!5J V4:l4@M =u4@L =4@P >c4A@:X4A@@M =r4A@J WrQ 4!r4J W5:5@M =5@L =5@P >5A@:5A@@M =5A@J WQ 5!5J W4:4@>5:5@>R 12435&S 2435%.	!" [expr vec nil row m p2 p jacob var-DUMMY calc-symbolic-mode n var math-reject-arg vectorp math-dimension-error copy-sequence math-root-vars intern "math-root-v" int-to-string symb vconcat vector -1 2 "*Expected a variable" math-expr-subst guess (bigpos bigneg frac float cplx polar) numberp math-float calc-tweak-eqn-table math-sub math-evaluate-expr calcFunc-deriv t "*Formulas must be differentiable" math-abs-approx math-newton-multi math-zerop (float 1 3) math-mul 10 math-expr-contains "*Formula does not contain specified variable" math-normalize calc-internal-prec (var DUMMY var-DUMMY) (var DUMMY var-DUMMY) deriv low high vlow vhigh math-numberp math-newton-root (float 1 6) 100 (bigpos bigneg frac float) point root-widen intv math-constp constp 3 (0 1) calcFunc-incr 1 (0 2) math-complexp "*Complex root finder must have derivative" realp (bigpos bigneg) float 0 math-newton-search-root bigpos bigneg (frac float) math-posp (frac float) math-negp math-search-root math-bisect-root] 13])
(defalias 'calcFunc-root #[(expr var guess) "	\n$" [math-find-root expr var guess nil] 5])
(defalias 'calcFunc-wroot #[(expr var guess) "	\n$" [math-find-root expr var guess t] 5])
(defalias 'math-min-eval #[(expr a) ":( @=( TA$ H8@L )+ !:< @>@ !@=I \"" [a vec -1 m 2 math-min-vars var-DUMMY math-evaluate-expr expr (bigpos bigneg frac) math-float float math-reject-arg realp] 4])
(defalias 'math-widen-min #[(expr a b) "	\n\f5 \"\"\f\"\f\"f 		\f\f\"\"\"\"\n \n\" = F\"SU %\"\"\"\"\n\"\"\f\f\"\"\"\n!\" \n!  \f\"\"\"\n\"\"\"	\f\"\"\f!$	\"*	\";	\"A	\"	\"\n\"j\f	\"	\n\f\"\"		\"	\"	\"	\"\n\"\n	\n\"\"\"		\"		\"\f\"\"		\"\f\n	\n} \":\f\nH\n\f." [nil 30 qr ba bc ulim q r vu u vc vb va c incr iters done b math-mul a (float 101 -2) math-min-eval expr math-lessp-float math-add-float math-mul-float (float 161803 -5) math-sub-float calc-display-working-message lots math-do-working "widen" intv 0 math-reject-arg format "*Unable to find a %s near the interval" math-min-or-max math-abs (float 1 -20) math-negp (float -1 -20) (float 1 -20) math-div-float (float 2 0) (float -1 2) t (float -161803 -5) (float -161803 -5) (float -161803 -5)] 16])
(defalias 'math-narrow-min #[(expr a c intv) "	D\"	\"D	\"Ɖ	\n\f\fT\fX \n 	\"	A% \n% 	@\"=e \"		AB\"ABA@@\" A@8\" \nD 	A	AAA A@@\" A@8\" \nD 	A	AD \n 	@@	A@A@	88x@A@\"5A@>p@A$@\"?18D)mA@>pp@A_@\"L?l8D)x\"\"\"." [a c math-min-eval expr 0 math-sub-float nil b yp xp found step levels yvals xvals 5 math-mul-float (float 497 -3) math-add-float calc-display-working-message lots math-do-working "search" math-lessp-float 2 t intv (2 3) min (1 3) 3 math-reject-arg format "*Unable to find a %s in the interval" math-min-or-max] 9])
(defalias 'math-brent-min #[(expr prec a va x vx b vb) "_\\\f\fZEZEʉ\f!\"\"\"!\"\"\"\"!\"\"\"\"!\"oSU ,\"\"-= \"!\" \" \"\" !\"\"2\"\f\"\"\"\f\f\f\"\"\f\"\"\"\"\"!! !2!\"\"!\"!\"\"\"\"\"\"\"\"22\"!\"\"\"\"\"\"!2\"\"\"!\"\"22!\"2!!2\";\"\f\"G\"!\"\"$G <<\"G G \"U\"X!\fG \fE." [prec 5 20 x vx float 1 -1 -5 (float 0 0) nil xw xv r q p etemp tol2 tol1 xm vu u e zeps tol vv v vw w iters math-mul-float (float 5 -1) math-add-float a b math-abs (float 2 0) math-lessp-float math-sub-float (float 5 -1) 0 math-reject-arg format "*Unable to converge on a %s" math-min-or-max calc-display-working-message lots math-do-working "brent" (float 381966 -6) d (float 2 0) math-posp math-neg-float (float 5 -1) math-div-float (float 381966 -6) math-negp math-min-eval expr vec] 19])
(defalias 'math-powell-min #[(expr n guesses prec) "	\n\"\n\"\n\"B\f[E	\"T\nX \"\n% @!)8\"!\"N N !!\"\"\"!\"\"I\"\f\"\f\"\f	\"\"A \"\"\"\"\"\"!\"\"!\"\"A \n%@8T\nXA 8A@8*E." [math-line-min-func expr n f1dim calcFunc-idn 1 xi vec mapcar car guesses p pt float prec ftol math-min-eval fret nil fp ptt fptt xit i ibig del diff res 0 (float 0 0) math-line-min math-mat-col calc-internal-prec math-normalize 2 math-abs math-sub-float math-lessp-float math-mul-float math-add-float (float 2 0) math-sub math-mul (float 2 0) (float 2 0) (float 2 0) math-sqr-float] 11])
(defalias 'math-line-min-func #[(expr n) "	T\nW$ \f	H8	TEE	TEEL \f!)" [-1 m n 2 math-min-vars + * (var DUMMY var-DUMMY) calcFunc-mrow (var line-xi line-xi) (var line-p line-p) math-evaluate-expr expr] 7])
(defalias 'math-line-min #[(f1dim line-p line-xi n prec) "!\f#\f$\f\fA@\"\"\f8E-" [nil var-DUMMY math-evaluate-expr f1dim expr math-widen-min (float 0 0) (float 1 0) params apply math-brent-min prec res math-mul line-xi xi math-add line-p 2] 5])
(byte-code "! B" [boundp math-min-vars [(var DUMMY var-DUMMY)] current-load-list] 2)
(defalias 'math-find-minimum #[(expr var guess min-widen) "!	! D!, DGGU9  AAK@=W @\"@\"h @\"TGY G!P!E!\")h H8LTH8L@! @HTHEE#@!!8EA@F	)BB	\\9 @H#@!@!E@@=:@!:@8@8\"\"@8!@8!@F@@\"	B	T9 		!U	@A@-z	@A@	@8#	@A@	@8	@8$	@@#0120AA1\\\\120$)!0B6ʉ6A@D68E6+Y121\\\\1	2$)!6A@8C\n8A8>	@8.\n8@8A@E!C8A8	A	6\n8@C	A	 N\n68EX\nA@68E,." [nil calc-symbolic-mode 0 n var-DUMMY math-vectorp var isvec g guesses vec guess math-dimension-error math-reject-arg vg "*Expected a variable" math-expr-contains expr "*Formula does not contain specified variable" math-min-vars intern "math-min-v" int-to-string symb vconcat vector 2 math-complexp math-expr-subst + * (cplx 0 1) math-float math-complex t math-realp intv math-constp math-mul math-add 3 (float 5 -1) realp math-evaluate-expr 1 min-widen math-widen-min math-narrow-min params calc-internal-prec prec math-normalize apply math-brent-min res math-powell-min p cplx] 9])
(byte-code "" ["minimum" math-min-or-max nil] 1)
(defalias 'calcFunc-minimize #[(expr var guess) "]!!	!$*" [calc-internal-prec 2 3 "minimum" math-min-or-max math-find-minimum math-normalize expr var guess nil] 5])
(defalias 'calcFunc-wminimize #[(expr var guess) "]!!	!$*" [calc-internal-prec 2 3 "minimum" math-min-or-max math-find-minimum math-normalize expr var guess t] 5])
(defalias 'calcFunc-maximize #[(expr var guess) "]!!	!\n!$\f\fA@\f8!E+" [calc-internal-prec 2 3 "maximum" math-min-or-max math-find-minimum math-normalize math-neg expr var guess nil res vec] 5])
(defalias 'calcFunc-wmaximize #[(expr var guess) "]!!	!\n!$\f\fA@\f8!E+" [calc-internal-prec 2 3 "maximum" math-min-or-max math-find-minimum math-normalize math-neg expr var guess t res vec] 5])
(defalias 'calcFunc-polint #[(data x) "	! 	\"	GU 	\"	8GV% 	\"\n!A \n!8 \fA \nA\"B\n!S \fS \n\"\\	A@A	8A\n$)B!" [math-matrixp data math-reject-arg matrixp 3 "*Wrong number of data rows" 1 2 "*Too few data points" math-vectorp x math-constp math-expand-formulas vec mapcar #[(x) "	\n\"" [calcFunc-polint data x] 3] math-objectp objectp math-normalize calc-internal-prec math-poly-interp nil] 7])
(put (quote calcFunc-polint) (quote math-expandable) t)
(defalias 'calcFunc-ratint #[(data x) "	! 	\"	GU 	\"	8GV% 	\"\n!A \n!8 \fA \nA\"B\n!S \fS \n\"\\	A@A	8A\n	A@AAA$)B!" [math-matrixp data math-reject-arg matrixp 3 "*Wrong number of data rows" 1 2 "*Too few data points" math-vectorp x math-constp math-expand-formulas vec mapcar #[(x) "	\n\"" [calcFunc-ratint data x] 3] math-objectp objectp math-normalize calc-internal-prec math-poly-interp] 7])
(put (quote calcFunc-ratint) (quote math-expandable) t)
(defalias 'math-poly-interp #[(xa ya x ratp) "G!!ĉ	\n\fTXk 	@\"B	A	@!a \"1 1 S8! D|\fT\fWw	\fT\fZXJ 	@@\"@\"A@@\"A@\"\"A@\"\")3	@@\"B\"A@@\"	@@\"\"@\"	@\"AA	A	A \\\fZWa8\nlS8\n\n\" \nD." [xa nil copy-sequence ya 0 temp dp cp xpm xp dy y m i d c xax ns dif n math-sub x math-abs math-lessp math-zerop ratp math-div math-mul t2 math-equal math-reject-arg vec "*Duplicate X values" math-add] 16])
(defalias 'calcFunc-ninteg #[(expr var lo hi) "	!\n!	! 	! 	\"\n!* \n!* \n\"\n	\"< \n\n	$!\n#\nΉ\n!\n	Ԛ~ \n\"h \ni \n	!!%)\nܚ 	\" 	 \n!\n!%\")	\n\" \n	!\n!%\"," [math-evaluate-expr lo hi math-numberp math-infinitep math-reject-arg numberp math-lessp math-neg calcFunc-ninteg expr var math-expr-subst (var DUMMY var-DUMMY) nil 0 sum calc-prefer-frac calc-symbolic-mode var-DUMMY (neg (var inf var-inf)) (float -2 0) (float -2 0) thi math-ninteg-romberg math-ninteg-midpoint math-float inf (var inf var-inf) (float 2 0) (float 2 0) tlo math-add math-equal] 8])
(defalias 'math-ninteg-romberg #[(func expr lo hi mode) "	\n\\ TX $C	\nC	Yp 	$A@!@![\"\"o @)Y A	A	\n\"\n  !\")!." [(float 1 0) nil 0 calc-internal-prec integ-temp prec ss j s h curh math-normalize 2 8 func expr lo hi mode 3 math-poly-interp (float 0 0) res math-lessp math-abs calcFunc-scf math-ninteg-convergence 5 math-div-float (float 9 0) math-reject-arg format "*Integral failed to converge"] 7])
(defalias 'math-ninteg-evaluate #[(expr x mode) "= \f\"\f!:& @>& \"=5 \f!\"*" [mode inf math-div (float 1 0) x var-DUMMY math-evaluate-expr expr res (bigpos bigneg frac float cplx polar) math-reject-arg "*Integrand does not evaluate to a number" math-mul math-sqr] 5])
(defalias 'math-ninteg-midpoint #[(expr lo hi mode) "= \"	\"\f	*\n \n@_\f\n@_	\"\f!\"\"\"\"\"T\n@X T#T\f\"#\"\"\"e \f\nA@\"\"\"D\n. 	\"	\"\"#\"D\n\nA@" [mode inf t nil temp math-infinite-mode math-div 1 lo hi integ-temp 3 it3 2 math-working-step-2 0 math-working-step math-sub range math-float del math-add del2 del3 math-mul (float 5 -1) x (float 0 0) sum j math-ninteg-evaluate expr (float 3 0) (float 5 -1)] 9])
(byte-code "" [[(var DUMMY var-DUMMY)] math-dummy-vars 0 math-dummy-counter] 1)
(defalias 'math-dummy-variable #[nil "	GU \"!	E!\")	H8L	HT" [math-dummy-counter math-dummy-vars intern format "math-dummy-%d" symb vconcat vector var 2 nil] 6])
(defalias 'calcFunc-fit #[(expr vars &optional coefs data) "\\	%)!)" [10 math-in-fit math-normalize calc-internal-prec 2 math-general-fit expr vars coefs data nil] 7])
(defalias 'calcFunc-efit #[(expr vars &optional coefs data) "\\	%)!)" [10 math-in-fit math-normalize calc-internal-prec 2 math-general-fit expr vars coefs data sdev] 7])
(defalias 'calcFunc-xfit #[(expr vars &optional coefs data) "\\	%)!)" [10 math-in-fit math-normalize calc-internal-prec 2 math-general-fit expr vars coefs data full] 7])
(defalias 'math-general-fit #[(expr vars coefs data mode) "	=		\n\f !\" #l #\"# ! G> &\"8&8#A@   &\"&#\"! \"\"\"GS\"A@GS\f&! & &D&#! # #D## &\"B#&-#GSX#\"-#!#GZ=Z#AB&)&GSUF&GUF&\"#GS\nWX#\"#A@=u@\" @	ZD#\\	&A@=@\" @	ZD#	\\W =DE;!D\" !@ =,GA U,8!,8!,8GV,8G\nTU4B \"A@C 8A!8G	XD 	\"BE D 	\"\"BC \"A!FGH 	\"IJKLMNOPQRSTUJTJ\fXKOKWZFKFKHAIFKH@MKSUOCMV =	W X M8!O\"OMA@MCY MZ O!\"MCMV =CW X M8!O:\"OMA@M[K\\H8MLKTKh!No8JNNV =X N8!ONA@NJUOV =?O\\ O\"GGBN] \"ON] \"MV =8MA@LKQTK	WyKH!PIKPI^ PG\"PTATQAQ@RLKX]RARW R@^ PILH\"\"LTL4TW T@^ PN\"\"KTK_ INC\"BKQK	SWKLKTKQAQ@RKSLTL	WRARSASRKS@8.1` !^ \"a b !!c GS\"d \"!;DD;\\ \"efgg@fegAgW e^ g@f@\"\"efAf]X h f@e\"!e^ e@\"eW e\"AAQ+!gij K\f	X\\ \f	Z\"j#gAg#gY g@Z ^ KTKiAi@8j\"!\"!k_#-iggAgiAiWi@g@E-B-9-Bk+.l -\fY\fD-B-\fS\fn\n\fY\fD-B-\fS\f-*_ A&A\"#m \f\fT\fA@n =@A@\f=C*\f	Vo \f	ZEp !." [nil math-dummy-counter 1 mode full expr p dummy v mm m nn n beta covar var-YVALX var-YVAL weights xy-values new-coefs coef-filters y-dummy y-filter x-funcs chisq need-chisq have-sdevs orig-expr plain-expr first-var first-coef extended math-in-fit calc-simplify-mode data coefs math-vectorp (3 4) vars 2 3 math-dimension-error math-matrixp math-reject-arg matrixp vec math-all-vars-but "*Not enough variables in model" copy-sequence calcFunc-eq 0 "*Number of variables does not match data" "*Need at least one parameter" var "*Expected a variable" math-dummy-variable math-expr-subst calcFunc-fitparam calcFunc-fitvar calc-symbolic-mode math-evaluate-expr math-rewrite calcFunc-fitmodel (var FitRules var-FitRules) calcFunc-fitsystem 4 "*Model expression is too complex" vconcat make-list mapcar ptrs isigsq make-vector xvals i j k xval yval sigmasqr wt covj covjk covk betaj lud sdev math-add math-sqr math-make-sdev math-sqrt math-dummy-vars math-div "*Mixed error forms and plain numbers" math-mul append math-matrix-inv-raw math-zerop math-abs calcFunc-diag "*Singular matrix" sum xp bp math-sub cp sigdat calc-fit-to-trail math-multi-subst math-normalize calcFunc-fitdummy calcFunc-utpc (var nan var-nan)] 30])
(byte-code "" [0 math-in-fit nil calc-fit-to-trail] 1)
(defalias 'calcFunc-fitvar #[(x) "Y \n\f\\\\H\f8! \f\f!" [math-in-fit 2 math-dummy-vars first-var x -1 calc-var-value math-reject-arg] 3])
(defalias 'calcFunc-fitparam #[(x) "Y \n\f\\\\H\f8! \f\f!" [math-in-fit 2 math-dummy-vars first-coef x -1 calc-var-value math-reject-arg] 3])
(defalias 'calcFunc-fitdummy #[(x) "U\n \n8\n!" [math-in-fit 3 x new-coefs math-reject-arg] 2])
(defalias 'calcFunc-hasfitvars #[(expr) ":\f @> @= A@A\"\"" [expr (bigpos bigneg frac float cplx polar hms date mod var) 0 calcFunc-fitvar apply max mapcar calcFunc-hasfitvars] 5])
(defalias 'calcFunc-hasfitparams #[(expr) ":\f @> @= A@A\"\"" [expr (bigpos bigneg frac float cplx polar hms date mod var) 0 calcFunc-fitparam apply max mapcar calcFunc-hasfitparams] 5])
(defalias 'math-all-vars-but #[(expr but) "	! \f\n\"\n\"\fA\n \n\"\"*" [math-all-vars-in expr vars but p delq assoc sort mapcar car #[(x y) "A@	A@" [x y] 2]] 5])
(defalias 'math-all-vars-in #[(expr) "\f!\n*" [nil found vars math-all-vars-rec expr] 2])
(defalias 'math-all-vars-rec #[(expr) ":\f @>2 =A !1 \"* ATBBAA @!2 " [expr (bigpos bigneg frac float cplx polar hms date mod var) var math-const-var assoc vars found 1 math-all-vars-rec] 3])
