
(require (quote calc-ext))

(defun calc-Need-calc-lang nil (byte-code "" [nil] 1))

(defun calc-set-language (lang &optional option no-refresh) (byte-code "	N 
	N	N	N	N	N  	N	N		N3 
	N< ݉P 	X 	D#" [math-expr-opers lang math-standard-opers math-expr-function-mapping math-expr-variable-mapping calc-language-input-filter calc-language-output-filter calc-vector-brackets calc-complex-format calc-radix-formatter calc-function-open calc-function-close no-refresh calc-language calc-language-option option t math-oper-table math-function-table math-variable-table math-input-filter math-output-filter math-vector-brackets "[]" math-complex-format math-radix-formatter math-function-open "(" math-function-close ")" calc-change-mode (calc-language calc-language-option)] 4))

(defun calc-normal-language nil (interactive) (byte-code "!" [nil calc-do (lambda nil (byte-code "!!" [nil calc-set-language message "Normal language mode."] 3))] 2))

(defun calc-flat-language nil (interactive) (byte-code "!" [nil calc-do (lambda nil (byte-code "!!" [calc-set-language flat message "Flat language mode (all stack entries shown on one line)."] 3))] 2))

(defun calc-big-language nil (interactive) (byte-code "!" [nil calc-do (lambda nil (byte-code "!!" [calc-set-language big message "\"Big\" language mode."] 3))] 2))

(defun calc-unformatted-language nil (interactive) (byte-code "!" [nil calc-do (lambda nil (byte-code "!!" [calc-set-language unform message "Unformatted language mode."] 3))] 2))

(defun calc-c-language nil (interactive) (byte-code "!" [nil calc-do (lambda nil (byte-code "!!" [calc-set-language c message "`C' language mode."] 3))] 2))

(put (quote c) (quote math-oper-table) (quote (("u+" ident -1 1000) ("u-" neg -1 1000) ("u!" calcFunc-lnot -1 1000) ("~" calcFunc-not -1 1000) ("*" * 190 191) ("/" / 190 191) ("%" % 190 191) ("+" + 180 181) ("-" - 180 181) ("<<" calcFunc-lsh 170 171) (">>" calcFunc-rsh 170 171) ("<" calcFunc-lt 160 161) (">" calcFunc-gt 160 161) ("<=" calcFunc-leq 160 161) (">=" calcFunc-geq 160 161) ("==" calcFunc-eq 150 151) ("!=" calcFunc-neq 150 151) ("&" calcFunc-and 140 141) ("^" calcFunc-xor 131 130) ("|" calcFunc-or 120 121) ("&&" calcFunc-land 110 111) ("||" calcFunc-lor 100 101) ("?" (math-read-if) 91 90) ("!!!" calcFunc-pnot -1 88) ("&&&" calcFunc-pand 85 86) ("|||" calcFunc-por 75 76) ("=" calcFunc-assign 51 50) (":=" calcFunc-assign 51 50) ("::" calcFunc-condition 45 46))))

(put (quote c) (quote math-function-table) (quote ((acos . calcFunc-arccos) (acosh . calcFunc-arccosh) (asin . calcFunc-arcsin) (asinh . calcFunc-arcsinh) (atan . calcFunc-arctan) (atan2 . calcFunc-arctan2) (atanh . calcFunc-arctanh))))

(put (quote c) (quote math-variable-table) (quote ((M_PI . var-pi) (M_E . var-e))))

(put (quote c) (quote math-vector-brackets) "{}")

(put (quote c) (quote math-radix-formatter) (function (lambda (r s) (if (= r 16) (format "0x%s" s) (if (= r 8) (format "0%s" s) (format "%d#%s" r s))))))

(defun calc-pascal-language (n) (interactive "P") (byte-code "!" [nil calc-do (lambda nil (byte-code "	 !\" \") V% ǂ& Ȃ* !" [n prefix-numeric-value calc-set-language pascal message /= 0 "Pascal language mode (all uppercase)." "Pascal language mode (all lowercase)." "Pascal language mode."] 6))] 2))

(put (quote pascal) (quote math-oper-table) (quote (("not" calcFunc-lnot -1 1000) ("*" * 190 191) ("/" / 190 191) ("and" calcFunc-and 190 191) ("div" calcFunc-idiv 190 191) ("mod" % 190 191) ("u+" ident -1 185) ("u-" neg -1 185) ("+" + 180 181) ("-" - 180 181) ("or" calcFunc-or 180 181) ("xor" calcFunc-xor 180 181) ("shl" calcFunc-lsh 180 181) ("shr" calcFunc-rsh 180 181) ("in" calcFunc-in 160 161) ("<" calcFunc-lt 160 161) (">" calcFunc-gt 160 161) ("<=" calcFunc-leq 160 161) (">=" calcFunc-geq 160 161) ("=" calcFunc-eq 160 161) ("<>" calcFunc-neq 160 161) ("!!!" calcFunc-pnot -1 85) ("&&&" calcFunc-pand 80 81) ("|||" calcFunc-por 75 76) (":=" calcFunc-assign 51 50) ("::" calcFunc-condition 45 46))))

(put (quote pascal) (quote math-input-filter) (quote calc-input-case-filter))

(put (quote pascal) (quote math-output-filter) (quote calc-output-case-filter))

(put (quote pascal) (quote math-radix-formatter) (function (lambda (r s) (if (= r 16) (format "$%s" s) (format "%d#%s" r s)))))

(defun calc-input-case-filter (str) (byte-code "? U 	 	!" [calc-language-option str t 0 downcase] 2))

(defun calc-output-case-filter (str) (byte-code "? U 	 V 	! 	!" [calc-language-option str t 0 upcase downcase] 3))

(defun calc-fortran-language (n) (interactive "P") (byte-code "!" [nil calc-do (lambda nil (byte-code "	 !\" \") V% ǂ& Ȃ* !" [n prefix-numeric-value calc-set-language fortran message /= 0 "FORTRAN language mode (all uppercase)." "FORTRAN language mode (all lowercase)." "FORTRAN language mode."] 6))] 2))

(put (quote fortran) (quote math-oper-table) (quote (("u/" (math-parse-fortran-vector) -1 1) ("/" (math-parse-fortran-vector-end) 1 -1) ("**" ^ 201 200) ("u+" ident -1 191) ("u-" neg -1 191) ("*" * 190 191) ("/" / 190 191) ("+" + 180 181) ("-" - 180 181) (".LT." calcFunc-lt 160 161) (".GT." calcFunc-gt 160 161) (".LE." calcFunc-leq 160 161) (".GE." calcFunc-geq 160 161) (".EQ." calcFunc-eq 160 161) (".NE." calcFunc-neq 160 161) (".NOT." calcFunc-lnot -1 121) (".AND." calcFunc-land 110 111) (".OR." calcFunc-lor 100 101) ("!!!" calcFunc-pnot -1 85) ("&&&" calcFunc-pand 80 81) ("|||" calcFunc-por 75 76) ("=" calcFunc-assign 51 50) (":=" calcFunc-assign 51 50) ("::" calcFunc-condition 45 46))))

(put (quote fortran) (quote math-vector-brackets) "//")

(put (quote fortran) (quote math-function-table) (quote ((acos . calcFunc-arccos) (acosh . calcFunc-arccosh) (aimag . calcFunc-im) (aint . calcFunc-ftrunc) (asin . calcFunc-arcsin) (asinh . calcFunc-arcsinh) (atan . calcFunc-arctan) (atan2 . calcFunc-arctan2) (atanh . calcFunc-arctanh) (conjg . calcFunc-conj) (log . calcFunc-ln) (nint . calcFunc-round) (real . calcFunc-re))))

(put (quote fortran) (quote math-input-filter) (quote calc-input-case-filter))

(put (quote fortran) (quote math-output-filter) (quote calc-output-case-filter))

(defun math-parse-fortran-vector (op) (byte-code "\"@A)" [math-parsing-fortran-vector t exp-token exp-data (end . " ") math-read-brackets "]"] 4))

(defun math-parse-fortran-vector-end (x op) (byte-code " 	
Bŉ \"" [math-parsing-fortran-vector exp-token exp-data x end " " throw syntax "Unmatched closing `/'"] 3))

(setq math-parsing-fortran-vector nil)

(defun math-parse-fortran-subscr (sym args) (byte-code "!	 	@E	A " [sym args math-build-var-name calcFunc-subscr] 5))

(defun calc-tex-language (n) (interactive "P") (byte-code "!" [nil calc-do (lambda nil (byte-code "	 !\" \") V% ǂ& Ȃ* !" [n prefix-numeric-value calc-set-language tex message /= 0 "TeX language mode with \\hbox{func}(\\hbox{var})." "TeX language mode with \\func{\\hbox{var}}." "TeX language mode."] 6))] 2))

(put (quote tex) (quote math-oper-table) (quote (("u+" ident -1 1000) ("u-" neg -1 1000) ("\\hat" calcFunc-hat -1 950) ("\\check" calcFunc-check -1 950) ("\\tilde" calcFunc-tilde -1 950) ("\\acute" calcFunc-acute -1 950) ("\\grave" calcFunc-grave -1 950) ("\\dot" calcFunc-dot -1 950) ("\\ddot" calcFunc-dotdot -1 950) ("\\breve" calcFunc-breve -1 950) ("\\bar" calcFunc-bar -1 950) ("\\vec" calcFunc-Vec -1 950) ("\\underline" calcFunc-under -1 950) ("u|" calcFunc-abs -1 0) ("|" closing 0 -1) ("\\lfloor" calcFunc-floor -1 0) ("\\rfloor" closing 0 -1) ("\\lceil" calcFunc-ceil -1 0) ("\\rceil" closing 0 -1) ("\\pm" sdev 300 300) ("!" calcFunc-fact 210 -1) ("^" ^ 201 200) ("_" calcFunc-subscr 201 200) ("\\times" * 191 190) ("*" * 191 190) ("2x" * 191 190) ("+" + 180 181) ("-" - 180 181) ("\\over" / 170 171) ("/" / 170 171) ("\\choose" calcFunc-choose 170 171) ("\\mod" % 170 171) ("<" calcFunc-lt 160 161) (">" calcFunc-gt 160 161) ("\\leq" calcFunc-leq 160 161) ("\\geq" calcFunc-geq 160 161) ("=" calcFunc-eq 160 161) ("\\neq" calcFunc-neq 160 161) ("\\ne" calcFunc-neq 160 161) ("\\lnot" calcFunc-lnot -1 121) ("\\land" calcFunc-land 110 111) ("\\lor" calcFunc-lor 100 101) ("?" (math-read-if) 91 90) ("!!!" calcFunc-pnot -1 85) ("&&&" calcFunc-pand 80 81) ("|||" calcFunc-por 75 76) ("\\gets" calcFunc-assign 51 50) (":=" calcFunc-assign 51 50) ("::" calcFunc-condition 45 46) ("\\to" calcFunc-evalto 40 41) ("\\to" calcFunc-evalto 40 -1) ("=>" calcFunc-evalto 40 41) ("=>" calcFunc-evalto 40 -1))))

(put (quote tex) (quote math-function-table) (quote ((\\arccos . calcFunc-arccos) (\\arcsin . calcFunc-arcsin) (\\arctan . calcFunc-arctan) (\\arg . calcFunc-arg) (\\cos . calcFunc-cos) (\\cosh . calcFunc-cosh) (\\det . calcFunc-det) (\\exp . calcFunc-exp) (\\gcd . calcFunc-gcd) (\\ln . calcFunc-ln) (\\log . calcFunc-log10) (\\max . calcFunc-max) (\\min . calcFunc-min) (\\tan . calcFunc-tan) (\\sin . calcFunc-sin) (\\sinh . calcFunc-sinh) (\\sqrt . calcFunc-sqrt) (\\tanh . calcFunc-tanh) (\\phi . calcFunc-totient) (\\mu . calcFunc-moebius))))

(put (quote tex) (quote math-variable-table) (quote ((\\pi . var-pi) (\\infty . var-inf) (\\infty . var-uinf) (\\phi . var-phi) (\\gamma . var-gamma) (\\sum math-parse-tex-sum calcFunc-sum) (\\prod math-parse-tex-sum calcFunc-prod))))

(put (quote tex) (quote math-complex-format) (quote i))

(defun math-parse-tex-sum (f val) (byte-code "\" \"  !=/ 
T\"\"; \"  8 88	%+" [low high save exp-data exp-old-pos f nil equal "_" throw syntax "Expected `_'" math-read-token math-read-factor car-safe calcFunc-eq "Expected equation" "^" "Expected `^'" list 2 1] 17))

(defun math-tex-input-filter (str) (byte-code "\" !TO!SOP  " [str string-match "[0-9]\\\\,[0-9]" 0 match-beginning match-end nil] 8))

(put (quote tex) (quote math-input-filter) (quote math-tex-input-filter))

(defun calc-eqn-language (n) (interactive "P") (byte-code "!" [nil calc-do (lambda nil (byte-code "!!" [calc-set-language eqn message "Eqn language mode."] 3))] 2))

(put (quote eqn) (quote math-oper-table) (quote (("u+" ident -1 1000) ("u-" neg -1 1000) ("prime" (math-parse-eqn-prime) 950 -1) ("prime" calcFunc-Prime 950 -1) ("dot" calcFunc-dot 950 -1) ("dotdot" calcFunc-dotdot 950 -1) ("hat" calcFunc-hat 950 -1) ("tilde" calcFunc-tilde 950 -1) ("vec" calcFunc-Vec 950 -1) ("dyad" calcFunc-dyad 950 -1) ("bar" calcFunc-bar 950 -1) ("under" calcFunc-under 950 -1) ("sub" calcFunc-subscr 931 930) ("sup" ^ 921 920) ("sqrt" calcFunc-sqrt -1 910) ("over" / 900 901) ("u|" calcFunc-abs -1 0) ("|" closing 0 -1) ("left floor" calcFunc-floor -1 0) ("right floor" closing 0 -1) ("left ceil" calcFunc-ceil -1 0) ("right ceil" closing 0 -1) ("+-" sdev 300 300) ("!" calcFunc-fact 210 -1) ("times" * 191 190) ("*" * 191 190) ("2x" * 191 190) ("/" / 180 181) ("%" % 180 181) ("+" + 170 171) ("-" - 170 171) ("<" calcFunc-lt 160 161) (">" calcFunc-gt 160 161) ("<=" calcFunc-leq 160 161) (">=" calcFunc-geq 160 161) ("=" calcFunc-eq 160 161) ("==" calcFunc-eq 160 161) ("!=" calcFunc-neq 160 161) ("u!" calcFunc-lnot -1 121) ("&&" calcFunc-land 110 111) ("||" calcFunc-lor 100 101) ("?" (math-read-if) 91 90) ("!!!" calcFunc-pnot -1 85) ("&&&" calcFunc-pand 80 81) ("|||" calcFunc-por 75 76) ("<-" calcFunc-assign 51 50) (":=" calcFunc-assign 51 50) ("::" calcFunc-condition 45 46) ("->" calcFunc-evalto 40 41) ("->" calcFunc-evalto 40 -1) ("=>" calcFunc-evalto 40 41) ("=>" calcFunc-evalto 40 -1))))

(put (quote eqn) (quote math-function-table) (quote ((arc\ cos . calcFunc-arccos) (arc\ cosh . calcFunc-arccosh) (arc\ sin . calcFunc-arcsin) (arc\ sinh . calcFunc-arcsinh) (arc\ tan . calcFunc-arctan) (arc\ tanh . calcFunc-arctanh) (GAMMA . calcFunc-gamma) (phi . calcFunc-totient) (mu . calcFunc-moebius) (matrix math-parse-eqn-matrix))))

(put (quote eqn) (quote math-variable-table) (quote ((inf . var-uinf))))

(put (quote eqn) (quote math-complex-format) (quote i))

(defun math-parse-eqn-matrix (f sym) (byte-code "
\"6  
\" \"  BB
\"/ \"  
\"B \" !B!)" [vec nil exp-data calc-function-open calc-function-close assoc (("ccol") ("lcol") ("rcol")) math-read-token equal throw syntax "Expected `{'" math-read-expr-list "Expected `}'" math-transpose nreverse] 16))

(defun math-parse-eqn-prime (x sym) (byte-code "!=a 	
\"J  	\" =# Ƃ%  	\"0 =?8 \" 8\"!B)^ 8!P!8!P!Ed D" [x exp-data calc-function-open args calc-function-close exp-token nil car-safe var equal math-read-token end math-read-expr-list throw syntax "Expected `)'" intern format "calcFunc-%s'" 1 symbol-name "'" 2 calcFunc-Prime] 18))

(defun calc-mathematica-language nil (interactive) (byte-code "!" [nil calc-do (lambda nil (byte-code "!!" [calc-set-language math message "Mathematica language mode."] 3))] 2))

(put (quote math) (quote math-oper-table) (quote (("[[" (math-read-math-subscr) 250 -1) ("!" calcFunc-fact 210 -1) ("!!" calcFunc-dfact 210 -1) ("^" ^ 201 200) ("u+" ident -1 197) ("u-" neg -1 197) ("/" / 195 196) ("*" * 190 191) ("2x" * 190 191) ("+" + 180 181) ("-" - 180 181) ("<" calcFunc-lt 160 161) (">" calcFunc-gt 160 161) ("<=" calcFunc-leq 160 161) (">=" calcFunc-geq 160 161) ("==" calcFunc-eq 150 151) ("!=" calcFunc-neq 150 151) ("u!" calcFunc-lnot -1 121) ("&&" calcFunc-land 110 111) ("||" calcFunc-lor 100 101) ("!!!" calcFunc-pnot -1 85) ("&&&" calcFunc-pand 80 81) ("|||" calcFunc-por 75 76) (":=" calcFunc-assign 51 50) ("=" calcFunc-assign 51 50) ("->" calcFunc-assign 51 50) (":>" calcFunc-assign 51 50) ("::" calcFunc-condition 45 46))))

(put (quote math) (quote math-function-table) (quote ((Abs . calcFunc-abs) (ArcCos . calcFunc-arccos) (ArcCosh . calcFunc-arccosh) (ArcSin . calcFunc-arcsin) (ArcSinh . calcFunc-arcsinh) (ArcTan . calcFunc-arctan) (ArcTanh . calcFunc-arctanh) (Arg . calcFunc-arg) (Binomial . calcFunc-choose) (Ceiling . calcFunc-ceil) (Conjugate . calcFunc-conj) (Cos . calcFunc-cos) (Cosh . calcFunc-cosh) (D . calcFunc-deriv) (Dt . calcFunc-tderiv) (Det . calcFunc-det) (Exp . calcFunc-exp) (EulerPhi . calcFunc-totient) (Floor . calcFunc-floor) (Gamma . calcFunc-gamma) (GCD . calcFunc-gcd) (If . calcFunc-if) (Im . calcFunc-im) (Inverse . calcFunc-inv) (Integrate . calcFunc-integ) (Join . calcFunc-vconcat) (LCM . calcFunc-lcm) (Log . calcFunc-ln) (Max . calcFunc-max) (Min . calcFunc-min) (Mod . calcFunc-mod) (MoebiusMu . calcFunc-moebius) (Random . calcFunc-random) (Round . calcFunc-round) (Re . calcFunc-re) (Sign . calcFunc-sign) (Sin . calcFunc-sin) (Sinh . calcFunc-sinh) (Sqrt . calcFunc-sqrt) (Tan . calcFunc-tan) (Tanh . calcFunc-tanh) (Transpose . calcFunc-trn) (Length . calcFunc-vlen))))

(put (quote math) (quote math-variable-table) (quote ((I . var-i) (Pi . var-pi) (E . var-e) (GoldenRatio . var-phi) (EulerGamma . var-gamma) (Infinity . var-inf) (ComplexInfinity . var-uinf) (Indeterminate . var-nan))))

(put (quote math) (quote math-vector-brackets) "{}")

(put (quote math) (quote math-complex-format) (quote I))

(put (quote math) (quote math-function-open) "[")

(put (quote math) (quote math-function-close) "]")

(put (quote math) (quote math-radix-formatter) (function (lambda (r s) (format "%d^^%s" r s))))

(defun math-read-math-subscr (x op) (byte-code "!	\"  	\" \" 
E)" [idx exp-data x math-read-expr-level 0 equal "]" math-read-token throw syntax "Expected ']]'" calcFunc-subscr] 9))

(defun calc-maple-language nil (interactive) (byte-code "!" [nil calc-do (lambda nil (byte-code "!!" [calc-set-language maple message "Maple language mode."] 3))] 2))

(put (quote maple) (quote math-oper-table) (quote (("matrix" ident -1 300) ("MATRIX" ident -1 300) ("!" calcFunc-fact 210 -1) ("^" ^ 201 200) ("**" ^ 201 200) ("u+" ident -1 197) ("u-" neg -1 197) ("/" / 191 192) ("*" * 191 192) ("intersect" calcFunc-vint 191 192) ("+" + 180 181) ("-" - 180 181) ("union" calcFunc-vunion 180 181) ("minus" calcFunc-vdiff 180 181) ("mod" % 170 170) (".." (math-read-maple-dots) 165 165) ("\\dots" (math-read-maple-dots) 165 165) ("<" calcFunc-lt 160 160) (">" calcFunc-gt 160 160) ("<=" calcFunc-leq 160 160) (">=" calcFunc-geq 160 160) ("=" calcFunc-eq 160 160) ("<>" calcFunc-neq 160 160) ("not" calcFunc-lnot -1 121) ("and" calcFunc-land 110 111) ("or" calcFunc-lor 100 101) ("!!!" calcFunc-pnot -1 85) ("&&&" calcFunc-pand 80 81) ("|||" calcFunc-por 75 76) (":=" calcFunc-assign 51 50) ("::" calcFunc-condition 45 46))))

(put (quote maple) (quote math-function-table) (quote ((bernoulli . calcFunc-bern) (binomial . calcFunc-choose) (diff . calcFunc-deriv) (GAMMA . calcFunc-gamma) (ifactor . calcFunc-prfac) (igcd . calcFunc-gcd) (ilcm . calcFunc-lcm) (int . calcFunc-integ) (modp . %) (irem . %) (iquo . calcFunc-idiv) (isprime . calcFunc-prime) (length . calcFunc-vlen) (member . calcFunc-in) (crossprod . calcFunc-cross) (inverse . calcFunc-inv) (trace . calcFunc-tr) (transpose . calcFunc-trn) (vectdim . calcFunc-vlen))))

(put (quote maple) (quote math-variable-table) (quote ((I . var-i) (Pi . var-pi) (E . var-e) (infinity . var-inf) (infinity . var-uinf) (infinity . var-nan))))

(put (quote maple) (quote math-complex-format) (quote I))

(defun math-read-maple-dots (x op) (byte-code "	8!F" [x op intv 3 math-read-expr-level] 6))

(defun math-read-big-rec (h1 v1 h2 v2 &optional baseline prec short) (byte-code " ߉	
W 		T$  	T 	
W. 
S
$9 
S! 
	TX 
	XO 	8GVY 	\" 		8

G^O!!= 8\\	8# W 	T
$ T W S	
$ S 
	\"	
W@G^W{H\"{HU3TWTHU3S\"\"3T\"\"kTWNHUVɈ;
Vh
{{HTA ?	\"4	
	$T
$!!\"E*4	UT\"UT#	T&TS\"UɈ
\\\"U5#T\"UJɈ6	T&T
&\\TT%D4	UTS\"UT	S&T
&	T&TS\"UɈTT%D4	UT\"U8#Ue!	T&TT
&S	&ST
&T	S$TTS
$E4	UT	
&D4	U	T&TT
&T$S	&ST
&S\"UT@ USA #B UT	S
%#	S
%DU_C S\"B UT߂UBBS\"@ UzSA #D UE @!E 8!F #G BH UE @!I 8!F #J B*4	K U2T\"K U$T\"K U$\"U$T\"K U2T\"K U0	&ɉTL #xUuM #}T$B\"N >T\"K UTQU\"UT\"@ UTSM #\"D UTTS
&Z\"\\O P !B+4	K U?	T&TT
&TL $S	&ST
&	S
%BS\"D UɈ[S\"Q >=ASM #U/TL #R S 	S
%C\"C S\"@ U$T %BB<O P !B4	U U8V #!	&T
&T%4	W YX XY YZ X8[ #!!\\ \"	&T
&\"U] \"^ !^ _ P!Tɉ	&T
&$S	&ST
&	S
%BS\"D UɈ=S\"B USA #P !B` ^ a !!] \"^ !^ b P!E4	8c #U	d #!e \\ \"!	&T
&M	UJ	f #R	8G^Wu	HU	Tf	Y	
$		$		g 	$E		$	h 
$EWV
	T$(
TT
$(
i #(
j \\ \"\"@
8Y=
!V
k #=?V
l 
T 8m =s
8D
n @o \"
	
&\"p U
q #8T	
T 8&F)
8	
T 8&E	U\".
" [prec v1 v2 h1 h2 lines the-baseline the-h2 widest nil widest-h2 lines-v1 p v other-v other-char line len h num den t baseline sep hmid vtop hleft hright math-standard-opers y short 0 math-read-big-emptyp math-read-big-error math-read-expr car-safe error 1 2 nthcdr /= 32 45 math-read-big-char math-read-big-rec math-integerp math-make-frac / 92 124 "Malformed root sign" 95 calcFunc-sqrt 86 40 string-match "( *)" match-end calcFunc-choose neg 250 math-read-big-balance "(" 46 93 "Expected `)'" 41 intv 44 math-realp "Complex components must be real" cplx 59 math-anglep polar 91 "[" "Expected `]'" (32 44) vec nreverse (59 41) nconc math-read-big-big-rec 3 60 ">" 97 122 65 90 "\\([a-zA-Z'_]+\\) *" math-match-substring "-" intern "calcFunc-" var math-remove-dashes "var-" "_?\\([0-9]+.?0*@ *\\)?\\([0-9]+.?0*' *\\)?\\([0-9]+\\(#\\|\\^\\^\\)[0-9a-zA-Z:]+\\|[0-9]+:[0-9:]+\\|[0-9.]+\\([eE][-+_]?[0-9]+\\)?\"?\\)?" "Expected a number" math-read-number "Inconsistent baseline in formula" ^ calcFunc-subscr "<=\\|>=\\|\\+/-\\|!=\\|&&\\|||\\|:=\\|=>\\|." assoc ",\\|;\\|\\.\\.\\|)\\|\\]\\|:" ("2x" * 196 195) -1 equal "?" 58 "Expected `:'"] 163))

(defun math-read-big-char (h v) (byte-code "	Y0 
W0 Y0 W0 8/ GW/ H)4 ȇ" [h h1 h2 v v1 v2 line lines 32] 2))

(defun math-read-big-emptyp (eh1 ev1 eh2 ev2 &optional what error) (byte-code "	W	 	
W V V+ 5 ͉
\"	W 	@G^S
Ye 	@HUm ψQ  
Y ;  #
W T	A	@ Y*" [ev1 v1 eh1 h1 ev2 v2 eh2 h2 what p lines h error 32 nthcdr nil math-read-big-error "Whitespace expected"] 5))

(defun math-read-big-error (h v &optional msg) (byte-code "
V 	@G#	AS 	@G^\\. E\"*" [pos p lines v h err-msg msg nil 0 + 1 error "Syntax error" throw syntax] 5))

(defun math-read-big-balance (h v what &optional commas) (byte-code "	
8G^V Y0 * 	\"#- ˉ H>@ T| 	H Uo H>l H=l TWl TH=u H>| ST +" [line v lines len h2 count h what h1 commas 1 0 math-read-big-error format "Unmatched `%s'" (40 91) (41 93 44 59) 46 (41 93)] 7))
