
(require (quote calc-ext))

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

(defun calc-min (arg) (interactive "P") (byte-code "\"" [nil calc-do (lambda nil (byte-code "$" [arg calc-binary-op "min" calcFunc-min (var inf var-inf)] 5)) 117] 3))

(defun calc-max (arg) (interactive "P") (byte-code "\"" [nil calc-do (lambda nil (byte-code "$" [arg calc-binary-op "max" calcFunc-max (neg (var inf var-inf))] 5)) 297] 3))

(defun calc-abs (arg) (interactive "P") (byte-code "\"" [nil calc-do (lambda nil (byte-code "#" [arg calc-unary-op "abs" calcFunc-abs] 4)) 483] 3))

(defun calc-idiv (arg) (interactive "P") (byte-code "\"" [nil calc-do (lambda nil (byte-code "$" [arg calc-binary-op "\\" calcFunc-idiv 1] 5)) 643] 3))

(defun calc-floor (arg) (interactive "P") (byte-code "\"" [nil calc-do (lambda nil (byte-code "    # #,  ' #, #" [arg calc-is-inverse calc-is-hyperbolic calc-unary-op "ceil" calcFunc-fceil calcFunc-ceil "flor" calcFunc-ffloor calcFunc-floor] 10)) 808] 3))

(defun calc-ceiling (arg) (interactive "P") (byte-code " !" [arg nil calc-invert-func calc-floor] 3))

(defun calc-round (arg) (interactive "P") (byte-code "\"" [nil calc-do (lambda nil (byte-code "    # #,  ' #, #" [arg calc-is-inverse calc-is-hyperbolic calc-unary-op "trnc" calcFunc-ftrunc calcFunc-trunc "rond" calcFunc-fround calcFunc-round] 10)) 1210] 3))

(defun calc-trunc (arg) (interactive "P") (byte-code " !" [arg nil calc-invert-func calc-round] 3))

(defun calc-mant-part (arg) (interactive "P") (byte-code "\"" [nil calc-do (lambda nil (byte-code "#" [arg calc-unary-op "mant" calcFunc-mant] 4)) 1613] 3))

(defun calc-xpon-part (arg) (interactive "P") (byte-code "\"" [nil calc-do (lambda nil (byte-code "#" [arg calc-unary-op "xpon" calcFunc-xpon] 4)) 1782] 3))

(defun calc-scale-float (arg) (interactive "P") (byte-code "\"" [nil calc-do (lambda nil (byte-code "#" [arg calc-binary-op "scal" calcFunc-scf] 4)) 1951] 3))

(defun calc-abssqr (arg) (interactive "P") (byte-code "\"" [nil calc-do (lambda nil (byte-code "#" [arg calc-unary-op "absq" calcFunc-abssqr] 4)) 2122] 3))

(defun calc-sign (arg) (interactive "P") (byte-code "\"" [nil calc-do (lambda nil (byte-code "#" [arg calc-unary-op "sign" calcFunc-sign] 4)) 2290] 3))

(defun calc-increment (arg) (interactive "p") (byte-code "!" [nil calc-do (lambda nil (byte-code "!E#" [arg calc-enter-result 1 "incr" calcFunc-incr calc-top-n] 7))] 2))

(defun calc-decrement (arg) (interactive "p") (byte-code "!" [nil calc-do (lambda nil (byte-code "!E#" [arg calc-enter-result 1 "decr" calcFunc-decr calc-top-n] 7))] 2))

(defun math-abs-approx (a) (byte-code ":9 @=6 @=?6 @>3 8:+ 8@=0 8W6 !< WE ! :?O @>V  @=l 8!8!\" @=y 8 @= 8! @= 8!8!\" @=  @= \" @= @ " [a t bigneg bigpos (frac float) 1 0 math-negp math-neg (bigpos bigneg frac float hms) cplx math-add math-abs 2 polar sdev math-abs-approx intv math-max 3 date vec math-reduce-vec math-add-abs-approx calcFunc-abs] 12))

(defun math-add-abs-approx (a b) (byte-code "!	!\"" [a b math-add math-abs-approx] 5))

(setq math-decls-cache-tag nil)

(setq math-decls-cache nil)

(setq math-decls-all nil)

(defun math-setup-declarations nil (byte-code "!=J !	Ɖ	!=A 	AA 	@!== 	@8= Ώ  \"," [math-decls-cache-tag p vec type range math-decls-cache nil math-decls-all calc-var-value var-Decls car-safe 2 err (byte-code "	@8É!= DA- @:?, @@>?| @!=x @8\"R 
\"w @8=f 
\"щw @8=w 
\"ԉ)  
\"B!
D!= DA @!= @:? @@>? @@= @8 @@
BB )" [v p type nil range vec st math-super-types math-decls-cache 1 car-safe (bigpos bigneg frac float cplx polar hms date sdev intv mod) var assq append pos (real number) (intv 1 0 (var inf var-inf)) nonneg (real number) (intv 3 0 (var inf var-inf)) (real number) math-prepare-set (bigpos bigneg frac float cplx polar hms date mod var) 2] 13) ((error (byte-code "" [nil] 1))) assq var-All] 8))

(defvar math-super-types (quote ((int numint rat real number) (numint real number) (frac rat real number) (rat real number) (float real number) (real number) (number) (scalar) (matrix vector) (vector) (const))))

(defun math-known-scalarp (a &optional assume-scalar) (byte-code "  = 	 
!? 
!" [calc-matrix-mode assume-scalar a math-setup-declarations scalar math-check-known-matrixp math-check-known-scalarp] 4))

(defun math-known-matrixp (a) (byte-code ":?
 @>? \"?" [a t (bigpos bigneg frac float cplx polar hms) math-known-scalarp] 3))

(defun math-check-known-scalarp (a) (byte-code ":?
 @>  @
>  @>'  @>G A9 @!A ʈ. ? @=V 8! !`  @=v 8\"s | @\"8>)" [a t math-scalar-functions math-real-scalar-functions math-scalar-if-args-functions decl math-decls-cache math-decls-all (bigpos bigneg frac float cplx polar hms date sdev intv mod) math-check-known-scalarp nil ^ 1 math-const-var var assq 2 scalar] 8))

(defun math-check-known-matrixp (a) (byte-code ":?
 @> x @
> Âx @>< A/ @!?7 # x @=K 8!x !U x @=k 8\"h q @\"8>)" [a nil math-nonscalar-functions t math-scalar-if-args-functions decl math-decls-cache math-decls-all (bigpos bigneg frac float cplx polar hms date sdev intv mod) math-check-known-matrixp ^ 1 math-const-var var assq 2 vector] 8))

(defun math-known-realp (a) (byte-code "!W" [a math-possible-signs 8] 3))

(defun math-known-posp (a) (byte-code "!=" [a math-possible-signs 4] 3))

(defun math-known-negp (a) (byte-code "!=" [a math-possible-signs 1] 3))

(defun math-known-nonnegp (a) (byte-code "!>" [a math-possible-signs (2 4 6)] 3))

(defun math-known-nonposp (a) (byte-code "!>" [a math-possible-signs (1 2 3)] 3))

(defun math-known-nonzerop (a) (byte-code "!>" [a math-possible-signs (1 4 5 8 9 12 13)] 3))

(defun math-guess-if-neg (a) (byte-code "	!>  > Â 	!)" [sgn a t nil math-possible-signs (1 3) (2 4 6) math-looks-negp] 3))

(defun math-possible-signs (a &optional origin) (byte-code ":?
 @>`	 	\":Q @=N @=?N @>K 8:C 8@=H 8VN !T V[ ڂ]: @= @=? @> 8: 8@= 8W ! W ׂ]: @>? @= 8= ! = ]@=E8: 8@>? 8@= 88= 8!8=	B8:58@>?28@=-88=28!:8=AB]@=\\8!XY]ꂌ@>}8:?u8@>@=8		8\"8\"!8		8\"8!\"z8:?8@>@=88!8		\"\")z8	\"8!@=!=y=y=$yY.yY8y=A=Hڂy=Q=Xڂy=a=hׂy=q=xׂy*@=8		!\"!		:	@>?	@=	8=	!	=ƉƆ@=@=	8:?8@>@=B8:!8@>?8@=88=8!&8=0	\"?8	:8\"\"O88	\"\"!8:8@=8@=?8@>88:88@=88W8!8W!)@>8:?8@>J8@=	8\"	8\"\"8:58@=28@=?28@>-88:#88@=*88W28!:8WD!F)@={A_Wt@ @	\"\"T)@A >8!8!YY@=B >@ C >D >E >!#*!@F =8!8!Y邋Y邋=ڂ=/=+,邋=EG >AB邋8:?U8@H >vI 8!rJ >noڂs==ょ邋*!@K =8!Y=L >M >)!@N >GU 8!=O >ڂ)!@P =GUm8!Y i	?(	!/ڂi	5\"	:^	@Q >?[	@=X	8=[	!a	=gƉ)!@R >zGU@S =GUT 8!U 8!8\"!@V =GU8!W >)!@
>!@>ڂ!@>!@>!@>GU!8! !			X 	\"	:n	@=k	@=?k	@Y >h	8:`	8@=e	8Vk	!q	V	Z >ׂ悓	[ >ڂ\\	\\ !8] =	^  	\"ڂ	8_ =	`  	\"ڂ	8a =ڂ	8b =c 	8d =	邋e  @f =+g 8\"(3g @\"	`h 8>`	:?_	@i >_	@=_	8Y?ij 8z8	\"k 8>悊))" [a origin t org s1 s2 nil s signs sign math-nonnegative-functions math-positive-functions math-real-functions math-real-scalar-functions math-real-if-arg-functions decl math-decls-cache math-decls-all (bigpos bigneg frac float cplx polar hms date sdev intv mod) math-sub bigpos bigneg (frac float) 1 0 math-posp 4 (frac float) math-negp (bigpos bigneg) float math-zerop 2 intv (bigpos bigneg) 6 3 (bigpos bigneg) 7 sdev math-known-realp 15 8 (+ -) (bigpos bigneg frac float) - math-neg-signs math-possible-signs math-add math-neg (bigpos bigneg frac float) neg (bigpos bigneg) * / (bigpos bigneg frac float) (bigpos bigneg) math-div (frac float) (* /) (bigpos bigneg frac float) math-mul (frac float) vec logior (* /) (2 3 6 7) (4 5 6 7) (2 3 6 7) (1 3 5 7) ^ (1 5) (bigpos bigneg) math-evenp (3 6 7) % (4 6) (1 3) (calcFunc-abs calcFunc-abssqr) (1 4 5) calcFunc-exp (bigpos bigneg) (calcFunc-ln calcFunc-log10) calcFunc-log math-known-posp math-known-nonnegp calcFunc-sqrt (2 4 6) logand (frac float) (1 2 3 8 9 10 11) (2 4 6 8 10 12 14) math-const-var var-pi math-pi var-e math-e var-inf var-uinf 13 var-i math-setup-declarations var assq int (bigpos bigneg) 5 real] 71))

(defun math-neg-signs (s1) (byte-code "Y Z!\\3 > ł >& Ȃ' >1 ʂ2 #" [s1 8 math-neg-signs + (1 3 5 7) 4 0 (2 3 6 7) 2 (4 5 6 7) 1] 6))

(defun math-known-integerp (a) (byte-code "!=" [a math-possible-types 1] 3))

(defun math-known-num-integerp (a) (byte-code "\"X" [a t math-possible-types 3] 3))

(defun math-known-imagp (a) (byte-code "!U" [a math-possible-types 16] 3))

(defun math-possible-types (a &optional num) (byte-code ":?
 @> :? @>& 	\" ӂ# Ԃ :7 @=7 8YF 	B ӂC ւ @=Y 	U قV ڂ @=l 	h قi ۂ @= 88\" 8! ߂ @= 8! ߂  @= 8! 債  @= 8!\"U 8!!\"U   7@=r8	\"8	\"\"W0\"V-U%U%,-߂nWmUUUG߂RWQRjUiWefjn+7@>8	\"8	\"\"@=\"\"\"W\"XԂX\"UX\"U@>ڂ	\"\"V\"V	
\"V\"\")W@=fUNU@߂KWJKcUbW^_cUq傎UzWUW悎ₒ+7@=8!7@=N8	\"8	\"\"X8!W5\"VԂ\"\"V#	\"1\"V\"V\"V/\"0\")J8!B8!I߂J+7@=8!\"Viӂj\"Vwx\"V߂\"V悔$)7@=	A	W	@\"\"		)7@
>@>8!Ԃ7@>@>8 !ւ7@=7@=GUM8!\"V5ւ6\"VCۂD\"#)7@>XGUp8!Yk߂l)7@ !8A >ۂ8B =Ԃ8C =傣7D  @E =F 8\"F @\"G 8>Ԃ6H 8>ӂ68>ڂ6I 8>	68>68&8!6J 8>5߂6)" [a num nil t t1 t2 t12 calc-prefer-frac mask types math-integer-functions math-rounding-functions math-num-integer-functions math-float-rounding-functions decl math-decls-cache math-decls-all (bigpos bigneg frac float cplx polar hms date sdev intv mod) (bigpos bigneg) 3 1 float 2 0 frac 12 4 8 intv equal math-possible-types 15 sdev math-known-realp 63 cplx math-zerop 16 32 polar math-compare math-quarter-circle math-neg 48 / logior logand 10 5 31 (+ - * %) % (+ -) * neg ^ math-known-nonnegp math-known-posp calcFunc-sqrt math-possible-signs vec calcFunc-frac calcFunc-float (calcFunc-abs calcFunc-abssqr) math-const-var (var-e var-pi var-phi var-gamma) var-inf var-i math-setup-declarations var assq int numint rat real] 68))

(defun math-known-evenp (a) (byte-code ":?
 @> ! :$ @=$ 8Y7 8V4 !! @=^ 8!N 8![ 8![ 8! @> 8!r 8! 8! 8! @= 8!" [a (bigpos bigneg) math-evenp float 2 0 math-trunc * math-known-evenp 1 math-known-num-integerp (+ -) math-known-oddp neg] 14))

(defun math-known-oddp (a) (byte-code ":?
 @> !j :$ @=$ 8Y7 8X4 !!j @>^ 8!K 8![ 8![ 8!j @=j 8!" [a (bigpos bigneg) math-oddp float 2 0 math-trunc (+ -) math-known-evenp 1 math-known-oddp neg] 10))

(defun calcFunc-dreal (expr) (byte-code "	!W Ă  \"U ǂ  	#)" [types expr math-possible-types 16 1 logand 15 0 math-reject-arg realp quiet] 6))

(defun calcFunc-dimag (expr) (byte-code "	!U Ă \"U Ƃ 	\")" [types expr math-possible-types 16 1 logand 0 math-reject-arg "Expected an imaginary number"] 5))

(defun calcFunc-dpos (expr) (byte-code "	!= Ă > Ƃ 	#)" [signs expr math-possible-signs 4 1 (1 2 3) 0 math-reject-arg posp quiet] 5))

(defun calcFunc-dneg (expr) (byte-code "	!= Â > ł 	#)" [signs expr math-possible-signs 1 (2 4 6) 0 math-reject-arg negp quiet] 5))

(defun calcFunc-dnonneg (expr) (byte-code "	!> Ă = ł 	#)" [signs expr math-possible-signs (2 4 6) 1 0 math-reject-arg posp quiet] 5))

(defun calcFunc-dnonzero (expr) (byte-code "	!> Ă = Ƃ 	#)" [signs expr math-possible-signs (1 4 5 8 9 12 13) 1 2 0 math-reject-arg nonzerop quiet] 5))

(defun calcFunc-dint (expr) (byte-code "	!U Â  \"U ł  	#)" [types expr math-possible-types 1 logand 0 math-reject-arg integerp quiet] 6))

(defun calcFunc-dnumint (expr) (byte-code "	\"X ł! \"U ǂ! 	#)" [types expr t math-possible-types 3 1 logand 0 math-reject-arg integerp quiet] 6))

(defun calcFunc-dnatnum (expr) (byte-code "	!= 	! )" [res expr calcFunc-dint 1 calcFunc-dnonneg] 3))

(defun calcFunc-deven (expr) (byte-code "!
 # ! !\"U ǂ# \"" [expr math-known-evenp 1 math-known-oddp logand math-possible-types 3 0 math-reject-arg "Can't tell if expression is odd or even"] 7))

(defun calcFunc-dodd (expr) (byte-code "!
 # ! !\"U ǂ# \"" [expr math-known-oddp 1 math-known-evenp logand math-possible-types 3 0 math-reject-arg "Can't tell if expression is odd or even"] 7))

(defun calcFunc-drat (expr) (byte-code "	!> Ă \"U ǂ 	\")" [types expr math-possible-types (1 4 5) 1 logand 5 0 math-reject-arg "Rational number expected"] 5))

(defun calcFunc-drange (expr) (byte-code " 	:? 	@> 	Dk 	!=$ 	k 	!== 	8
\"7 8G 	!
\"8T !!k 	!Wf Hk 	#)" [range expr math-decls-cache math-decls-all math-setup-declarations nil (bigpos bigneg frac float) vec car-safe intv var 2 assq math-clean-set copy-sequence math-possible-signs 8 [(vec) (intv 2 (neg (var inf var-inf)) 0) (vec 0) (intv 3 (neg (var inf var-inf)) 0) (intv 1 0 (var inf var-inf)) (vec (intv 2 (neg (var inf var-inf)) 0) (intv 1 0 (var inf var-inf))) (intv 3 0 (var inf var-inf)) (intv 3 (neg (var inf var-inf)) (var inf var-inf))] math-reject-arg realp quiet] 13))

(defun calcFunc-dscalar (a) (byte-code "!
  ! Ă #" [a math-known-scalarp 1 math-known-matrixp 0 math-reject-arg objectp quiet] 6))

(defvar math-scalar-functions (quote (calcFunc-det calcFunc-cnorm calcFunc-rnorm calcFunc-vlen calcFunc-vcount calcFunc-vsum calcFunc-vprod calcFunc-vmin calcFunc-vmax)))

(defvar math-nonscalar-functions (quote (vec calcFunc-idn calcFunc-diag calcFunc-cvec calcFunc-index calcFunc-trn | calcFunc-append calcFunc-cons calcFunc-rcons calcFunc-tail calcFunc-rhead)))

(defvar math-scalar-if-args-functions (quote (+ - * / neg)))

(defvar math-real-functions (quote (calcFunc-arg calcFunc-re calcFunc-im calcFunc-floor calcFunc-ceil calcFunc-trunc calcFunc-round calcFunc-rounde calcFunc-roundu calcFunc-ffloor calcFunc-fceil calcFunc-ftrunc calcFunc-fround calcFunc-frounde calcFunc-froundu)))

(defvar math-positive-functions (quote nil))

(defvar math-nonnegative-functions (quote (calcFunc-cnorm calcFunc-rnorm calcFunc-vlen calcFunc-vcount)))

(defvar math-real-scalar-functions (quote (% calcFunc-idiv calcFunc-abs calcFunc-choose calcFunc-perm calcFunc-eq calcFunc-neq calcFunc-lt calcFunc-gt calcFunc-leq calcFunc-geq calcFunc-lnot calcFunc-max calcFunc-min)))

(defvar math-real-if-arg-functions (quote (calcFunc-sin calcFunc-cos calcFunc-tan calcFunc-arctan calcFunc-sinh calcFunc-cosh calcFunc-tanh calcFunc-exp calcFunc-gamma calcFunc-fact)))

(defvar math-integer-functions (quote (calcFunc-idiv calcFunc-isqrt calcFunc-ilog calcFunc-vlen calcFunc-vcount)))

(defvar math-num-integer-functions (quote nil))

(defvar math-rounding-functions (quote (calcFunc-floor calcFunc-ceil calcFunc-round calcFunc-trunc calcFunc-rounde calcFunc-roundu)))

(defvar math-float-rounding-functions (quote (calcFunc-ffloor calcFunc-fceil calcFunc-fround calcFunc-ftrunc calcFunc-frounde calcFunc-froundu)))

(defvar math-integer-if-args-functions (quote (+ - * % neg calcFunc-abs calcFunc-min calcFunc-max calcFunc-choose calcFunc-perm)))

(defun calcFunc-neg (a) (byte-code "D!" [a math-normalize neg] 3))

(defun math-neg-fancy (a) (byte-code "@=* 88! 8!\"& 8!\"Eq@=M 8!= J 88\"8Eq@=a 8!8Eq@=| 8H8!8!#q
 
\"? Dq@= 8!8\"q@= 88\"q@> 8! @8!8Eq@> 8! @88!Eq@>8!8@=88!@8!8Eq@==8!=8@==88!N@88!Eq@=Z8>aq@=n8qD" [a nil math-simplify-only t polar 1 math-posp 2 math-sub math-half-circle math-add mod math-zerop sdev math-neg intv math-make-intv [0 2 1 3] 3 equal neg + - (* /) math-okay-neg (* /) (* /) math-objectp * / var (var-uinf var-nan)] 29))

(defun math-okay-neg (a) (byte-code "! !=" [a math-looks-negp car-safe -] 4))

(defun math-neg-float (a) (byte-code "8:# 8@= 8AB  8AB' 8[8E" [a float 1 bigpos bigneg 2] 4))

(defun calcFunc-add (&rest rest) (byte-code "! @A 	@E 	!)\" ć" [rest a + math-normalize 0] 4))

(defun calcFunc-sub (&rest rest) (byte-code "! @A 	@E 	!)\" ć" [rest a - math-normalize 0] 4))

(defun math-add-objects-fancy (a b) (byte-code ":?
 @> 	:? 	@>J !	!
88\"
88\"E	\"C !D )!*:S @=_ 	:_ 	@=j 	#!= 	!= 8	8\"8	8\"\" 	:? 	@> 	:? 	@>? 8	\"8\"	!= :? @> :? @>? 	8\"	8\"!=	!=d8	8\"8\"8\"	8\"(	8\")8\";8\"<	8\"N	8\"O%8	8\"8	8\"#	:?n	@>	@=	:?	@>?88	\"8	\"#	!=:?@>@=:?@>?	8	8\"	8\"#!=G	!=8	8\"D	!=+8!@88\"	8\"	8\"	8\"\"\"\"\"D)D	:?5	@>C8	\"DDǂ	!=V	\"!=n	!=n8	8\"8	8\"8\"!=	:?	@>8	\"8\"	!=:?@>	8\"	8\"!=	!=:?@>	:?	@>!=!	!=	!!'@ Ё@ !@ 	!\"!	!8	8\"8	8\"	8	8\"
!c\"	A \"		!|	\"	
A \"

!	\"
	F+8	8\"8	8\"	8	8\"

	F+!B C 	#" [a b aa bb res parts t nil s m h (bigpos bigneg frac float cplx polar) (bigpos bigneg frac float cplx polar) math-complex math-normalize cplx math-add 1 2 math-want-polar math-polar vec math-map-vec-2 car-safe sdev math-make-sdev math-hypot (bigpos bigneg frac float cplx polar hms) (bigpos bigneg frac float cplx polar hms date sdev intv mod vec) (bigpos bigneg frac float cplx polar hms) (bigpos bigneg frac float cplx polar hms date sdev intv mod vec) intv math-make-intv logior logand equal (neg (var inf var-inf)) 0 (neg (var inf var-inf)) 3 (var inf var-inf) (var inf var-inf) (bigpos bigneg frac float hms) date (bigpos bigneg frac float cplx polar hms date sdev intv mod vec) (bigpos bigneg frac float hms) (bigpos bigneg frac float cplx polar hms date sdev intv mod vec) hms math-date-parts math-div math-mul 3600 60 86400 (bigpos bigneg frac float) math-add-objects-fancy mod math-make-mod (bigpos bigneg frac float hms) (bigpos bigneg frac float hms) (bigpos bigneg frac float hms) (bigpos bigneg frac float hms) math-to-hms math-negp math-neg -1 calc-record-why "*Incompatible arguments for +"] 98))

(defun math-add-symb-fancy (a b) (byte-code " 	\"? 	
E$
!=& 	
8\"
8\"$
!=< 	
8\"
8\"$
!=` 
8!=` 	
88\"
88\"$	:l 	@=r 
! 
:~ 
@= 	! 	
#$	!F
! 8> 8> ق 	\"
\":? @> :? @> \"U 	 *B	\"

!=

8>

8\"
8	FB	\"4
!=4
8>4
8\"A	
8FB	)
!_	!=[
	\"\\
	!=	8
%~	8\")	!=	8
%	8\")	:?	@>
:?
@>Ȃ	
%)$
:
@=
@=?
@>
8:
8@=
8W
!

W-
:-
@=-
@>-
8!-
8!6	
!E$	:r	@=o	@=?o	@>l	8:d	8@=i	8Wo	!u	W	:	@=	@>	8!	8!
	!E$	!=	GU
!=
GU	8
8\"D
!	8
\"
\"
!	8
\"$
!=	GU	!	
8	\"\"	!	
8\"$	
E" [math-simplify-only a b inf inf2 dir dir2 temp nil t equal + car-safe math-add 1 2 - math-sub neg vec math-known-scalarp math-map-vec-2 math-infinitep (var-uinf var-nan) (var-uinf var-nan) (var nan var-nan) math-infinite-dir (bigpos bigneg frac float cplx polar hms date sdev intv mod) (bigpos bigneg frac float cplx polar hms date sdev intv mod) math-compare 0 (var nan var-nan) (var inf var-inf) intv (2 3) (neg (var inf var-inf)) 3 (neg (var inf var-inf)) (1 3) (var inf var-inf) math-combine-sum (bigpos bigneg frac float cplx polar hms date sdev intv mod) (bigpos bigneg frac float cplx polar hms date sdev intv mod) bigneg bigpos (frac float) math-negp (* /) math-looks-negp math-neg (frac float) (* /) calcFunc-idn math-square-matrixp math-mimic-ident] 60))

(defun calcFunc-mul (&rest rest) (byte-code "! @A 	@E 	!)\" ć" [rest a * math-normalize 1] 4))

(defun math-mul-objects-fancy (a b) (byte-code ":?
 @> 	:? 	@>v 	\"B !	!8	8\"8	8\"!E*r !	!8	8\"8	8\"\"8	8\"8	8\"\"E!: @=	: 	@=! 	! 8G	GU 	\"   8GU G	GU 	D\"   8G	GU 	\"  	!G	GU D	\"8  G	GU	\" 	#	:(	@=3	#!=	!=b8	8\"8	8\"	88\"\"\"	:?l	@>z	:?y	@>?8	\"8	\"\"	!=:?@>:?@>?	8\"	8\"\"!=	:?	@>5	:	@=	@=?	@>
	8:	8@=	8W	!	W!	!\"!288	\"8	\"#	!=G:?G@>Q	\"!=j!j	!=j	!	8\"	8\"
!=	8>삑

F!=	8>삭F
8	8>
8!
8>
8	8>
8!
8>8	8>8!8>8	8>8!8>&*!=2	!=28	8\"E8	8\"8\"!=W	:?W	@>h8	\"8\"	!=z:?z@>	8\"	8\"!@ =	:?	@A >\\B ́C D \"	\"D \")!	!@ =:?@E >	\"F G 	#" [a b lo hi calc-internal-prec t (bigpos bigneg frac float cplx polar) (bigpos bigneg frac float cplx polar) math-normalize math-want-polar math-polar polar math-mul 1 math-fix-circular math-add 2 math-complex cplx math-sub vec math-matrixp math-mul-mats math-dimension-error math-mul-mat-vec math-dot-product math-map-vec-2 car-safe sdev math-make-sdev math-hypot (bigpos bigneg frac float cplx polar hms) (bigpos bigneg frac float cplx polar hms date sdev intv mod vec) (bigpos bigneg frac float cplx polar hms) (bigpos bigneg frac float cplx polar hms date sdev intv mod vec) intv (bigpos bigneg frac float hms) bigneg bigpos (frac float) 0 math-negp math-neg math-make-intv 3 (bigpos bigneg frac float hms) math-intv-constp (2 3) (1 3) math-combine-intervals (2 3) math-infinitep (2 3) (2 3) (1 3) (1 3) (2 3) (1 3) (1 3) mod equal math-make-mod (bigpos bigneg frac float hms) (bigpos bigneg frac float hms) hms (bigpos bigneg frac float) math-to-hms math-from-hms deg (bigpos bigneg frac float) calc-record-why "*Incompatible arguments for *"] 89))

(defun math-mul-float (a b) (byte-code "8	8\"8	8\\\"" [a b math-make-float math-mul 1 2] 6))

(defun math-sqr-float (a) (byte-code "88\"88\\\"" [a math-make-float math-mul 1 2] 6))

(defun math-intv-constp (a &optional finite) (byte-code "8:? 8@>$ 8\"$ 	?$ 8>K 8:?5 8@>K 8\"K 	?K 8>" [a finite 2 (bigpos bigneg frac float hms) equal (neg (var inf var-inf)) 1 (0 1) 3 (bigpos bigneg frac float hms) (var inf var-inf) (0 2)] 4))

(defun math-mul-zero (a b) (byte-code "! ! 	# \" !% ͂ !=d 8\"G 8>G 88\"^ 8>^ 8
d  	!~ 	!~ >~ ܉ 
  F 	! 
  F! ߂ 	! ! Ⴞ *" [b a aa nil bb calc-infinite-mode math-known-matrixp math-vectorp math-map-vec-2 math-mul math-mimic-ident 0 math-infinitep (var nan var-nan) car-safe intv equal 2 (neg (var inf var-inf)) 1 (2 3) 3 (var inf var-inf) (1 3) math-posp math-zerop (-1 1) (neg (var inf var-inf)) (var inf var-inf) math-negp math-neg (var nan var-nan) math-floatp (float 0 0)] 16))

(defun math-mul-symb-fancy (a b) (byte-code " 	\"? 	
E	=2 	:2 	@=2 	8=2 	8U6 
	=X 	:X 	@=X 	8=X 	8U^ 
!	:j 	@=p 
! 
:| 
@= 	! 	
#
:? 
@> 	:? 	@>? 
	\"	!= 	8
\"!
!= 	
8\"!	!= 	8	8
\"\"	!=	8:<	8@=9	8@=?9	8@>4	88:*	88@=1	88W9	8!A	8Wn	8:n	8@=n	8@>n	88!n	88!
!=
8:
8@=
8@=?
8@>
88:
88@=
88W
8!
8W
8:
8@=
8@>
88!
88!?
\"
	8	8!E!\"
!=-
8:b
8@=_
8@=?_
8@>Z
88:P
88@=W
88W_
8!g
8W
8:
8@=
8@>
88!
88!-	!=	8:	8@=	8@=?	8@>	88:	88@=	88W	8!	8W	8:	8@=	8@>	88!	88!?-	
8
8!E!\"	!=i	\"C
\"i	8
%]	8\"h	8
\"	8\")
!=	
8\"
8\"
!=	:?	@>
8:?
8@>
8:?
8@>	
8\"	
8\"\"
!=	:?	@>
8:?
8@>
8:?
8@>	
8\"	
8\"\"
!=D
8:?(
8@>D	:?5	@>?D
8	
8\"\"	!=	GU
!=o
GUo	8
8\"D
!	8
\"D
!	8
\"
!=
GU	!	
8\"D	!	
8\"
!	!
!\"
!=	!	!
!\"
!=	
8%
8\")	
%	\"	
\"(
	\"3	
\">

\"	!=X
=c=p
!=}@ 	@A =B 	!C 	@D =E 	8!ȁD ́F 	8!E
E	@G =ȁG 	8E
E)	H \"
	\"	
E" [math-simplify-only a b t temp nil s1 equal * 1 float 2 0 -1 math-neg vec math-known-scalarp math-map-vec-2 math-mul (bigpos bigneg frac float cplx polar hms date sdev intv mod) (bigpos bigneg frac float cplx polar hms date sdev intv mod) car-safe neg ^ bigneg bigpos (frac float) math-negp (* /) math-looks-negp (frac float) (* /) math-div math-normalize (frac float) (* /) (frac float) (* /) / math-combine-prod + (bigpos bigneg frac float cplx polar) (bigpos bigneg frac float cplx polar) (bigpos bigneg frac float cplx polar) math-add - (bigpos bigneg frac float cplx polar) (bigpos bigneg frac float cplx polar) (bigpos bigneg frac float cplx polar) math-sub (bigpos bigneg frac float cplx polar) (bigpos bigneg frac float cplx polar) calcFunc-idn math-known-matrixp (var nan var-nan) (var nan var-nan) (var uinf var-uinf) (var uinf var-uinf) (var inf var-inf) math-possible-signs 4 6 (intv 3 0 (var inf var-inf)) 3 (intv 3 (neg (var inf var-inf)) 0) intv math-intv-constp (intv 3 (neg (var inf var-inf)) (var inf var-inf)) cplx math-zerop calcFunc-sign polar (var inf var-inf)] 99))

(defun calcFunc-div (a &rest rest) (byte-code " 	@EA  	!" [rest a / math-normalize] 4))

(defun math-div-objects-fancy (a b) (byte-code ":?
 @> 	:? 	@> 	\"B !	!8	8\"8	8\"!E* 	:?L 	@>f !8	\"8	\"E !	!8	8\"8	8\"\"8	8\"8	8\"\"E	8!	8!\"\"!	!L	!E	G: @=! GU 	!	# 8GU 	!!!	#!  GU	!!	#\" A=2:2@=28=28U;	!A	!\")I	\":U@=b	:?b	@>m	#!=	!=8	8\"8	8\"\"	8\"\")	:?	@>	:?	@>?8	\"8	\"\"	\"	!=:?@>:?@>?	8\"	8\"	8\"\")!=	:?	@>	:Z	@=W	@=?W	@>T	8:L	8@=Q	8WW	!]	Wk	!\"!|88	\"8	\"#	!=:?@>G	8:	8@=	8@=?	8@>	88:	88@=	88V	8!	8V&	8:	8@>?	8@=		88=@ 	8!	8=&	8A >&:d@=a@=?a@B >^8:V8@=[8Wa!gWu!	\"!C 	8H	8\"	8\"#)D	8:	8@=	8@=?	8@D >	88:	88@=	88W	8!	8W&	8:	8@E >?	8@=		88=@ 	8!	8=&	8F >&4	!\"!D>G D	H \"!=dI !d	!=dI 	!	8:	8@=	8@=?	8@J >	88:	88@=	88V	8!	8V	8:	8@K >?	8@=	88=@ 	8!	8=	8L >	8\"	8\"!=3	8M >*+F!=U	8N >LMFO 8	8P >zQ 8!z@ 	8!?8R >8	8S >Q 8!@ 	8!?8T >8	8U >Q 8!@ 	8!?8V >8	8W >Q 8!@ 	8!?	8X >&+	8:Z	8@=W	8@=?W	8@Y >R	88:H	88@=O	88WW	8!_	8W	8:	8@Z >?	8@=	88=@ 	8!	8=	8[ >	!\"!\\ 	H \"!] =	!] =^ 8	8\"_ ` 8	88#8\"!] =	:?	@a >,_ ` 8	8#8\"	!] =B:?B@b >Z_ ` 	8	8#	8\"!c =	!c =\\ρd e \"d 	e \"\")!\\f ρd e \"	\"e \")!g h 	#" [a b t n1 x calc-infinite-mode lo hi calc-internal-prec (bigpos bigneg frac float cplx polar) (bigpos bigneg frac float cplx polar) math-normalize math-want-polar math-polar polar math-div 1 math-fix-circular math-sub 2 (bigpos bigneg frac float) math-complex cplx math-add math-mul math-sqr math-matrixp math-square-matrixp vec math-lud-solve math-matrix-lud math-transpose math-dimension-error math-mat-col math-col-matrix float 0 calcFunc-inv math-reject-arg square-matrixp (bigpos bigneg frac float cplx polar hms date sdev intv mod) math-map-vec-2 car-safe sdev math-make-sdev math-hypot (bigpos bigneg frac float cplx polar hms) (bigpos bigneg frac float cplx polar hms date sdev intv mod vec) realp (bigpos bigneg frac float cplx polar hms) (bigpos bigneg frac float cplx polar hms date sdev intv mod vec) intv (bigpos bigneg frac float hms) bigneg bigpos (frac float) math-negp math-neg math-make-intv 3 (bigpos bigneg frac float hms) (frac float) math-posp (bigpos bigneg) math-zerop (0 1) (frac float) [0 2 1 3] (frac float) (bigpos bigneg) (0 2) (intv 3 (neg (var inf var-inf)) (var inf var-inf)) "*Division by zero" math-intv-constp (frac float) (bigpos bigneg) (0 1) (2 3) (1 3) math-combine-intervals (2 3) math-infinitep (2 3) (2 3) (1 3) (1 3) (2 3) (1 3) (1 3) (frac float) (bigpos bigneg) (0 2) (intv 3 (neg (var inf var-inf)) (var inf var-inf)) mod equal math-make-mod math-div-mod (bigpos bigneg frac float hms) (bigpos bigneg frac float hms) hms math-from-hms deg math-to-hms calc-record-why "*Incompatible arguments for /"] 133))

(defun math-div-by-zero (a b) (byte-code "!\" \" 	\" 
>  Ȃ^ 
Z !0 ʂW 
== \"W 
=J \"W !=V ҂W ӂ^ \"" [a b calc-infinite-mode math-infinitep equal (var nan var-nan) (var uinf var-uinf) (-1 1) (var uinf var-uinf) math-zerop (var nan var-nan) 1 math-mul (var inf var-inf) -1 (neg (var inf var-inf)) car-safe intv (intv 3 (neg (var inf var-inf)) (var inf var-inf)) (var uinf var-uinf) math-reject-arg "*Division by zero"] 10))

(defun math-div-zero (a b) (byte-code "! ! 	# \"~ \"& ~ !=? !? !?? !?} 
v 8!S 
>\\ 8] 8!h 
>q 8r Fz \"~ 	" [b a calc-infinite-mode math-known-matrixp math-vectorp math-map-vec-2 math-div math-mimic-ident 0 equal (var nan var-nan) car-safe intv math-intv-constp math-posp math-negp 3 math-zerop 2 (1 -1) (neg (var inf var-inf)) (1 -1) (var inf var-inf) math-reject-arg "*Division by zero"] 16))

(defun math-div-symb-fancy (a b) (byte-code " 	\"? 	
EH
=2 
:2 
@=2 
8=2 
8U6 	H
=X 
:X 
@=X 
8=X 
8U^ 	!H	:j 	@=x 
!x 	
#H
!=2
8: 
8@= 
8@=? 
8@> 
88: 
88@= 
88W 
8! 
8W 
8: 
8@= 
8@> 
88! 
88! 	= 	: 	@= 	8= 	8U2	
8
8!E!\"H	!=E	8
\"!H
!=X	
8\"!H	!=n	8	8
\"\"H
!=
8\"
8\"	
8\"
8\"H
!=
8
8\"	\"H	!=	8:?	8@>	8:?	8@>
:?
@>	8
\"	8
\"\"H	!=<	8:?	8@>	8:?	8@><
:?+
@><	8
\"	8
\"\"H	!=J	![
![	!
!\"H
!=t	!t	!
!\"H	!=	GU
!=
GU	8
8\"D
!	8
\"D
!	8
\"H
!=
GU	!	
8\"D	!	
8\"H	!
!	
%	!=X
!==	8
8%9	8\"
8\")U	8
%T	8\")
!={	
8%w
8\")	
%H	!%
!%	\"	\"	%	\"%
!
!=
8!
!=
\"?	%
!
!=
8!
!=
\"?		!%
!=!
8!!
8!%H
!A
\"9
A
	\")H	
E" [math-simplify-only a b t calc-matrix-mode nil c calc-infinite-mode equal / 1 float 2 0 -1 math-neg vec math-known-scalarp math-map-vec-2 math-div car-safe ^ bigneg bigpos (frac float) math-negp neg (* /) math-looks-negp math-mul math-normalize frac math-make-frac + (bigpos bigneg frac float cplx polar) (bigpos bigneg frac float cplx polar) (bigpos bigneg frac float cplx polar) math-add - (bigpos bigneg frac float cplx polar) (bigpos bigneg frac float cplx polar) (bigpos bigneg frac float cplx polar) math-sub calcFunc-idn math-known-matrixp math-combine-prod * math-infinitep (var nan var-nan) (var nan var-nan) (var uinf var-uinf) (var inf var-inf) math-posp intv math-zerop math-intv-constp (intv 3 0 (var inf var-inf)) 3 (intv 3 (neg (var inf var-inf)) 0) (intv 3 (neg (var inf var-inf)) (var inf var-inf)) (var nan var-nan) math-mul-zero] 98))

(defun calcFunc-mod (a b) (byte-code "	E!" [a b math-normalize %] 4))

(defun math-mod-fancy (a b) (byte-code "\"@ 	! 	! 	= 	!! = 	!=9 	8!5 ˂6 	= 	E 	!=X :?R @>X !d 	8\" 	!=v 	\"v ! 	\" 	:? 	@> \" 	\"	E" [b a t equal (var inf var-inf) math-posp math-zerop math-negp car-safe intv 2 (intv 3 0 (var inf var-inf)) % mod (bigpos bigneg frac float) math-make-mod 1 math-intv-constp math-mod-intv (bigpos bigneg frac float hms) calc-record-why anglep] 18))

(defun calcFunc-pow (a b) (byte-code "	E!" [a b math-normalize ^] 4))

(defun math-pow-of-zero (a b) (byte-code ":\" @>? @= 8= !% =: 	0 Ȃ7 
E\" !E 
!!P 
 !] 
\" !g ҂ @=u !u 	| Ղ ! 
E 
" [b calc-infinite-mode a (bigpos bigneg) float 1 0 math-zerop (var nan var-nan) math-reject-arg ^ "*Indeterminate form" math-floatp math-float math-posp math-negp math-div math-infinitep (var nan var-nan) intv math-intv-constp (intv 3 (neg (var inf var-inf)) (var inf var-inf)) math-objectp] 13))

(defun math-pow-zero (a b) (byte-code "!= 8\"` ! \"` !( ˂` @=H !H !?@ !?H \"?O Ђ` !X 
!_ ҂` Ƈ" [a t b car-safe mod math-make-mod 1 2 math-known-matrixp math-mimic-ident math-infinitep (var nan var-nan) intv math-intv-constp math-posp math-negp (intv 3 (neg (var inf var-inf)) (var inf var-inf)) math-floatp (float 1 0)] 12))

(defun math-pow-fancy (a b) (byte-code ":?
 @> 	:? 	@> 	!>J 	!/ !0 !
:?< 
@>F 
	\"\")s 	@=s 	8!s 	8Xs 	8\"r 	8\") = \" 	! 	\"  	E \\	!!\"!!)!:? @>? 	:? 	@>? \"? 	E!= 	! 8! 8!8	\"8	\"\"!='	!'8!;8	\"8	\"\"!=R8!R8\"?i8	\"8\"	\"\"!=|	!|8!88	\"\"!=	!8!8	\"\"!=8!	!>8!88	\"\"!!	!	!!	\"	!!	\"!!=&8!&	!28	\"!\"C@=[ׁ@ 	\"8	\"\"A 	!gB 	!	!{C ~D 	!E =F 	!G H 	!j	B 	!\"	!\"fA 	!?I fJ !	\"K fL 	\"@ U!M D fL \"@ U	fL @ \"@ U%N f@E =3F !bL @ \"@ U\\O 8\"VP YQ _R f	E)!S =~GU~	!S 8	\"D:?@T >U V 	\"U V \"	E)!W =	!W =UX !X 	! \\8!!
	8
\"!!Y Z 8	88\"\"	8
\"\"\"\"*)!R8	8\"Y Z 8	88\"\"	8[ 8!\"\"\"\")!W =k	:?k	@\\ >X !\\8] 	\"\"Y 8\"8	\"\"\"))!Y 8	\"8^ 	@ \"\"8	\"\"\"	!W =:?@_ >\\!!
` 	8
\"!Y 	8
\"\"\"*)!!E =F !	:?,	@a >	:=	@b =B	D Y8:8@b =8@c =?8@d >88:88@b =88D VA 8!8D Ve 8!	:	@b =	@c =?	@f >	8:	8@b =	8D VA 	!	D V	:?	@g >O 8:tO 8@c =qO 8@b =?qO 8@h >h߁O 88:Z߁O 88@c =e߁O 88D WqB O 8!}O 8D We O 8!	:	@b =	@c =?	@i >	8:	8@b =	8D VA 	!	D V	:?	@j >)k 	!!e O 8!@ l 88	\"ׁO 8	\"#)	!E =F 	!:?G@m >:@b =@c =?@n >8:}8@b =8D VA !D Vl 	8	8\"O 	8\"#!E =a	F !a		!E =a	F 	!a	8:(8@c =%8@b =?%8@o >88:88@c =88D W%B 8!/8D W?	8:	8@c =	8@b =?	8@p >~	88:r	88@c ={	88D WB 	8!	8D W?a	8:8@b =8@c =?8@q >88:88@b =88D VA 8!8D Va	O 	8:W	O 	8@b =T	O 	8@c =?T	O 	8@r >K	߁O 	88:=	߁O 	88@b =H	߁O 	88D VT	A O 	8!`	O 	8D V?W
	8\"O 	8\"!E =	E 	8s >	O 	D F!E =	E 	8t >	O 	D Fu 8	8v >	8!	8w >O 8	8x >
O 8!
8y >8	8z >#
8!.
8{ >O 8	8| >F
O 8!Q
8} >&*!~ =s
	!~ =s
8	8\"
  8	88#8\"!~ =
	:?
	@ >
  8	8#8\"	!~ =
:?
@ >
  	8	8#	8\":?
@ >?  \" 	 \"" [a b sqrt root calc-symbolic-mode calc-internal-prec temp math-simplify-only t scale ln pow calc-infinite-mode lo hi (bigpos bigneg frac float cplx polar) (bigpos bigneg frac float cplx polar) math-quarter-integer (1 2 3) math-sqrt math-floatp math-float (bigpos bigneg frac float cplx polar) math-pow math-mul 2 frac integerp 10 math-nth-root math-ipow 1 equal (float 1 1) math-num-integerp calcFunc-scf (float 1 0) ^ math-normalize math-exp-raw math-ln-raw (bigpos bigneg frac float cplx polar hms date sdev intv mod vec) (bigpos bigneg frac float cplx polar hms date sdev intv mod) nil car-safe * math-known-num-integerp math-known-nonnegp / math-div math-equal-int calcFunc-sqrt math-known-evenp (1 2 3) math-known-realp math-abs math-looks-negp math-known-integerp math-neg math-known-oddp calcFunc-abs math-infinitep (var nan var-nan) neg -1 math-posp math-negp (float 0 0) 0 intv math-intv-constp (intv 3 0 (var inf var-inf)) (var nan var-nan) (var nan var-nan) calcFunc-abssqr (var nan var-nan) math-compare (float 0 0) (var uinf var-uinf) 3 (intv 3 0 1) (intv 3 0 (var inf var-inf)) (intv 3 (neg (var inf var-inf)) (var inf var-inf)) calcFunc-idn (bigpos bigneg frac float cplx polar hms date sdev intv mod) calc-record-why objectp sdev math-constp math-make-sdev math-hypot calcFunc-ln (bigpos bigneg frac float cplx polar) math-sub math-add (bigpos bigneg frac float cplx polar) calcFunc-exp (bigpos bigneg frac float) bigpos bigneg (frac float) math-zerop (frac float) (bigpos bigneg) (frac float) (frac float) (bigpos bigneg) math-evenp math-sort-intv (bigpos bigneg frac float) (frac float) (frac float) (frac float) (frac float) (frac float) (2 3) (1 3) math-combine-intervals (2 3) (2 3) (2 3) (1 3) (1 3) (2 3) (1 3) (1 3) mod math-make-mod math-pow-mod (bigpos bigneg frac float hms) (bigpos bigneg frac float hms) (bigpos bigneg frac float cplx polar) math-reject-arg numberp] 199))

(defun math-quarter-integer (x) (byte-code ":?
 @>  !) !!& Z @=\\ 8=< ȂY 8=Y 8:V 8W \" @= 8Yo  8U 8: 8 \"U Ȃ 8U 8: 8 \"U ɂ U Ӈ" [x (bigpos bigneg) 0 math-negp math-quarter-integer math-neg 4 frac 2 1 % float -1 10 5 -2 100 25 75 3] 8))

(defun math-pow-mod (a b m) (byte-code ":?
 @>$ 	:? 	@>$ 
:?$ 
@> 	:` 	@=] 	@=?] 	@>Z 	8:R 	8@=W 	8W] 	!c 	W 	: 	@=} 	AB 	AB 	[
#
# 
= ʂ 	
# 	\"
\"" [a b m (bigpos bigneg) (bigpos bigneg) (bigpos bigneg) bigneg bigpos (frac float) 1 0 math-negp math-div-mod math-pow-mod math-pow-mod-step math-mod math-pow] 8))

(defun math-pow-mod-step (a n m) (byte-code "=
 	\"= ˂B = 	B 		\"\"!#!9 A 	\"\")=M 
\"
)" [calc-display-working-message a val n t rest m lots math-do-working "pow" 0 1 math-pow-mod-step math-imod math-mul math-div2 math-evenp math-mod] 11))

(defun math-min (a b) (byte-code ":	 @= 	: 	@= 88>88>	8
\"UK 	8	8>] U] [ 	8>	8\"Uz 	8	8> U  	8> Ȃ  ɂ \\
#- 		F\" 	: 	@= F	\" 	\"U 	 U ׂ )" [a b lo lom hi him res intv 2 1 (2 3) 3 (1 3) nil math-compare -1 (2 3) 0 (2 3) (1 3) (1 3) math-make-intv math-min (var nan var-nan)] 9))

(defun calcFunc-min (&optional a &rest b) (byte-code "?	 : :? @>- @=- @=' !- !?5 \"	\"" [a b (var inf var-inf) (bigpos bigneg frac float hms) date intv math-intv-constp math-infinitep math-reject-arg anglep math-min-list] 6))

(defun math-min-list (a b) (byte-code "D @:? @@>- @=- @@=& @!- @!< 	@\"A\"A @\"E 	" [b a (bigpos bigneg frac float hms) date intv math-intv-constp math-infinitep math-min-list math-min math-reject-arg anglep] 7))

(defun math-max (a b) (byte-code ":	 @= 	: 	@=% !	!\"!@ 	\"
U4 	? 
U> ɂ? )" [a b res intv math-neg math-min math-compare -1 2 (var nan var-nan)] 7))

(defun calcFunc-max (&optional a &rest b) (byte-code "?	 : :? @>- @=- @=' !- !?5 \"	\"" [a b (neg (var inf var-inf)) (bigpos bigneg frac float hms) date intv math-intv-constp math-infinitep math-reject-arg anglep math-max-list] 6))

(defun math-max-list (a b) (byte-code "D @:? @@>- @=- @@=& @!- @!< 	@\"A\"A @\"E 	" [b a (bigpos bigneg frac float hms) date intv math-intv-constp math-infinitep math-max-list math-max math-reject-arg anglep] 7))

(defun math-abs (a) (byte-code ":9 @=6 @=?6 @>3 8:+ 8@=0 8W6 !< WE !:?O @>V @=h 88\"@=u 8@= AAA !! AA 88\" A 8! @= 8!8E@= !i:@=@=?@>8: 8@= 8V!
Vf8!	8\"
U88>1Ђ2	#e
UR8=KЂL	#e8>_Ђ`8#*!w!D!>>!)!\")\"D" [a nlo res t signs inf bigneg bigpos (frac float) 1 0 math-negp math-neg (bigpos bigneg frac float hms) cplx math-hypot 2 polar vec math-sqrt calcFunc-abssqr math-abs sdev intv math-intv-constp (frac float) math-posp math-compare 3 math-make-intv (0 1) (0 2) math-looks-negp calcFunc-abs math-possible-signs (2 4 6) (1 3) math-infinitep equal (var nan var-nan) (var inf var-inf) calc-record-why numvecp] 24))

(fset (quote calcFunc-abs) (symbol-function (quote math-abs)))

(defun math-float-fancy (a) (byte-code "@= @8\"\"BB @>$ 8!7 @8!8DE @=N 8@=N 88!i 88!888EDE !s  @=~  @\"	 	AAB) \"" [a func t intv 1 mapcar math-float nthcdr 2 (* /) math-numberp calcFunc-float / * math-infinitep assq ((calcFunc-floor . calcFunc-ffloor) (calcFunc-ceil . calcFunc-fceil) (calcFunc-trunc . calcFunc-ftrunc) (calcFunc-round . calcFunc-fround) (calcFunc-rounde . calcFunc-frounde) (calcFunc-roundu . calcFunc-froundu)) math-reject-arg objectp] 13))

(fset (quote calcFunc-float) (symbol-function (quote math-float)))

(defun math-trunc-fancy (a) (byte-code "@= 88\"@=! 8!@=0 !!@=A 8F@=R 8!D@=} 8!p 88!\"!z 8!8\"@=8\" 8> ˂ 8\" 8> ˂ \\8: 8@= 8@=? 8@> 88: 88@= 88W 8! 8W,8:?$8@>$8@=$88Y,8>:8!\"?8!8:8@=8@=?8@>88:v88@=}88V8!8V8:?8@>8@=88Y8>8!\"8!#!:@=\"!!!!\"" [a t frac math-quotient 1 2 cplx math-trunc polar math-complex hms 0 date mod math-messy-integerp math-make-mod intv math-make-intv equal (neg (var inf var-inf)) (0 1) 3 (var inf var-inf) (0 2) bigneg bigpos (frac float) math-negp (bigpos bigneg) float (0 1) math-add (frac float) math-posp (bigpos bigneg) (0 2) -1 math-provably-integerp vec math-map-vec (lambda (x) (byte-code "	\"" [x prec math-trunc] 3)) math-infinitep (var nan var-nan) math-to-integer math-reject-arg numberp] 31))

(defun math-trunc-special (a prec) (byte-code ": @= 8Y !!$ \"X. 	!5 	B 	\")![\"" [prec a calc-prefer-frac t float 2 0 math-trunc integerp math-reject-arg fixnump math-provably-integerp calcFunc-scf] 9))

(defun math-to-integer (a) (byte-code "	!\" 	GU A	AB)" [func a assq car-safe ((calcFunc-ffloor . calcFunc-floor) (calcFunc-fceil . calcFunc-ceil) (calcFunc-ftrunc . calcFunc-trunc) (calcFunc-fround . calcFunc-round) (calcFunc-frounde . calcFunc-rounde) (calcFunc-froundu . calcFunc-roundu)) 2] 4))

(defun calcFunc-ftrunc (a &optional prec) (byte-code ": @= 8Y\" 	?\" 	!\" 	X) / 	\"!" [a prec float 2 0 integerp math-float math-trunc] 5))

(defun math-floor-fancy (a) (byte-code "!
  @=6 !$ 8!$ 8!- !3 !\" @=G 8!D @= 8\"] 8>d ӂe 8\"s 8>z ӂ{ \\8!8:? 8@> 8@= 88Y 8> 8!\" 8!# : @= \" ! ! !  ނ ! \"" [a t math-provably-integerp hms math-posp math-zerop 2 3 math-trunc math-add -1 date math-floor 1 intv math-make-intv equal (neg (var inf var-inf)) (0 1) 0 (var inf var-inf) (0 2) (bigpos bigneg) float (0 2) vec math-map-vec (lambda (x) (byte-code "	\"" [x prec math-floor] 3)) math-infinitep math-negp (var nan var-nan) math-to-integer math-reject-arg anglep] 23))

(defun math-floor-special (a prec) (byte-code ": @= 8Y !!$ \"X. 	!5 	B 	\")![\"" [prec a calc-prefer-frac t float 2 0 math-trunc integerp math-reject-arg fixnump math-provably-integerp calcFunc-scf math-floor] 9))

(defun calcFunc-ffloor (a &optional prec) (byte-code ": @= 8Y\" 	?\" 	!\" 	X) / 	\"!" [a prec float 2 0 integerp math-float math-floor] 5))

(defun math-ceiling (a &optional prec) (byte-code "I : @= 8Y !!( \"X2 	!9 	F 	\")![\"	:?S 	@>Z 		:k 	@=k 	8Yt 	!	:?~ 	@> 	: 	@= 	@=? 	@> 	8: 	8@= 	8V 	! 	V 	!\" 	!	! 		@=	! 	8! 	8! 	!	!\"	@=	8!D	@=	8\",	8>3Ƃ4	8\"B	8>IƂJ\\	8:?l	8@>l	8@=l	88Yt	8>	8!\"	8!	8!#	:	@=	\"	!	!	!		!	\"" [prec a calc-prefer-frac t float 2 0 math-trunc integerp math-reject-arg fixnump math-provably-integerp calcFunc-scf math-ceiling (bigpos bigneg) (bigpos bigneg frac float) bigpos bigneg (frac float) 1 math-posp math-add hms math-negp math-zerop 3 date intv math-make-intv equal (neg (var inf var-inf)) (0 1) (var inf var-inf) (0 2) (bigpos bigneg) (0 1) math-floor vec math-map-vec (lambda (x) (byte-code "	\"" [x prec math-ceiling] 3)) math-infinitep (var nan var-nan) math-to-integer anglep] 35))

(fset (quote calcFunc-ceil) (symbol-function (quote math-ceiling)))

(defun calcFunc-fceil (a &optional prec) (byte-code ": @= 8Y\" 	?\" 	!\" 	X) / 	\"!" [a prec float 2 0 integerp math-float math-ceiling] 5))

(setq math-rounding-mode nil)

(defun math-round (a &optional prec) (byte-code "I : @= 8Y !!( \"X2 	!9 	F 	\")![\"	:?S 	@>\"	:?o 	@>o 	@=o 	8Yx 	!	: 	@= 	@=? 	@> 	8: 	8@= 	8W 	! 	W =? 	!!!		:? 	@> ܂ \")	:? 	@> 	@= 	8Y=	!	!	\"		!	!,		@==	8!D	@=M	\"!	:V	@=`	\"	!z	!o	!v	w낄	!	\"" [prec a calc-prefer-frac t math-rounding-mode calc-angle-mode float 2 0 math-trunc integerp math-reject-arg fixnump math-provably-integerp calcFunc-scf math-round (bigpos bigneg frac float hms) (bigpos bigneg) bigneg bigpos (frac float) 1 math-negp up math-neg deg math-add (bigpos bigneg frac) (frac 1 2) (float 5 -1) (bigpos bigneg) even math-floor math-evenp math-sub date intv (frac 1 2) vec math-map-vec (lambda (x) (byte-code "	\"" [x prec math-round] 3)) math-infinitep math-posp (var nan var-nan) math-to-integer anglep] 29))

(fset (quote calcFunc-round) (symbol-function (quote math-round)))

(defun calcFunc-rounde (a &optional prec) (byte-code "	
\")" [math-rounding-mode a prec even math-round] 3))

(defun calcFunc-roundu (a &optional prec) (byte-code "	
\")" [math-rounding-mode a prec up math-round] 3))

(defun calcFunc-fround (a &optional prec) (byte-code ": @= 8Y\" 	?\" 	!\" 	X) / 	\"!" [a prec float 2 0 integerp math-float math-round] 5))

(defun calcFunc-frounde (a &optional prec) (byte-code "	
\")" [math-rounding-mode a prec even calcFunc-fround] 3))

(defun calcFunc-froundu (a &optional prec) (byte-code "	
\")" [math-rounding-mode a prec up calcFunc-fround] 3))

(defun calcFunc-mant (x) (byte-code ":?
 @>5 :? @> 8=& 2 88!ZE= \"D" [x (bigpos bigneg frac float) (bigpos bigneg frac) 1 0 float math-numdigs calc-record-why realp calcFunc-mant] 6))

(defun calcFunc-xpon (x) (byte-code ":?
 @>5 :? @> 8=& Ă2 88!S\\!= \"D" [x (bigpos bigneg frac float) (bigpos bigneg frac) 1 0 math-normalize 2 math-numdigs calc-record-why realp calcFunc-xpon] 5))

(defun calcFunc-scf (x n) (byte-code "! = 	 	:? 	@>5 V* 	\"2 	[\"\" 	@=_ VP 	8\"	8\"\\ 	8	8[\"\" 	@=s 	8	8\\\" 	@> 	@	8\"	8\"E! 	@> 	@	8\"	8E! 	@= 	@	8	8\"	8\"F! 	@= 	\" 	! 	 	\"	E!8W 	!\"!!!\"	E" [n x t integerp 0 (bigpos bigneg) math-scale-int math-div 1 frac math-make-frac 2 float math-make-float (cplx sdev) math-normalize calcFunc-scf (polar mod) intv 3 vec math-map-vec (lambda (x) (byte-code "	\"" [x n calcFunc-scf] 3)) math-infinitep calc-record-why realp math-messy-integerp 10 math-trunc math-overflow math-integerp] 30))

(defun calcFunc-incr (x &optional step relative-to) (byte-code " ŉ:? @>? \" 	:?' 	@>1 	\" 	@=f 	!C 
!=R 
Z\"\"c 		8	8!Z\\\"\" 	@= 	8:?{ 	8@> 	\" 	F\" 	\"" [step x relative-to calc-internal-prec t 1 (bigpos bigneg) math-reject-arg integerp (bigpos bigneg) math-add float math-zerop car-safe math-mul calcFunc-scf math-add-float math-make-float 2 math-numdigs date (bigpos bigneg) hms 0 realp] 16))

(defun calcFunc-decr (x &optional step relative-to) (byte-code "	 !
#" [x step relative-to calcFunc-incr math-neg 1] 5))

(defun calcFunc-percent (x) (byte-code "! \") D" [x calc-prefer-frac nil math-objectp math-div 100 calcFunc-percent] 4))

(defun calcFunc-relch (x y) (byte-code "!	 	! 	\"\" 	E" [x y math-objectp math-div math-sub calcFunc-relch] 7))

(defun calcFunc-abssqr (a) (byte-code ":?
 @> \" @=* 8!8!\" @=9 8! @>C !N !! @=_ \"\" !l \" !	} 	\"!	\") \"D" [a inf t (bigpos bigneg frac float) math-mul cplx math-add math-sqr 1 2 polar (sdev intv) math-constp math-abs vec math-reduce-vec math-map-vec calcFunc-abssqr math-known-realp math-pow math-infinitep math-infinite-dir calc-record-why numvecp] 19))

(defun math-sqr (a) (byte-code "\"" [a math-mul] 3))

(defun calcFunc-idiv (a b) (byte-code ": @= Y( 	: 	@=! 	Y( 	=?2 	\" :?< @>_ 	:?I 	@>X 	\"!)\\ 	\" != 	!={ 	\"!) 	\" != :? @> 	!= 	:? 	@> 	\"! ! 	! 	\" \"" [a b calc-prefer-frac t bigpos 0 math-quotient (bigpos bigneg frac float) (bigpos bigneg frac float) math-floor math-div math-reject-arg realp car-safe hms hmsp intv (bigpos bigneg frac float) (bigpos bigneg frac float) math-infinitep anglep] 19))

(defun math-combine-sum (a b nega negb scalar-okay) (byte-code " 	:? 	@> 
:? 
@>' 	
$Y	: 	@=F 	8:?F 	8@>U 	8	8 	@=j 	8:?j 	8@> 	8:?{ 	8@> 	8E 	8\"	8 	@= 	8
: 
@= 
8:? 
8@> 
8
8 
@= 
8:? 
8@>
8:? 
8@>
8E
8\"
8 
@= 
8/	
\"U3	
\"X?!K!\"	\"*" [scalar-okay a b nega negb amult bmult math-simplifying (bigpos bigneg frac float cplx polar hms date sdev intv mod vec) (bigpos bigneg frac float cplx polar hms date sdev intv mod vec) math-add-or-sub 1 * (bigpos bigneg frac float cplx polar hms date sdev intv mod) 2 / (bigpos bigneg frac float cplx polar hms date sdev intv mod) (bigpos bigneg) frac math-div neg -1 (bigpos bigneg frac float cplx polar hms date sdev intv mod) (bigpos bigneg frac float cplx polar hms date sdev intv mod) (bigpos bigneg) math-compare 0 equal math-neg math-add math-mul] 11))

(defun math-add-or-sub (a b aneg bneg) (byte-code "	 	!
 !	: 	@=) :) @=5 	E!9 	\"" [aneg a bneg b math-neg vec math-normalize + math-add] 6))

(defun math-combine-prod (a b inva invb scalar-okay) (byte-code ") 	:& 	@>?# 	@=  	8=# 	!) 	=U 
U :R @>?O @=L 8=O !U =\\ Ă+w 	:?j 	@>w :?w @> 	
$	:? 	@> 	+	!=  	8! 	8	8!\"\"+!= 
 8! 	88!\"\"+	:I	@=		8:?	8@>	8	8I	@=#	8I	@==	=	8:?=	8@>I	8
	:o	@=o	8	8\"Uo	\"!:@=	8:?8@>88@=8@=	8:?8@>8
:@=88\"U\"!	!
!	\"	\"&	\"\"	:?;	@>?z:f@>?c@=_8=c!j=z!=!==!	:?	@>	:	@=	@=?	@>	8:	8@=	8V	!	V	\"!\"	D\"	D\"	
=	=D)*	!!=	8@=IԂX@ 	8!H\"88@=hԂw@ 8!H\"8\"U	)\"\"\"\"\"**\"*	:	@=	Y*:@=Y*A \"	\"D*B \"	\"D\"*	\"C D *" [inva a invb b nil scalar-okay t apow bpow math-simplifying math-combine-prod-e sumpow math-simplifying-units math-combining-units ua ub math-unit-prefixes temp (bigpos bigneg) float 1 0 math-zerop (bigpos bigneg) (bigpos bigneg frac float cplx polar hms date sdev intv mod vec) (bigpos bigneg frac float cplx polar hms date sdev intv mod vec) math-mul-or-div (bigpos bigneg frac float cplx polar hms date sdev intv mod vec) car-safe ^ math-looks-negp 2 math-mul math-pow math-neg (bigpos bigneg frac float cplx polar) calcFunc-sqrt (frac 1 2) calcFunc-exp (bigpos bigneg frac float cplx polar) frac math-compare -1 math-div (bigpos bigneg frac float cplx polar) (frac 1 2) (bigpos bigneg frac float cplx polar) math-commutative-equal equal math-add (bigpos bigneg) (bigpos bigneg) (bigpos bigneg frac) bigpos bigneg (frac float) math-posp (frac 1 2) (frac -1 2) err (byte-code "	\"" [a sumpow math-pow] 3) ((inexact-result (byte-code "	E" [a sumpow ^] 3))) math-check-unit-name assq symbol-name (frac 1 2) (frac -1 2) (byte-code "	\"" [a apow math-pow] 3) ((inexact-result (byte-code "	E" [a apow ^] 3)))] 56))

(setq math-combine-prod-e (quote (var e var-e)))

(defun math-mul-or-div (a b ainv binv) (byte-code ":	 @= 	: 	@=E 
2 + \"	E/ 	EA = 	EA 	E!m 
^ W \"	\"[ 	\"m i 	\"m 	\"" [a b ainv binv vec math-normalize / math-div 1 * math-mul] 9))

(defun math-commutative-equal (a b) (byte-code "!>f 	!>c 	\"
É\"G
GUb N 
A @@\"?L A6 _ @
\"A. ?+j 	\"" [a b bterms nil aterms p car-safe (+ -) (+ -) math-commutative-collect equal delq] 9))

(defun math-commutative-collect (b neg) (byte-code "!= 8	\"8	\"@ !=1 8	\"8	?\"@ 	; !< 
B" [b neg bterms car-safe + math-commutative-collect 1 2 - math-neg] 9))
