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


(byte-code "!!" [require calc-ext calc-macs] 2)
(defalias 'calc-Need-calc-forms #[nil "" [nil] 1])
(defalias 'calc-time #[nil "!" [calc-do #[nil " 	O!	O!	O!FÉFE#)" [current-time-string time calc-enter-result 0 "time" mod hms string-to-int 11 13 14 16 17 19 24] 11]] 2 nil nil])
(defalias 'calc-to-hms #[(arg) "!" [calc-do #[nil "  	= ###" [calc-is-inverse calc-angle-mode rad calc-unary-op ">rad" calcFunc-rad arg ">deg" calcFunc-deg ">hms" calcFunc-hms] 4]] 2 nil "P"])
(defalias 'calc-from-hms #[(arg) " \n!" [calc-invert-func calc-to-hms arg] 2 nil "P"])
(defalias 'calc-hms-notation #[(fmt) "!" [calc-do #[nil "\n\"* \n\"\n\"\n\"\n\"\n\"#\f\"!" [string-match "\\`\\([^,; ]+\\)\\([,; ]*\\)\\([^,; ]\\)\\([,; ]*\\)\\([^,; ]\\)\\'" fmt calc-change-mode calc-hms-format "%s" math-match-substring 1 2 3 4 5 t set-default error "Bad hours-minutes-seconds format."] 12]] 2 nil "sHours-minutes-seconds format (hms, @ ' \", etc.): "])
(defalias 'calc-date-notation #[(fmt arg) "!" [calc-do #[nil " \" !8\"! !\nK \n!\nYK \nXK !K \n\" \" \"!Q\" ̉O̔̕O̕O)ω\" I)\"V OBTHU  ! HU!B\"%TGWEHSHUET'O!>l=ffl\">yBBO BB#." [fmt "" "1" string-match "\\` *[0-9] *\\'" string-to-int calc-standard-date-formats "[a-zA-Z]" error "Bad date format specifier" arg prefix-numeric-value 0 9 copy-sequence nil case-fold-search "<.*>" "\\`[^hHspP]*\\([^ac-gi-lnoqrt-zAC-GI-OQRT-Z]*[bBhHmpPsS]+[^ac-gi-lnoqrt-zAC-GI-OQRT-Z]*\\)[^hHspP]*\\'" "[^ac-gi-lnoqrt-zAC-GI-OQRT-Z]*" regexp-quote math-match-substring 1 "<" ">" temp sym pos2 pos time fullfmt lfmt ":[BS]S" 67 "[<>a-zA-Z]" 60 "Nested <'s not allowed" t 62 "Misplaced > in format" "\\`[^a-zA-Z]*[bB][a-zA-Z]" intern (Y YY BY YYY YYYY aa AA aaa AAA aaaa AAAA bb BB bbb BBB bbbb BBBB M MM BM mmm Mmm Mmmm MMM MMMM D DD BD d ddd bdd W www Www Wwww WWW WWWW h hh bh H HH BH p P pp PP pppp PPPP m mm bm s ss bss SS BS C N n J j U b) X "Bad format code: %s" (bb BB bbb BBB bbbb BBBB) b calc-change-mode calc-date-format] 8]] 2 nil "sDate format (e.g., M/D/YY h:mm:ss): \nP"])
(defalias 'calc-hms-mode #[nil "!" [calc-do #[nil "\"!" [calc-change-mode calc-angle-mode hms message "Angles measured in degrees-minutes-seconds."] 3]] 2 nil nil])
(defalias 'calc-now #[(arg) "#" [calc-date-zero-args "now" calcFunc-now arg] 4 nil "P"])
(defalias 'calc-date-part #[(arg) "W\f V !!" [arg 1 9 error "Part code out of range" calc-do #[nil "\n8\n8!D#" [calc-enter-result 1 arg (nil "year" "mnth" "day" "hour" "minu" "sec" "wday" "yday" "hmst") (nil calcFunc-year calcFunc-month calcFunc-day calcFunc-hour calcFunc-minute calcFunc-second calcFunc-weekday calcFunc-yearday calcFunc-time) calc-top-n] 6]] 2 nil "NPart code (1-9 = Y,M,D,H,M,S,Wd,Yd,Hms): "])
(defalias 'calc-date #[(arg) "W\f V !!" [arg 1 6 error "Between one and six arguments are allowed" calc-do #[nil "		!B#" [calc-enter-result arg "date" calcFunc-date calc-top-list-n] 6]] 2 nil "p"])
(defalias 'calc-julian #[(arg) "#" [calc-date-one-arg "juln" calcFunc-julian arg] 4 nil "P"])
(defalias 'calc-unix-time #[(arg) "#" [calc-date-one-arg "unix" calcFunc-unixtime arg] 4 nil "P"])
(defalias 'calc-time-zone #[(arg) "#" [calc-date-zero-args "zone" calcFunc-tzone arg] 4 nil "P"])
(defalias 'calc-convert-time-zones #[(old &optional new) "!" [calc-do #[nil " !B#ǚ 	% Q!	;. !=< A@\"	ǚF 		;R 	!		=b 	A@\"!	F#" [old "$" calc-enter-result 3 "tzcv" calcFunc-tzconv calc-top-list-n "" "local" new read-string "From time zone: " ", to zone: " math-read-expr error "Error in expression: " 1 calc-top-n] 7]] 2 nil "sFrom time zone: "])
(defalias 'calc-new-week #[(arg) "#" [calc-date-one-arg "nwwk" calcFunc-newweek arg] 4 nil "P"])
(defalias 'calc-new-month #[(arg) "#" [calc-date-one-arg "nwmn" calcFunc-newmonth arg] 4 nil "P"])
(defalias 'calc-new-year #[(arg) "#" [calc-date-one-arg "nwyr" calcFunc-newyear arg] 4 nil "P"])
(defalias 'calc-inc-month #[(arg) "#" [calc-date-one-arg "incm" calcFunc-incmonth arg] 4 nil "p"])
(defalias 'calc-business-days-plus #[(arg) "!" [calc-do #[nil "#" [calc-binary-op "bus+" calcFunc-badd arg] 4]] 2 nil "P"])
(defalias 'calc-business-days-minus #[(arg) "!" [calc-do #[nil "#" [calc-binary-op "bus-" calcFunc-bsub arg] 4]] 2 nil "P"])
(defalias 'calc-date-zero-args #[(prefix func arg) "!" [calc-do #[nil ": \f!D# \f!D  \fC#" [arg calc-enter-result 1 prefix func calc-top-n 0 prefix-numeric-value] 6]] 2])
(defalias 'calc-date-one-arg #[(prefix func arg) "!" [calc-do #[nil ": \f!B#! \f!!E& \f!D#" [arg calc-enter-result 2 prefix func calc-top-list-n 1 calc-top-n prefix-numeric-value] 7]] 2])
(defalias 'math-normalize-hms #[(a) "	A@!	8!Z]	8!)! !8 \"\"!M \"\"\"Ue \"\"\"U \"\" ! \"\"! \"\"\"U \"\"\"U \"\"= A@!8\\ZX F+" [math-normalize a 2 calc-internal-prec 4 3 s m h math-negp math-posp math-add -60 1 math-compare -1 60 float math-numdigs 0 hms] 5])
(defalias 'math-to-hms #[(a &optional ang) "=	 = A@!8!\":- @>- D!= !\n\"!\nD =R  \"\">[ \"\"!\"@A\"\"F+!" [a hms sdev math-make-sdev math-to-hms 2 (bigpos bigneg frac float cplx polar) calcFunc-hms math-negp math-neg ang calc-angle-mode rad math-div math-pi-over-180 deg (cplx polar) math-normalize math-mul 3600 b math-trunc 60 hm math-idivmod hmd math-sub] 9])
(defalias 'calcFunc-hms #[(h &optional m s) ": @> \"\f \f:( \f@>( \f\"0 :D @>D \"\f\"Uv \f\"Uv \"Uv \"Uv !\fF\"\f \" \"\"\"\"" [h (bigpos bigneg frac float) math-reject-arg realp m 0 s math-compare -1 60 math-add math-to-hms hms math-div 3600 deg] 8])
(defalias 'math-from-hms #[(a &optional ang) "=A : @> =- A@\"8\"\"4 == DD!Q !\"!X =f \" \"8\"8\"\"A@\"" [a hms (bigpos bigneg frac float cplx polar) sdev math-make-sdev math-from-hms ang 2 calc-angle-mode rad calcFunc-rad calcFunc-deg math-negp math-neg math-mul deg math-pi-over-180 math-add math-div 3 (float 6 1) 60] 6])
(defalias 'math-date-to-dt #[(value) "= A@! \"!@A@			\"U: т; \"!F ԂG \"	ȉ#\"Uh \"M =r 	\"T= 	Y 	\\! ނ 		HY 	T	 		SHZT! 	E 	8\"." [value date math-realp math-reject-arg datep math-date-parts parts time 1 month nil day math-quotient math-add math-compare 711859 -1 365 -108 math-negp 366 year temp math-absolute-from-date 0 math-sub 1752 247 11 math-leap-year-p [1 32 61 92 122 153 183 214 245 275 306 336 999] [1 32 60 91 121 152 182 213 244 274 305 335 999] math-integerp 3600 60 2] 10])
(defalias 'math-dt-to-date #[(dt) "	8 	A@\"	A@W 	A@V% 	A@\"	83 	8\"	8WC 	8VJ 	8\"	@	A@	8#\n	8x \n!	8_	8_\\	8\"\"\"z \n)" [1 dt math-reject-arg fixnump 12 "Month value is out of range" 2 31 "Day value is out of range" math-absolute-from-date date 3 math-add math-float math-div 3600 4 60 5 (float 864 2)] 7])
(defalias 'math-date-parts #[(value &optional offset) "	!	 \n\"\"V Z\"\n\n!\n\n\"E+" [math-floor value date math-round math-mul math-sub offset 86400 calc-internal-prec 12 time ftime] 5])
(defalias 'math-this-year #[nil " O!" [string-to-int current-time-string -4 nil] 4])
(defalias 'math-leap-year-p #[(year) "	\"U 	! 	!\"U	\"U	\"ǦU5 	˦U?8 	U" [math-compare year 1752 -1 math-negp math-imod math-neg 4 1 0 400 100] 4])
(defalias 'math-days-in-month #[(year month) "U ! ćSH" [month 2 math-leap-year-p year 29 [31 28 31 30 31 30 31 31 30 31 30 31]] 2])
(defalias 'math-day-number #[(year month day) "	S_\\	V! 	_\\ǥZ	!! T	=> 	V: 	U> Y> Z)" [day month 31 day-of-year 2 4 23 10 math-leap-year-p year 1752 9 14 11] 3])
(defalias 'math-absolute-from-date #[(year month day) "= \"	#\"!( \"2 \"\"\"\"\"\"UJ =N XN Ăq \"\"\"AUk l @\"*\")" [year 0 -1 math-sub 1 yearm1 math-add math-day-number month day math-mul 365 math-posp math-quotient 4 3 math-compare 1753 1752 9 100 correction math-idivmod res] 11])
(byte-code "! B! B!! B!. B" [boundp math-long-weekday-names ("Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday") current-load-list math-short-weekday-names ("Sun" "Mon" "Tue" "Wed" "Thu" "Fri" "Sat") math-long-month-names ("January" "February" "March" "April" "May" "June" "July" "August" "September" "October" "November" "December") math-short-month-names ("Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oct" "Nov" "Dec")] 2)
(defalias 'math-format-date #[(date) "= A@	\nE\"A^ 	\f\n\"\"BBZ ơ.)" [date calc-internal-prec calc-date-format entry assoc math-format-date-cache nil dt calc-group-digits calc-leading-zeros 10 calc-number-radix year month day weekday hour minute second bc-flag apply concat mapcar math-format-date-part fmt] 5])
(byte-code "" [nil math-format-date-cache] 1)
(defalias 'math-format-date-part #[(x) "; < \n! Ç\"\"=$ Ç=. \n!=: \n!!=G \n\"!=V \n!\"!=e \n\"A@! \n!@A@8\n!\"\"8 8\"8$&> ! !*> V W =  =  \"! W \"!=!=,!'W'\"!=4Ç=B*?V=P*?V=^*?V=n*?V@ A =*?VB C =*?VD E =*VF G =*VH I =*VJ K =*VL M =*VN O =*VP Q =\"R =\"S =\"\"T =2SU8V =ASU8W =QSU8X =`SY8Z =pSY8[ =~\"\\ =\"] =\"^ =\"_ =`8a =`8b =`8c =d8e =d8f =g #\"h =i g #\"j =7k g #\"l =J V \"m =] V \"n =p V \"o = V p \\q T\"r = V p \\q T\"s = V p \\q T\"t = V q Wu v w =  V q Wx y z = V q W{ | } =< V q W8~   =Z V q WV   =x V q Wt   =\"V\"\" =\"V\"\" =\"V\"\" =$V $!?V  >V$V > $!?V$ > >\n$\" $ \" U? >- @ >; @Â@Á q Z ^D$!)P" [x math-integerp date "" apply concat mapcar math-format-date-part X N math-format-number n math-floor J math-add (float (bigpos 235 214 17) -1) j (bigpos 424 721 1) U math-date-parts 719164 dt math-date-to-dt year month 2 day math-mod 6 7 weekday 3 hour 4 minute 5 second b calc-date-format math-negp math-neg t bc-flag (Y YY BY) 1940 2040 format YY "%02d" BYY "%2d" "%d" 100 natnump "+%d" YYY YYYY aa "ad" AA "AD" aaa "ad " AAA "AD " aaaa "a.d." AAAA "A.D." bb "bc" BB "BC" bbb " bc" BBB " BC" bbbb "b.c." BBBB "B.C." M MM BM mmm math-short-month-names Mmm MMM Mmmm math-long-month-names MMMM D DD BD W www math-short-weekday-names Www WWW Wwww math-long-weekday-names WWWW d math-day-number ddd "%03d" bdd "%3d" h hh bh H 11 12 HH BH p "a" "p" P "A" "P" pp "am" "pm" PP "AM" "PM" pppp "a.m." "p.m." PPPP "A.M." "P.M." m mm bm C math-zerop ":" (s ss bs SS BS) (SS BS) (ss SS) (bs BS) math-compare 10 -1 (ss SS) "0" (bs BS) " " fix calc-internal-prec 0 calc-float-format] 7])
(defalias 'math-parse-date #[(str) "" [syntax (byte-code "	\"K	\"K	\"  	\"!DKÉ\n\f	\"X 	\"	\"	\"!	\"	\"	߉O	ߕOP  !  ! V\"H> U U = =\"U V\"UU=\\)	\"-	!ɔI	\"0!1!K2!U3!w!\nw\nUno!!	\"	\"\"\"	\"	߉O	ߕOP\n\n\"\n	\"	\"	\"	ɔO	ɕOP!\n	\n#$\f\"	\"!\f\f\fߕ\n-ɂ.7ɂ8\\BɂC\\MɂN\\XɂY\\\fcɂd\\\n@ Vw\"\nW\nUA \"\nUB  \fC VW\f\f\fC VW\f\f\f\f\f\fC V\fW\f\f\f\\/V/\f\f\\IVI\f\f\\\f\\\fV\\\f\frr%%%D\n\n@9\n@E >\f\n@F >\f\n@G >\f\nA\n\f\f%\f6H I !!J &." [math-parse-standard-date str t nil string-match "\\`[^-+/0-9a-zA-Z]*\\([-+]?[0-9]+\\.?[0-9]*\\([eE][-+]?[0-9]+\\)?\\)[^-+/0-9a-zA-Z]*\\'" date math-read-number math-match-substring 1 temp bigyear c b a bc-flag second minute hour weekday day month year case-fold-search "\\([0-9][0-9]?\\):\\([0-9][0-9]?\\)\\(:\\([0-9][0-9]?\\(\\.[0-9]+\\)?\\)\\)? *\\([ap]m?\\|[ap]\\. *m\\.\\|noon\\|n\\>\\|midnight\\|mid\\>\\|m\\>\\)?" "\\([0-9][0-9]?\\)\\(\\)\\(\\(\\(\\)\\)\\) *\\([ap]m?\\|[ap]\\. *m\\.\\|noon\\|n\\>\\|midnight\\|mid\\>\\|m\\>\\)" 6 ampm string-to-int 2 4 0 "" 23 throw syntax "Hour value out of range" (78 77) 12 77 "Time must be 12:00:00 in this context" 65 24 "[0-9a-zA-Z]\\(-\\)[0-9a-zA-Z]" copy-sequence 47 "[a-zA-Z]" math-parse-date-word math-long-month-names math-long-weekday-names math-short-month-names math-short-weekday-names ("noon" "midnight" "mid") ("ad" "a.d.") ("bc" "b.c.") "[a-zA-Z]+" format "Bad word in date: \"%s\"" "[-+]?0*[1-9][0-9][0-9][0-9][0-9]+" "[4-9][0-9]\\|[0-9][0-9][0-9]\\|[-+][0-9]+[^-]*\\'" "\\([-+][0-9]+\\)[^-]*\\'" "\\(0*[1-9][0-9][0-9]+\\)" "[0-9]+" "Too many numbers in date" 3 "Not enough numbers in date" math-this-year 31 calc-date-format (Y YY BY YYY YYYY) (M MM BM mmm Mmm Mmmm MMM MMMM) (D DD BD) math-neg math-abs math-parse-date-validate] 15)] 2])
(defalias 'math-parse-date-validate #[(year bigyear month day hour minute second) " \n! \nW \nW ł \\\n=) \"W7 V< \"WN \n\"VS \" Wf Vk \"Wy V~ \"! \"U \"\nE E\"!D" [bigyear natnump year 100 40 2000 1900 0 throw syntax "Year value is out of range" month 1 12 "Month value is out of range" day math-days-in-month "Day value is out of range" hour 23 "Hour value is out of range" minute 59 "Minute value is out of range" math-negp second math-compare 60 -1 "Seconds value is out of range" date math-dt-to-date append] 7])
(defalias 'math-parse-date-word #[(names &optional front) "\n% \n@Ě ł \n@!\"% \nA	T \nO 5 ɔUO ɉOD ʂE ɕOQ	)" [1 n names string-match "Sep" "Sept?" regexp-quote str front 0 "" " " nil] 5])
(defalias 'math-parse-standard-date #[(str with-time) "\n	\n\f88@AG \f\f@:Z @<v - - \f/; GGX2GO2GO/=- >#\"2\"ՕO!!> Ղ = !  \"8 88\f@A@\n8	/=t\"2\"ՕO!\"\"!888@A@\n8	/>/\"\n/>1\"\n/>3\"/>5\"/>\"UՂO/\"2U\\O/>V\"/UՂ!ՕO/\"2UBH\\ՕO/>@ >A >y؁B \"؁C \"\"2\"D =HE >ՕO!/F =- G >؁H \"2ՕO/I >؁J \"2ՕO/K >؁L \"2ՕO/M >[N >;؁O \"B؁P \"2\"ՕO\f!/Q =y؁R \"- O/S >T >U =؁V \"؁B \"؁W \"2X \"!ՕOY =Y2Z W/[ >/\\ > \n/] >	/^ >\"/_ >2- - S\nM	MS\n	` \n	xx\fa  \fb c !!d \n	\f&		S\"		." [t nil calc-date-format bc-flag second minute hour yearday bigyear day month year gnext next this fmt num okay case-fold-search with-time str 0 X (n N j J) string-match "\\`[-+]?[0-9.]+\\([eE][-+]?[0-9]+\\)?" math-match-substring math-date-to-dt math-read-number math-sub (n N) j math-integerp (bigpos 424 721 1) (float (bigpos 235 214 17) -1) 3 4 5 2 U "\\`[-+]?[0-9]+" math-add 719164 math-div (float 864 2) (mmm Mmm MMM) math-parse-date-word math-short-month-names (Mmmm MMMM) math-long-month-names (www Www WWW) math-short-weekday-names (Wwww WWWW) math-long-weekday-names (p P) "\\`a" 12 1 "\\`p" 24 (pp PP pppp PPPP) "\\`am\\|a\\.m\\." "\\`pm\\|p\\.m\\." (Y YY BY YYY YYYY) (MM DD ddd hh HH mm ss SS) (Y YY BYY) "\\` *[0-9][0-9]" "\\`[0-9][0-9][0-9][0-9]" YYY (43 45) b (aa AA aaaa AAAA) "\\` *\\(ad\\|a\\.d\\.\\)" (aaa AAA) "\\` *ad *" (bb BB bbb BBB bbbb BBBB) "\\` *\\(bc\\|b\\.c\\.\\)" (s ss bs SS BS) (YY YYYY MM DD hh HH mm) "\\` *[0-9][0-9]\\(\\.[0-9]+\\)?" "\\` *[0-9][0-9]?\\(\\.[0-9]+\\)?" C "\\`:[0-9][0-9]" (ddd MM DD hh HH mm) (YY YYYY MM DD ddd hh HH mm ss SS) ddd "\\` *[0-9][0-9][0-9]" "\\` *[0-9]+" string-to-int W 7 (d ddd bdd) (M MM BM) (D DD BD) (h hh bh H HH BH) (m mm bm) "" math-this-year math-neg math-abs math-parse-date-validate] 17])
(defalias 'calcFunc-now #[(&optional zone) " !):( $ \f\f\"\f\"\"\"\"6 \f6 !C5 C\")" [nil calc-date-format math-parse-date current-time-string date zone math-add math-div math-sub calcFunc-tzone (float 864 2) calc-record-why "*Unable to interpret current date from system" append calcFunc-now] 9])
(defalias 'calcFunc-year #[(date) "	!@" [math-date-to-dt date] 2])
(defalias 'calcFunc-month #[(date) "	!A@" [math-date-to-dt date] 2])
(defalias 'calcFunc-day #[(date) "\n!8" [2 math-date-to-dt date] 3])
(defalias 'calcFunc-weekday #[(date) "= A@! \"!\"\"" [date math-realp math-reject-arg datep math-mod math-add math-floor 6 7] 4])
(defalias 'calcFunc-yearday #[(date) "	!\n@\nA@\n8#)" [math-date-to-dt date dt math-day-number 2] 5])
(defalias 'calcFunc-hour #[(date) "= A@!8 ć" [date hms 3 math-date-to-dt 0] 3])
(defalias 'calcFunc-minute #[(date) "= 8!8 Ň" [date hms 2 4 math-date-to-dt 0] 3])
(defalias 'calcFunc-second #[(date) "= 8!8 Ň" [date hms 3 5 math-date-to-dt 0] 3])
(defalias 'calcFunc-time #[(date) "	!\n8 \nB ŉF)" [math-date-to-dt date dt 3 hms 0] 4])
(defalias 'calcFunc-date #[(date &optional month day hour minute second) "	!\n 	!	 	 	\"!\" !0 0 \"=O O 8\n8A@!\\ !m m \"!z !  \"\n! \n!\n\n \n! \n\"	! ! ! \"  	 \n ү!D	E!D 	E!D!D@=A@\"" [math-messy-integerp month math-trunc math-reject-arg fixnump day hour hms minute 3 second 2 math-realp realp date math-integerp integerp math-dt-to-date 0 math-this-year datep] 8])
(defalias 'calcFunc-julian #[(date &optional zone) "	!& 	! 	\"$ 	\"		\"\"\"D	@=J 	A@	A@!= ˂H 	\"\"\"\"	\"" [math-realp date math-integerp math-sub (bigpos 424 721 1) (float (bigpos 235 214 17) -1) math-div calcFunc-tzone zone (float 864 2) math-add (bigpos 424 721 1) (float (bigpos 235 214 17) -1) (float 864 2) math-reject-arg datep] 8])
(defalias 'calcFunc-unixtime #[(date &optional zone) "	! 	\"\"		\"\"\"D	@=3 	A@\"A@	\"\"	\"" [math-realp date math-add 719164 math-div (float 864 2) math-sub calcFunc-tzone zone (float 864 2) math-date-parts math-reject-arg datep] 7])
(defalias 'calcFunc-tzone #[(&optional zone date) " ! \"!@=\" \"\"!@=: A@\"8\"\"@=R A@\"8\"\"@= A@!\" A@8 8 @\" \"\" ؚ \" \"*\"! !\" !!q #b)! !@@# !A! )!{!̔̔̕{!\"\" )!!@!!80p0@8!@p0@8!@p0@8!@p0@8!@p0A0700@00@\"!80!)!@!!@P!E \"!!\"+" [zone math-realp math-round math-mul 3600 hms math-from-hms deg + math-add calcFunc-tzone date 2 - math-sub var symbol-name nil found name assoc math-tzone-names math-daylight-savings-adjust 0 "LOCAL" math-reject-arg "*Unrecognized time zone name" "*Expected a time zone" calc-var-value var-TimeZone (var error var-error) tz offset p get-buffer-create " *Calc Temporary*" erase-buffer call-process "date" t 1 case-fold-search search-forward looking-at "\\([-+][0-9]?[0-9]\\)\\([0-9][0-9]\\)?\\(\\'\\|[^0-9]\\)" string-to-int math-div 60 gen 3 4 5 intern "var-" kill-buffer calc-refresh-evaltos] 7])
(byte-code "! B" [boundp math-tzone-names (("MEGT" -1 "MET" "METDST") ("METDST" -1 -1) ("MET" -1 0) ("MEGZ" -1 "MEZ" "MESZ") ("MEZ" -1 0) ("MESZ" -1 -1) ("WEGT" 0 "WET" "WETDST") ("WETDST" 0 -1) ("WET" 0 0) ("BGT" 0 "GMT" "BST") ("GMT" 0 0) ("BST" 0 -1) ("NGT" (float 35 -1) "NST" "NDT") ("NST" (float 35 -1) 0) ("NDT" (float 35 -1) -1) ("AGT" 4 "AST" "ADT") ("AST" 4 0) ("ADT" 4 -1) ("EGT" 5 "EST" "EDT") ("EST" 5 0) ("EDT" 5 -1) ("CGT" 6 "CST" "CDT") ("CST" 6 0) ("CDT" 6 -1) ("MGT" 7 "MST" "MDT") ("MST" 7 0) ("MDT" 7 -1) ("PGT" 8 "PST" "PDT") ("PST" 8 0) ("PDT" 8 -1) ("YGT" 9 "YST" "YDT") ("YST" 9 0) ("YDT" 9 -1)) current-load-list] 2)
(defalias 'math-daylight-savings-adjust #[(date zone &optional dt) "	  A@= A@G B !B \"	> 	A@\"\")G \"!U !c $)" [date calcFunc-now nil bump 0 math-realp assoc zone math-tzone-names zadj -1 math-sub math-div (float 24 0) math-reject-arg datep math-float dt math-date-to-dt math-daylight-savings-hook] 6])
(defalias 'calcFunc-dsadj #[(date &optional zone) " =  \"  !  !=- A@!	\"\n> \"\n8M \n8R \")" [zone var math-reject-arg "*Time zone variable expected" calc-var-value var-TimeZone calcFunc-tzone symbol-name assoc math-tzone-names zadj "*Unrecognized time zone name" 2 math-daylight-savings-adjust date] 4])
(defalias 'calcFunc-tzconv #[(date z1 z2) "	! 	D\f#A@ŉ	\"\f\"" [math-realp date calcFunc-tzconv z1 z2 calcFunc-unixtime] 4])
(byte-code "! B" [boundp math-daylight-savings-hook math-std-daylight-savings current-load-list] 2)
#@228 Standard North American daylight savings algorithm.
This implements the rules for the U.S. and Canada as of 1987.
Daylight savings begins on the first Sunday of April at 2 a.m.,
and ends on the last Sunday of October at 2 a.m.
(defalias 'math-std-daylight-savings #[(date dt zone bump) "A@W\n A@UF \f$8W' D 8UC 8	\\Y? ʂD D )A@WP ʇA@U \f$8Wm ʂ 8U 8	\\Y  ʂ )" [dt 4 0 math-prev-weekday-in-month date 7 sunday 2 3 bump -1 10 31] 5 (#$ . 23968)])
(defalias 'math-prev-weekday-in-month #[(date dt day wday) " \n8\n@\nA@\"V \n@\nA@\"!\n8\"\"!A@\")" [day 2 dt math-days-in-month math-sub math-floor date zeroth calcFunc-newweek math-add] 5])
(defalias 'calcFunc-pwday #[(date &optional day weekday) "= A@! \"!  !* \"U2 W> VC \"!O $" [date math-realp math-reject-arg datep math-messy-integerp day math-trunc fixnump 0 31 7 range math-prev-weekday-in-month math-date-to-dt weekday] 5])
(defalias 'calcFunc-newweek #[(date &optional weekday) "= A@! \"\f \f!& \f!\f0 \f\"\fW< \fVA \f\"!\f\"!\"D" [date math-realp math-reject-arg datep weekday 0 math-messy-integerp math-trunc fixnump 6 range math-floor math-sub calcFunc-weekday] 7])
(defalias 'calcFunc-newmonth #[(date &optional day) " ! ! \"W& V+ \"\n!UE @A@\"VO @A@\"@=j 8Uj Yj Z@A@E!S\")D" [day 1 math-messy-integerp math-trunc math-reject-arg fixnump 0 31 range math-date-to-dt date dt math-days-in-month 1752 9 14 11 math-add math-dt-to-date] 6])
(defalias 'calcFunc-newyear #[(date &optional day) " ! ! \"!Yi Xi @=8 ̂E @!D ʂE UT VW @E!S\")D Y X @[E!D \")" [day 1 math-messy-integerp math-trunc math-reject-arg fixnump math-date-to-dt date dt 0 366 1752 355 math-leap-year-p 365 max math-add math-dt-to-date -12 -1 range] 6])
(defalias 'calcFunc-incmonth #[(date &optional step) " ! !! \"!	@\n	A@S\"\f\f\"	8\f\"\"T\f\n\"\n\n\f\"^	@!q \n!q \n\"\n	@! \n! \n\"\n\n\f	AAABBB!-D" [step 1 math-messy-integerp math-trunc math-integerp math-reject-arg integerp math-date-to-dt date dt year math-add month calcFunc-idiv 12 extra 2 day math-sub math-mul math-days-in-month math-posp math-negp math-dt-to-date] 7])
(defalias 'calcFunc-incyear #[(date &optional step) "	 \"\"" [calcFunc-incmonth date math-mul step 1 12] 5])
(defalias 'calcFunc-bsub #[(a b) "=\f \"\f=P A@\fA@\"% \f\"!\f!!\n\f!\n@@\"AL \nAL ΂M \"*\f!\"" [a date math-reject-arg datep b math-lessp math-neg calcFunc-bsub math-setup-holidays math-to-business-day da db math-add math-sub 1 0 calcFunc-badd] 4])
(defalias 'calcFunc-badd #[(a b) "= \n= \"\n\"\n= :+ @> :L @>T @=F A@=O !O =T \n\n!@A : @= @= @> A@: A@@= A@V ! V \" \"! \n\"*= 8\"\" A\"\n\")\"\n\"" [b date a math-reject-arg nil "*Illegal combination in date arithmetic" calcFunc-badd (bigpos bigneg frac float) (bigpos bigneg) float 0 math-zerop math-to-business-day d math-add bigpos bigneg (frac float) math-posp math-sub 1 bb math-from-business-day hms 7 math-holidays-cache hours math-div math-from-hms deg 24 datep] 5])
(defalias 'calcFunc-holiday #[(a) "	!A	 Ç" [math-to-business-day a 1 0] 2])
(byte-code "" [nil math-holidays-cache t math-holidays-cache-tag] 1)
(defalias 'math-to-business-day #[(date &optional need-year) "= A@: @> \"!\"!	F 	@=F D\"!@Ah @Wh TO x @Ux )8\\ץS_ZZG_\\ @W AT  @= +8@\"A\"\"U \"UA\"\"\")\"\"-B" [date (bigpos bigneg frac float) math-reject-arg datep math-floor day math-sub time math-date-to-dt dt 0 delta nil holiday need-year "*Generated holiday has wrong year" math-setup-holidays math-holidays-cache days t 3 weekdays 6 7 weeks 1 wkday hours math-div math-compare -1 math-mul 86400 math-add] 8])
(defalias 'math-from-business-day #[(num) "	!	\n\"\n \" 	A@\f\fA\f8 \f@\nW8 T \n\\*	8GZ\nS\\S\n_ZZ\nG_\\>| \nT SV To 	8 \fA\"@\")\n!? \n\f\"D." [math-floor num day math-sub time math-reject-arg nil "*Date is outside valid range" math-setup-holidays math-holidays-cache 0 delta days 3 weekdays 7 bweek weeks 1 wkday w hours math-add math-mul date] 5])
(defalias 'math-setup-holidays #[(&optional date) "!\n=!ĉ	\n!+ \"A@=F @A@c @=Z @8=c @=n @	B	+ @= @A@\n @A@\nAB+ @=%@8=%@8=% @\"@\"8\"U 8\"U @\"888\"BA:A@>+ A@=AA@=A!A=+ @\"+ @=V@8:B@8@>V@8:m@8@>m@@V@Wy@\"@\"隃+ @\"+ @\"@\"@B+ @\"+ GU\"CC\"	B4!.!48789948\"==D\"48	C94Ġ	AB!4AA	@)48S@ 7Ă8r49BA 9!@ 798@WB C 98@S#D E !98@W8@SA 8@!@ 798AVB C 8AT9#D E !98AV8ATA 8A!@ 7@ 7-" [calc-var-value var-Holidays math-holidays-cache-tag ((sun . 0) (mon . 1) (tue . 2) (wed . 3) (thu . 4) (fri . 5) (sat . 6)) nil hours limit exprs weekdays days wdnames h math-vectorp math-reject-arg "*Holidays variable must be a vector" date intv 2 vec var hms 3 "*Only one hours interval allowed in Holidays" math-div (hms 24 0 0) math-compare 0 -1 1 "*Hours interval out of range" math-sub (bigpos bigneg) float math-zerop "*Degenerate hours interval" (bigpos bigneg) 1900 2100 "*Only one limit allowed in Holidays" calcFunc-vint (intv 3 1 2737) (vec) "*Limit is out of range" math-expr-contains (var y var-y) (var m var-m) "*Holidays must contain a vector of holidays" 7 "*Too many weekend days" sort < (intv 3 1 2737) math-holidays-cache calcFunc-year 5 done limits year calcFunc-in 4 "*Date is outside valid range" ((byte-code " " [done t math-holidays-cache-tag] 1)) 6 math-setup-add-holidays t math-setup-year-holidays message "Computing holidays, %d .. %d" calc-set-command-flag clear-message] 9])
(defalias 'math-setup-year-holidays #[(year) "	8E \n@!\"7 TX3 !! )< !+\nA )" [2 math-holidays-cache exprs year var-y nil var-m math-evaluate-expr expr math-expr-contains (var m var-m) 0 12 math-setup-add-holidays] 4])
(defalias 'math-setup-add-holidays #[(days) "= A @! =P 8!\"=5 \"\"=N !\"5 )=] A@!=  \"A @A@A A@W AA AB@ABA @S *): @> D\"\"" [days vec math-setup-add-holidays intv math-ceiling 2 day calcFunc-in 1 math-add date 0 math-to-business-day year b math-holidays-cache iprev prev (bigpos bigneg frac float) math-reject-arg "*Invalid holiday value" "*Holiday formula failed to evaluate"] 4])
(defalias 'math-make-sdev #[(x sigma) ">\f \"\f> \f\"\f:P \f@=] \f@=V \f@>J \fA@:B \fA@@=S \fA@WS \f!S \fW] \f>a \f!\f: \f@> \f@=| \fA@= \f! \f= : @> \fE" [x (date mod sdev intv vec) math-reject-arg realp sigma (date mod sdev intv vec) bigneg bigpos (frac float) 0 math-negp (cplx polar) math-abs (bigpos bigneg) float math-zerop (bigpos bigneg frac float cplx polar hms) sdev] 3])
(defalias 'calcFunc-sdev #[(x sigma) "	\n\"" [math-make-sdev x sigma] 3])
(defalias 'math-normalize-mod #[(a) "	A@!	8!\f!% !% !% \f\"+ \fE!*" [math-normalize a 2 m n math-anglep math-posp math-make-mod calcFunc-makemod] 4])
(defalias 'math-make-mod #[(n m) "\n : @> \"!\" \"\n:. \n@> \n:f \n@=u \n@=l \n@>` \nA@:X \nA@@=i \nA@Wi \n!i \nWu \n\"U} \n\"E\nE\n@> \n@\nA\"B!\n@= \nA@: \nA@@> \nA@\"\n8\"\n@> \"\n\"\n\"" [m calc-previous-modulo n (bigpos bigneg frac float hms) math-reject-arg anglep math-posp posp bigneg bigpos (frac float) 0 math-negp math-compare -1 mod math-mod (+ - / vec neg) math-normalize mapcar #[(x) "	\n\"" [math-make-mod x m] 3] * math-mul math-make-mod 2 (* ^ var calcFunc-subscr) 1] 5])
(defalias 'calcFunc-makemod #[(n m) "	\n\"" [math-make-mod n m] 3])
(defalias 'math-make-intv #[(mask lo hi) ">\f \"\f> \f\"=\f==4 =0 \f1 \":G @>G @= \f:Z \f@>Z \f@= \f\"\nUz \fUq  \f\fF \nV \fU F \fF \f\fF)\f\fF" [lo (cplx polar mod sdev intv vec) math-reject-arg realp hi (cplx polar mod sdev intv vec) date datep (bigpos bigneg frac float) math-compare cmp 0 mask 3 intv 2] 5])
(defalias 'calcFunc-intv #[(mask lo hi) "	!\n 	!	! 	\"	X  	\"		\n#" [math-messy-integerp mask math-trunc natnump math-reject-arg fixnatnump 3 range math-make-intv lo hi] 4])
(defalias 'math-sort-intv #[(mask lo hi) "	\n\"U H	\n#\n	#" [math-compare hi lo -1 math-make-intv [0 2 1 3] mask] 4])
(defalias 'math-combine-intervals #[(a am b bm c cm d dm) "\f\"U \f% 	U% # 	\n\"U= \n	\fL 	UL J \fV ςW ` ła \\	#)" [nil res math-compare a c 1 cm am 0 b d -1 dm bm math-make-intv 2] 4])
(defalias 'math-div-mod #[(a b m) ":\f @>z \n: \n@>z :$ @>z \n	=a \"	@\"\"	A*0 \"A=y @	\"\"-" [a (bigpos bigneg) b m 1 0 v3 v1 u3 u1 math-idivmod q math-sub math-mul t1 math-mod] 6])
(defalias 'math-mod-intv #[(a b) "8\f\"!8\f\"!8\f\"\"\n8\f\"\"= A@\n#g \"\"b !b A@>b A@\n\f#g \f#," [math-floor math-div 2 a b q1 3 q2 math-sub math-mul m1 m2 math-sort-intv math-equal-int 1 math-zerop (0 2) math-make-intv 0] 5])
(defalias 'math-read-angle-brackets #[nil "! \nG\n\fO\"[ ȉSOȕO\n\f\fQ!\f=< \fW !=N W \fAC#+ \" \n! =x  \n!C#) !; \"= 8\"T +" [math-check-for-commas t exp-str last exp-pos str string-match "\\` *\\([a-zA-Z#][a-zA-Z0-9#]* *,? *\\)*:" 0 nil calc-hashes-used str2 str1 math-read-expr "[" "]" error append (calcFunc-lambda) "#" (calcFunc-lambda) calc-invent-args math-parse-date res throw syntax 2 math-read-token] 5])
