MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 52.14.236.216
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/calc/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/calc/calc-units.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:10:47 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/calc/calc-units.el
;;; in Emacs version 24.3.1
;;; with all optimizations.

;;; This file contains utf-8 non-ASCII characters,
;;; and so cannot be loaded into Emacs 22 or earlier.
(and (boundp 'emacs-version)
     (< (aref emacs-version (1- (length emacs-version))) ?A)
     (string-lessp emacs-version "23")
     (error "`%s' was compiled for Emacs 23 or later" #$))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\207" [require calc-ext calc-macs] 2)
(defvar math-standard-units '((m nil "*Meter") (in "254*10^(-2) cm" "Inch" nil "2.54 cm") (ft "12 in" "Foot") (yd "3 ft" "Yard") (mi "5280 ft" "Mile") (au "149597870691. m" "Astronomical Unit" nil "149597870691 m (*)") (lyr "c yr" "Light Year") (pc "3.0856775854*10^16 m" "Parsec  (**)" nil "3.0856775854 10^16 m (*)") (nmi "1852 m" "Nautical Mile") (fath "6 ft" "Fathom") (fur "660 ft" "Furlong") (mu "1 um" "Micron") (mil "(1/1000) in" "Mil") (point "(1/72) in" "Point  (PostScript convention)") (Ang "10^(-10) m" "Angstrom") (mfi "mi+ft+in" "Miles + feet + inches") (texpt "(100/7227) in" "Point  (TeX convention) (**)") (texpc "12 texpt" "Pica  (TeX convention) (**)") (texbp "point" "Big point  (TeX convention) (**)") (texdd "(1238/1157) texpt" "Didot point  (TeX convention) (**)") (texcc "12 texdd" "Cicero  (TeX convention) (**)") (texsp "(1/65536) texpt" "Scaled TeX point (TeX convention) (**)") (hect "10000 m^2" "*Hectare") (a "100 m^2" "Are") (acre "(1/640) mi^2" "Acre") (b "10^(-28) m^2" "Barn") (L "10^(-3) m^3" "*Liter") (l "L" "Liter") (gal "4 qt" "US Gallon") (qt "2 pt" "Quart") (pt "2 cup" "Pint (**)") (cup "8 ozfl" "Cup") (ozfl "2 tbsp" "Fluid Ounce") (floz "2 tbsp" "Fluid Ounce") (tbsp "3 tsp" "Tablespoon") (tsp "492892159375*10^(-11) ml" "Teaspoon" nil "4.92892159375 ml") (vol "tsp+tbsp+ozfl+cup+pt+qt+gal" "Gallons + ... + teaspoons" nil "tsp+tbsp+ozfl+cup+pt+qt+gal") (galC "galUK" "Canadian Gallon") (galUK "454609*10^(-5) L" "UK Gallon" nil "4.54609 L") (s nil "*Second") (sec "s" "Second") (min "60 s" "Minute") (hr "60 min" "Hour") (day "24 hr" "Day") (wk "7 day" "Week") (hms "wk+day+hr+min+s" "Hours, minutes, seconds") (yr "36525*10^(-2) day" "Year (Julian)" nil "365.25 day") (Hz "1/s" "Hertz") (mph "mi/hr" "*Miles per hour") (kph "km/hr" "Kilometers per hour") (knot "nmi/hr" "Knot") (c "299792458 m/s" "Speed of light") (ga "980665*10^(-5) m/s^2" "*\"g\" acceleration" nil "9.80665 m / s^2") (g nil "*Gram") (lb "16 oz" "Pound (mass)") (oz "28349523125*10^(-9) g" "Ounce (mass)" nil "28.349523125 g") (ton "2000 lb" "Ton") (tpo "ton+lb+oz" "Tons + pounds + ounces (mass)") (t "1000 kg" "Metric ton") (tonUK "10160469088*10^(-7) kg" "UK ton" nil "1016.0469088 kg") (lbt "12 ozt" "Troy pound") (ozt "311034768*10^(-7) g" "Troy ounce" nil "31.10347680 g") (ct "(2/10) g" "Carat" nil "0.2 g") (u "1.660538782*10^(-27) kg" "Unified atomic mass" nil "1.660538782 10^-27 kg (*)") (N "m kg/s^2" "*Newton") (dyn "10^(-5) N" "Dyne") (gf "ga g" "Gram (force)") (lbf "ga lb" "Pound (force)") (kip "1000 lbf" "Kilopound (force)") (pdl "138254954376*10^(-12) N" "Poundal" nil "0.138254954376 N") (J "N m" "*Joule") (erg "10^(-7) J" "Erg") (cal "41868*10^(-4) J" "International Table Calorie" nil "4.1868 J") (calth "4184*10^(-3) J" "Thermochemical Calorie" nil "4.184 J") (Cal "1000 cal" "Large Calorie") (Btu "105505585262*10^(-8) J" "International Table Btu" nil "1055.05585262 J") (eV "ech V" "Electron volt") (ev "eV" "Electron volt") (therm "105506000 J" "EEC therm") (invcm "h c/cm" "Energy in inverse centimeters") (Kayser "invcm" "Kayser (inverse centimeter energy)") (men "100/invcm" "Inverse energy in meters") (Hzen "h Hz" "Energy in Hertz") (Ken "k K" "Energy in Kelvins") (Wh "W hr" "Watt hour") (Ws "W s" "Watt second") (W "J/s" "*Watt") (hp "550 ft lbf/s" "Horsepower") (hpm "75 m kgf/s" "Metric Horsepower") (K nil "*Degree Kelvin" K) (dK "K" "Degree Kelvin" K) (degK "K" "Degree Kelvin" K) (dC "K" "Degree Celsius" C) (degC "K" "Degree Celsius" C) (dF "(5/9) K" "Degree Fahrenheit" F) (degF "(5/9) K" "Degree Fahrenheit" F) (Pa "N/m^2" "*Pascal") (bar "10^5 Pa" "Bar") (atm "101325 Pa" "Standard atmosphere") (Torr "(1/760) atm" "Torr") (mHg "1000 Torr" "Meter of mercury") (inHg "254*10^(-1) mmHg" "Inch of mercury" nil "25.4 mmHg") (inH2O "2.490889*10^2 Pa" "Inch of water" nil "2.490889 10^2 Pa (*)") (psi "lbf/in^2" "Pounds per square inch") (P "(1/10) Pa s" "*Poise") (St "10^(-4) m^2/s" "Stokes") (A nil "*Ampere") (C "A s" "Coulomb") (Fdy "ech Nav" "Faraday") (e "ech" "Elementary charge") (ech "1.602176487*10^(-19) C" "Elementary charge" nil "1.602176487 10^-19 C (*)") (V "W/A" "Volt") (ohm "V/A" "Ohm") (Ω "ohm" "Ohm") (mho "A/V" "Mho") (S "A/V" "Siemens") (F "C/V" "Farad") (H "Wb/A" "Henry") (T "Wb/m^2" "Tesla") (Gs "10^(-4) T" "Gauss") (Wb "V s" "Weber") (cd nil "*Candela") (sb "10000 cd/m^2" "Stilb") (lm "cd sr" "Lumen") (lx "lm/m^2" "Lux") (ph "10000 lx" "Phot") (fc "lm/ft^2" "Footcandle") (lam "10000 lm/m^2" "Lambert") (flam "(1/pi) cd/ft^2" "Footlambert") (Bq "1/s" "*Becquerel") (Ci "37*10^9 Bq" "Curie") (Gy "J/kg" "Gray") (Sv "Gy" "Sievert") (R "258*10^(-6) C/kg" "Roentgen") (rd "(1/100) Gy" "Rad") (rem "rd" "Rem") (mol nil "*Mole") (rad nil "*Radian") (circ "2 pi rad" "Full circle") (rev "circ" "Full revolution") (deg "circ/360" "Degree") (arcmin "deg/60" "Arc minute") (arcsec "arcmin/60" "Arc second") (grad "circ/400" "Grade") (rpm "rev/min" "Revolutions per minute") (sr nil "*Steradian") (h "6.62606896*10^(-34) J s" "*Planck's constant" nil "6.62606896 10^-34 J s (*)") (hbar "h / (2 pi)" "Planck's constant") (mu0 "4 pi 10^(-7) H/m" "Permeability of vacuum") (μ0 "mu0" "Permeability of vacuum") (eps0 "1 / (mu0 c^2)" "Permittivity of vacuum") (ε0 "eps0" "Permittivity of vacuum") (G "6.67428*10^(-11) m^3/(kg s^2)" "Gravitational constant" nil "6.67428 10^-11 m^3/(kg s^2) (*)") (Nav "6.02214179*10^(23) / mol" "Avogadro's constant" nil "6.02214179 10^23 / mol (*)") (me "9.10938215*10^(-31) kg" "Electron rest mass" nil "9.10938215 10^-31 kg (*)") (mp "1.672621637*10^(-27) kg" "Proton rest mass" nil "1.672621637 10^-27 kg (*)") (mn "1.674927211*10^(-27) kg" "Neutron rest mass" nil "1.674927211 10^-27 kg (*)") (mmu "1.88353130*10^(-28) kg" "Muon rest mass" nil "1.88353130 10^-28 kg (*)") (mμ "mmu" "Muon rest mass" nil "1.88353130 10^-28 kg (*)") (Ryd "10973731.568527 /m" "Rydberg's constant" nil "10973731.568527 /m (*)") (k "1.3806504*10^(-23) J/K" "Boltzmann's constant" nil "1.3806504 10^-23 J/K (*)") (alpha "7.2973525376*10^(-3)" "Fine structure constant" nil "7.2973525376 10^-3 (*)") (α "alpha" "Fine structure constant" nil "7.2973525376 10^-3 (*)") (muB "927.400915*10^(-26) J/T" "Bohr magneton" nil "927.400915 10^-26 J/T (*)") (muN "5.05078324*10^(-27) J/T" "Nuclear magneton" nil "5.05078324 10^-27 J/T (*)") (mue "-928.476377*10^(-26) J/T" "Electron magnetic moment" nil "-928.476377 10^-26 J/T (*)") (mup "1.410606662*10^(-26) J/T" "Proton magnetic moment" nil "1.410606662 10^-26 J/T (*)") (R0 "8.314472 J/(mol K)" "Molar gas constant" nil "8.314472 J/(mol K) (*)") (V0 "22.710981*10^(-3) m^3/mol" "Standard volume of ideal gas" nil "22.710981 10^-3 m^3/mol (*)") (Np nil "*Neper") (dB "(ln(10)/20) Np" "decibel")))
#@212 Additional units table for user-defined units.
Must be formatted like `math-standard-units'.
If you change this, be sure to set `math-units-table' to nil to ensure
that the combined units table will be rebuilt.
(defvar math-additional-units nil (#$ . 7357))
(defvar math-unit-prefixes '((89 (^ 10 24) "Yotta") (90 (^ 10 21) "Zetta") (69 (^ 10 18) "Exa") (80 (^ 10 15) "Peta") (84 (^ 10 12) "Tera") (71 (^ 10 9) "Giga") (77 (^ 10 6) "Mega") (107 (^ 10 3) "Kilo") (75 (^ 10 3) "Kilo") (104 (^ 10 2) "Hecto") (72 (^ 10 2) "Hecto") (68 (^ 10 1) "Deka") (0 (^ 10 0) nil) (100 (^ 10 -1) "Deci") (99 (^ 10 -2) "Centi") (109 (^ 10 -3) "Milli") (117 (^ 10 -6) "Micro") (956 (^ 10 -6) "Micro") (110 (^ 10 -9) "Nano") (112 (^ 10 -12) "Pico") (102 (^ 10 -15) "Femto") (97 (^ 10 -18) "Atto") (122 (^ 10 -21) "zepto") (121 (^ 10 -24) "yocto")))
(defvar math-standard-units-systems '((base nil) (si ((g '(/ (var kg var-kg) 1000)))) (mks ((g '(/ (var kg var-kg) 1000)))) (cgs ((m '(* (var cm var-cm) 100))))))
#@146 Internal units table.
Derived from `math-standard-units' and `math-additional-units'.
Entries are (SYMBOL EXPR DOC-STRING TEMP-TYPE BASE-UNITS).
(defvar math-units-table nil (#$ . 8358))
(defvar math-units-table-buffer-valid nil)
(defalias 'calc-base-units #[nil "\300\301`\"\207" [calc-do #[nil "\301\302\303\304\305\306\307\303!\301\"!#)\207" [calc-autorange-units nil calc-enter-result 1 "bsun" math-simplify-units math-to-standard-units calc-top-n] 7]] 3 nil nil])
(defalias 'calc-quick-units #[nil "\300\301`\"\207" [calc-do #[nil "\306Z\211\307U\203\310\202	\311\312!\313\314!	\307Y\203$	\315X\204(\316\317!\210\320!\2042\316\321!\210\nGW\204>\316\322\n\"\210\323\f\324\"\203`
\203P\325\f\n8\"\210\326\314\327\330	\"\331\f\n8\"#\202o\326\314\327\332	\"\333\334\f\n8\"!#,\207" [last-command-event num pos units expr calc-ensure-consistent-units 48 0 10 calc-var-value var-Units calc-top-n 1 9 error "Bad unit number" math-vectorp "No \"quick units\" are defined" "Unit number %d not defined" math-units-in-expr-p nil math-check-unit-consistency calc-enter-result format "cun%d" math-convert-units "*un%d" math-simplify-units math-mul] 9]] 3 nil nil])
#@36 Return the standard units in EXPR.
(defalias 'math-get-standard-units #[(expr) "\301\302\303\304\"!!\207" [expr math-simplify-units math-extract-units math-to-standard-units nil] 5 (#$ . 9542)])
#@27 Return the units in EXPR.
(defalias 'math-get-units #[(expr) "\301\302!!\207" [expr math-simplify-units math-extract-units] 3 (#$ . 9744)])
#@57 Return EXPR in string form.
If EXPR is nil, return nil.
(defalias 'math-make-unit-string #[(expr) "\205\302\303\"\304\305\306	;\203	\202\307	!#)\207" [expr cexpr math-compose-expr 0 replace-regexp-in-string " / " "/" math-composition-to-string] 5 (#$ . 9891)])
#@45 A table storing previously converted units.
(defvar math-default-units-table #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data (1 (1))) (#$ . 10167))
#@61 Get default units to use when converting the units in EXPR.
(defalias 'math-get-default-units #[(expr) "\306!\307!\310\n\"	\f@\232\203\311\f\211A@)!\202#\311\f@!+\207" [expr units standard-units math-default-units-table default-units x math-get-units math-get-standard-units gethash math-make-unit-string] 4 (#$ . 10348)])
#@115 Put the units in EXPR in the default units table.
If COMP or STD is non-nil, put that in the units table instead.
(defalias 'math-put-default-units #[(expr &optional comp std) "\206	\206\306\n!\307\203\310\n!\202 	\203\n\202 !\311\f
\"\f\f\312=?\205O\f\204=\313\fC
#\202O\f@\232?\205O\313\f\f@D
#+\207" [comp std expr new-units standard-units math-default-units-table math-get-units math-get-standard-units math-simplify-units gethash 1 puthash default-units] 4 (#$ . 10688)])
(defalias 'calc-convert-units #[(&optional old-units new-units) "\300\301`\"\207" [calc-do #[nil "\306\307!\310\211\211\211\311\f\312\"\204M
\2065\313\314!\211\315\232\203'\316\307\2025\317\320\"\2032\316P\321!\211(\242\322=\203F\322\323(A@\"\210\324\f(\")\325\f!\211\316\232\203e\326\307\327\330\f!#\210\331\332!\202)\204\224\313\203v\314\333Q\202w\334\203\202\335\336Q\202\203\337P!\211)\315\230\203\224\203\224)\317\320)\"\203\242\316)P)\321)!\211\242\322=\203\265\322\323\340	8\"\210*\203\277\341\f	\"\210\311	\312\"	\242\342=\205\320	A@+\236	\242\343=,-\211\204\346-\204\346\322\344!\210-\203\367\330\345\f-A@\"!\202\346\f	\205\316\232?#.\347.,\205	\"\210\326\307\327.#,-\207" [defunits units unew uoldname expr old-units calc-top-n 1 nil math-units-in-expr-p t read-string "Old units: " "" "1" string-match "\\` */" math-read-expr error "Bad format in units expression: %s" math-mul math-get-default-units calc-enter-result "cvun" math-simplify-units message "All units in expression cancel" ", new units" "New units" " (default " "): " ": " 2 math-check-unit-consistency var + "No units specified" math-to-standard-units math-convert-units math-put-default-units uold new-units calc-ensure-consistent-units math-standard-units-systems comp std res] 6]] 3 nil nil])
(defalias 'calc-autorange-units #[(arg) "\300\301!\207" [calc-do #[nil "\302\301\303\304$\210\305	\203\306\202\307!\207" [arg calc-autorange-units calc-change-mode nil t message "Adjusting target unit prefix automatically" "Using target units exactly"] 5]] 2 nil "P"])
(defalias 'calc-convert-temperature #[(&optional old-units new-units) "\300\301`\"\207" [calc-do #[nil "\306\307!\310\211\211\211
\206>\311\f!\211*\2036*:\2030\312*@\313\314\315*@!P!E\202=\316\317!\202=\320\321\322!\211!)\211\242\316=\203M\316\323\3248\"\210\325\f\310\"\204Y\326\f\"\327\f!+\206}\321\n\203n\322\n\330Q\202o\331\203z\332\333Q\202{\334P!\320	\335\230\203\211\202\212	!\211\242\316=\203\232\316\323\324	8\"\210\336	!\210\337\340\341\f	\n$!!\211,\211-:\203\323-@\342>?\205\327-@\343=\203\314-A@\344=\202\327\345-!\202\327-\344=)\203\342\346,	E,\347.\350\307\351,#.\207" [defunits unew uoldname uold expr old-units calc-top-n 1 nil math-single-units-in-expr-p var intern "var-" symbol-name error "Not a pure temperature expression" math-read-expr read-string "Old temperature units: " "Bad format in units expression: %s" 2 math-units-in-expr-p math-mul math-get-default-units ", new units" "New temperature units" " (default " "): " ": " "" math-put-default-units calc-normalize math-simplify-units math-convert-temperature (bigpos bigneg) float 0 math-zerop * none calc-enter-result "cvtm" units new-units ntemp a calc-simplify-mode] 8]] 3 nil nil])
(defalias 'calc-remove-units #[nil "\300\301`\"\207" [calc-do #[nil "\300\301\302\303\304\305\301!!!#\207" [calc-enter-result 1 "rmun" math-simplify-units math-remove-units calc-top-n] 7]] 3 nil nil])
(defalias 'calc-extract-units #[nil "\300\301`\"\207" [calc-do #[nil "\300\301\302\303\304\305\301!!!#\207" [calc-enter-result 1 "exun" math-simplify-units math-extract-units calc-top-n] 7]] 3 nil nil])
(defalias 'calc-explain-units #[nil "\300\301!\207" [calc-do #[nil "\302\211\303\304\305!\305\"\210\203\306\307\"\203\310\311Q	\2032\203+\312\313	#\202@\312\314	\"\202@\203=\312\315\"\202@\312\316!*\207" [calc-den-units calc-num-units nil calc-explain-units-rec calc-top-n 1 string-match "^[^(].* .*[^)]$" "(" ")" message "%s per %s" "%s" "1 per %s" "No units in expression"] 4]] 2 nil nil])
(defalias 'calc-explain-units-rec #[(expr pow) "\306!\307\211\203\310!\204\311\n8\206\312\n@!\211\313H\314=\203(\f\315\307O\316\317\f\"\203_\316\320\f\"\203Z\316\321\f\"\211\203_\f\313	O\f	H\322=\203O\323\202P\324\f	T\307OQ\2026\325\f\326QA@\n@=\204\213\311\312A@!\313H
\2368\316\317\f\"\203\207\n@\327>\204\207\323\fP\202\211\f\227P\330\315\"\204\352\330\331\"\204\352\330\311\"\204\247\330\332\"\203\275\333\n8\334\232\203\266\335\fP\202\352\f\336P\202\352\330\337\"\204\313\330\340\"\203\341\333\n8\341\232\203\332\342\fP\202\352\f\343P\202\352\f\344\345\346!!Q\347!\2030\203\3750\350\fQ\202\376\f\2110\2021\2031\350\fQ\202\f\2111)\202r\242\351=\2030\352A@\"\210\352\3118\"\202r\242\353=\203H\352A@\"\210\352\3118[\"\202r\242\354>\203X\352A@\"\202r\242\355=\205r\356\3118!\205r\352A@\357\3118\"\"*\207" [expr pos u pow name math-unit-prefixes math-check-unit-name nil math-zerop 2 symbol-name 0 42 1 string-match "[^a-zA-Zα-ωΑ-Ω0-9']" "^[a-zA-Zα-ωΑ-Ω0-9' ()]*$" "[ ()]" 32 "-" "" "(" ")" (mHg gf) math-equal-int -1 -2 4 ((m . 1)) "Square-" "-squared" 3 -3 ((m . 1)) "Cubic-" "-cubed" "^" math-format-number math-abs math-posp " " * calc-explain-units-rec / (neg + -) ^ math-realp math-mul calc-num-units calc-den-units] 7])
(defalias 'calc-simplify-units #[nil "\300\301`\"\207" [calc-do #[nil "\301>?\205\302\303\304\305\306\303!!#)\207" [calc-simplify-mode (none num) calc-enter-result 1 "smun" math-simplify-units calc-top-n] 6]] 3 nil nil])
(defalias 'calc-view-units-table #[(n) "\203\305\306\307!\211\203.\203.	\203.\310\311\n!!\210\312 \313\n!\210\314\305!\210\313\f!)\2021\315\305!)\207" [n math-units-table-buffer-valid win math-units-table curwin nil get-buffer-window "*Units Table*" bury-buffer window-buffer selected-window select-window switch-to-buffer math-build-units-table-buffer] 4 nil "P"])
(defalias 'calc-enter-units-table #[(n) "\203\302\303\304!\210\305\306\307\310!\"\207" [n math-units-table-buffer-valid nil math-build-units-table-buffer t message "%s" substitute-command-keys "Type \\[calc] to return to the Calculator"] 4 nil "P"])
(defalias 'calc-define-unit #[(uname desc &optional disp) "\203\301\302!\303\304!\210\305 \207" [disp read-string "Display definition: " calc-do #[nil "\306\307!	\236\n\204\310\211\211\211\257\211	B\310\nA\242\311=\205(A@=?\2058\312\307\"?\2058\313\314\"\240\210\nAA
\315\232?\205E
\240\210\205T\nAAAA\240*\207" [uname math-additional-units unit form math-units-table desc calc-top-n 1 nil var math-equal-int math-format-flat-expr 0 "" disp] 5] calc-invalidate-units-table] 2 nil "SDefine unit name: \nsDescription: \nP"])
(defalias 'calc-undefine-unit #[(uname) "\300\301!\210\302 \207" [calc-do #[nil "	\236\211\204\236\203\305\306\"\210\202\305\307\"\210\310\n	\"\311\211)\207" [uname math-additional-units unit math-standard-units math-units-table error "\"%s\" is a predefined unit name" "Unit name \"%s\" not found" delq nil] 4] calc-invalidate-units-table] 2 nil "SUndefine unit name: "])
(defalias 'calc-invalidate-units-table #[nil "\303\304\305!\211\205r	q\210\212eb\210\306\307!\205\310\311c)*)\207" [math-units-table buf inhibit-read-only nil get-buffer "*Units Table*" looking-at "Calculator Units Table" t "(Obsolete) "] 3])
(defalias 'calc-get-unit-definition #[(uname) "\300\301!\207" [calc-do #[nil "\304 \210	\236\211\204\305\306\"\210\307\n8\211;\203(\310\311\"\203,\312\313O\202,\314!\nA@\203A\315\316\317\nA@#\210\320\321\"\202T\315\316\317\322\323\324\314!P!E#\210\320\325\"*\207" [uname math-units-table unit msg math-build-units-table error "Unit name \"%s\" not found" 2 string-match "^\\*" 1 nil symbol-name calc-enter-result 0 "ugdf" message "Derived unit: %s" var intern "var-" "Base unit: %s"] 10]] 2 nil "SGet definition for unit: "])
(defalias 'calc-permanent-units #[nil "\300\301!\207" [calc-do #[nil "\304\305\306	!!q\210eb\210\307\310\304\311#\203.\312 \210`\307\313\304\311#\203.\312 \210\314y\210`|\210\2027db\210\315c\210\316u\210\317\320 \321\261\210\n\203\220\322c\210\n\211\203\211\323\324@@!\325@A@\203v@A@;\203j\326@A@!\202w\326\327@A@\330\"!\202w\331\325\326\332@8!\333\261\210A\211\204K)\334c\210\202\223\335c\210\336c\210\337 )\207" [pos calc-settings-file math-additional-units list nil find-file-noselect substitute-in-file-name search-forward ";;; Custom units stored by Calc" t beginning-of-line "\n;;; End of custom units" 1 "\n\n" -1 ";;; Custom units stored by Calc on " current-time-string "\n" "(setq math-additional-units '(\n" "  (" symbol-name " " prin1-to-string math-format-flat-expr 0 "nil" 2 ")\n" "))\n" ";;; (no custom units defined)\n" ";;; End of custom units\n" save-buffer] 9]] 2 nil nil])
(defalias 'math-build-units-table #[nil "\206,\306	\n\"\307\310\"\311\312\313!\210\311\307\314\"\211\315\316
\"\210)\312\317!\210
\211+\207" [math-units-table math-additional-units math-standard-units combined-units math-cu-unit-list tab append mapcar car nil message "Building units table..." #[(x) "@A@\205/A@;\203,\302A@!\211\242\303=\203'\303\304@\305	8#\202(	)\202/A@\3058\3068A@?\205A@\307BC\3108\257\207" [x exp math-read-plain-expr error "Format error in definition of %s in units table: %s" 2 3 1 4] 8] mapc math-find-base-units "Building units table...done" math-units-table-buffer-valid] 4])
(defalias 'math-find-base-units #[(math-fbu-entry) "\3038\304=\203\305\306@\"\210\3038\206`\307\303\233\304\240\210\310A@\311\"\210	@A\312=\2032	A\211\202$	\nA\203R\nA@A\312=\203K\n\211AA\241\210\2024\nA\211\2025)\313	\314\"\303\233	\240\210	)\207" [math-fbu-entry math-fbu-base b 4 boom error "Circular definition involving unit %s" nil math-find-base-units-rec 1 0 sort math-compare-unit-names] 4])
(defalias 'math-compare-unit-names #[(a b) "@	@\n>A>\207" [b a math-cu-unit-list] 3])
(defalias 'math-find-base-units-rec #[(expr pow) "\306!\211\203B\307	!\211\205>\n@A_\n@@\f\236
\203,
\211A\\\241\210\2025\n@@B\fB*\nA\211\204\310)\202\331\311!\206\331@\312=\203c\3138\250\203c\314A@\3138_\"\202\331@\315=\203z\314A@\"\210\314\3138\"\202\331@\316=\203\222\314A@\"\210\314\3138[\"\202\331@\317=\203\242\314A@\"\202\331@\320=\203\262\314A@\"\202\331@\321=\203\315A@\322=\206\331\323\324A@@#\202\331\325\232\206\331\323\326@\")\207" [expr u ulist pow math-fbu-base old math-check-unit-name math-find-base-units nil math-scalarp ^ 2 math-find-base-units-rec * / neg + var pi error "Unknown name %s in defining expression for unit %s" (calcFunc-ln 10) "Malformed defining expression for unit %s" p math-fbu-entry] 6])
(defalias 'math-units-in-expr-p #[(expr sub-exprs) ":\205*@\302=\203\303!\207	\204@\304>\205*\305A@	\"\206*\305\3068	\"\207" [expr sub-exprs var math-check-unit-name (* / ^) math-units-in-expr-p 2] 3])
(defalias 'math-only-units-in-expr-p #[(expr) ":\2059@\301=\203\302!\207@\303>\203%\304A@!\2059\304\3058!\207@\306=\2059\304A@!\2059\307\3058!\207" [expr var math-check-unit-name (* /) math-only-units-in-expr-p 2 ^ math-realp] 3])
(defalias 'math-single-units-in-expr-p #[(expr) "\303!\203\304\207@\305=\203\306!\207@\307=\2039\310A@!\310\3118!\211\2032	\2032\312\2027\n\2067	*\207@\313=\203Q\314\3118\304\"\203K\312\207\310A@!\207\312\207" [expr u2 u1 math-scalarp nil var math-check-unit-name * math-single-units-in-expr-p 2 wrong / math-units-in-expr-p] 5])
#@53 Non-nil if EXPR and NEWUNITS have consistent units.
(defalias 'math-consistent-units-p #[(expr newunits) "\242\303=\203A@	\236\206\304\305\306\nE!!\207" [newunits math-standard-units-systems expr var math-numberp math-get-units /] 5 (#$ . 22442)])
#@63 Give an error if EXPR and UNITS do not have consistent units.
(defalias 'math-check-unit-consistency #[(expr units) "\302	\"?\205\303\304\305	!\305\306!!#\207" [expr units math-consistent-units-p error "New units (%s) are inconsistent with current units (%s)" math-format-value math-get-units] 6 (#$ . 22703)])
(defalias 'math-check-unit-name #[(v) "\242\304=\205\\A@	\206\305 \236\206\\\306A@!\211G\307V\205[\n\310H\236\205[\311\n\307\312O!	\236\206[\n\310H\313=\205[\nG\314V\205[\n\307H\315=\205[\n\316H\317=\205[\311\n\314\312O!	\236)\207" [v math-units-table name math-unit-prefixes var math-build-units-table symbol-name 1 0 intern nil 77 3 101 2 103] 5])
(defalias 'math-to-standard-units #[(expr math-which-standard) "\301!\207" [expr math-to-standard-rec] 2])
(defalias 'math-to-standard-rec #[(expr) "\242\306=\203j\307!A@\211\203\\\nA@\203\"\310\nA@!\202@\n@\236\211\2032\fA@\202?\306\n@\311\312\313\n@!P!E)\n\203X	\n@=\204X\314\313	!\315H
\236A@E\202h	\316=\203g\317 \202h*\207\211:?\206x@\320>)\204\214\242\321=\203\216A@\242\306=\203\216\207@\322\310A\"B\207" [expr base u math-which-standard st math-unit-prefixes var math-check-unit-name math-to-standard-rec intern "var-" symbol-name * 0 pi math-pi (bigpos bigneg frac float cplx polar hms date mod var) calcFunc-subscr mapcar a] 7])
(defalias 'math-apply-units #[(expr units ulist &optional pure) "\306!	\203Z\307\310\311!\204\312\313!\210	A\203I\314	@A@\"\315\fS\316\n!)!\317\320\n	@@\"\"\321\320\n	@A@\"\"	A\211\202\317\320\314	@A@\"	@@\"\"*\207
\203`\207\306\322E!\207" [expr ulist value new calc-internal-prec pure math-simplify-units 0 nil math-numberp error "Incompatible units" math-div math-floor math-normalize math-add math-mul math-sub * units] 7])
(defvar math-decompose-units-cache nil)
(defalias 'math-decompose-units #[(units) "\306!\211\203	A@\242\307=\203	A@)\310!\211\242\307=\205\214\nE\211
@\232\204\211\311\311\211\242\307=\203V\312\3138!BA@\211\202;\312!B\211A\211\203\200\313@8\313@8\232\204b\314\315!\210\202b\f\316\317\"B,
A)\207" [units u calc-internal-prec calc-prefer-frac entry math-decompose-units-cache math-check-unit-name + calcFunc-expand nil math-decompose-unit-part 2 error "Inconsistent units in sum" sort #[(x y) "A@	A@\304\n\"\305U*?\207" [x y b a math-compare -1] 3] unit qty utemp ulist] 5])
(defalias 'math-decompose-unit-part #[(unit) "\301\302\303\304\"!\305\"B\207" [unit math-is-multiple math-simplify-units math-to-standard-units nil t] 6])
(defalias 'math-find-compatible-unit #[(expr unit) "\303!\211\205\f\304\n\305\")\207" [unit math-fcu-u expr math-check-unit-name math-find-compatible-unit-rec 1] 4])
(defalias 'math-find-compatible-unit-rec #[(expr pow) "\242\304=\203\305A@	\"\206Z\305\3068	\"\207\242\307=\203/\305A@	\"\206Z\305\3068	[\"\207\242\310=\203H\3068\250\203H\305A@	\3068_\"\207\311!\3128\312\n8\232\205Y	B)\207" [expr pow u2 math-fcu-u * math-find-compatible-unit-rec 2 / ^ math-check-unit-name 4] 5])
(defalias 'math-convert-units #[(expr math-cu-new-units &optional math-cu-pure) "\242\306=\203A@\307 \236\211A@\242\310=\203	A@)\311\n\312\\?\205*\313\f\"\314\211\211\203a\315\316\211\315\317\f\320@A\"\"!\320A\"\"\315\321\320\317@\"A\"\314\"!\"!\202\225\322!\211\203p\312@8\f\242\310=\203{\315\f!\323\f\324\"\203\210\325\f!\202\225\326\321\327\fE\314\"$,!\207" [math-cu-new-units unew calc-internal-prec math-cu-pure expr math-combining-units var math-build-units-table + math-normalize 2 math-find-compatible-unit nil math-simplify-units math-mul math-div math-pow math-to-standard-units math-decompose-units math-units-in-expr-p t math-convert-units-rec math-apply-units / math-cu-unit-list compat] 11])
(defalias 'math-convert-units-rec #[(expr) "\305\306\"\203\307\310\311	E\306\"	\n$\207\211:?\206 \f@\312>)\203&\207@\313\314A\"B\207" [expr math-cu-new-units math-cu-unit-list math-cu-pure a math-units-in-expr-p nil math-apply-units math-to-standard-units / (bigpos bigneg frac float cplx polar hms date mod var) mapcar math-convert-units-rec] 6])
(defalias 'math-convert-temperature #[(expr old new &optional pure) "\306!\n\203!	\203\nA@	@\232\203\307\n!\202\"\310\311!\202\"	\307\f!\211:\2032\312
8\2046\310\313!\210:\203A\3128\204E\310\314!\210@\315\316\317\320\321!P!EE)\3128\312
8=\204\274\3128\322=\203\204\323\324E\312
8\325=\203\274\326\327\330E\331E\202\274\3128\332=\203\247\312
8\325=\203\237\326\327\333E\331E\202\274\326\334E\202\274\327\323\331E\335E\312
8\322=\203\274\326\336E \203\305\202\311\327\fE+\207" [expr units old uold new unew math-single-units-in-expr-p math-check-unit-name error "Inconsistent temperature units" 3 "Not a valid temperature unit" "Not a pure temperature expression" / var intern "var-" symbol-name K - (/ 27315 100) F + * (/ 9 5) 32 C (/ 9 5) (/ 27315 100) (/ 5 9) (/ 27315 100) v pure] 9])
(defalias 'math-simplify-units #[(a) "\303\304\305\n!*\207" [calc-matrix-mode math-simplifying-units a t scalar math-simplify] 2])
(byte-code "\300\301\302\"\210\303\304\305\304\305N\306C\244#\210\303\307\305\307\305N\310C\244#\210\303\311\305\311\305N\312C\244#\207" [defalias calcFunc-usimplify math-simplify-units put + math-simplify #[#1=(math-simplify-expr) "\205H\304	A@\305\"\205H\306	A@!\307\310\311\312	8\nE\305\"!\304\305\"\203/\313\314	\"\210	\202G\315\316\317	A@!	@\320=\203C\321!\202D\"\nE*\207" [math-simplifying-units math-simplify-expr units ratio math-units-in-expr-p nil math-extract-units math-simplify math-to-standard-units / 2 calc-record-why #2="*Inconsistent units" * math-add math-remove-units - math-neg] 5] - #[#1# "\205H\304	A@\305\"\205H\306	A@!\307\310\311\312	8\nE\305\"!\304\305\"\203/\313\314	\"\210	\202G\315\316\317	A@!	@\320=\203C\321!\202D\"\nE*\207" [math-simplifying-units math-simplify-expr units ratio math-units-in-expr-p nil math-extract-units math-simplify math-to-standard-units / 2 calc-record-why #2# * math-add math-remove-units - math-neg] 5] * #[#1# "\300 \207" [math-simplify-units-prod] 1]] 5)
(defalias 'math-simplify-units-prod #[nil "\205\206	\205\206\nA@\211:?\206@\306>)\205\206\307\nA@!\310\f!\nAA\211@\n@\311=\2038\312\2029\313\314\242\311=\203OA\211@\242\315=\203q\3168\250\203q\3168_A\211@\317!\211\205\204
\250\205\204
\320W\204\230
@\321=\203\223\312\202\224\322Y\205\204\320\320W\203\251\323 !\202\253 \211!\"\314\211#$@A@=\204\325\316\324A@!\320H \236A@8_
\\\"\203F\"@@\325>\204=\"@@\326=\203\371@\321=\203=
\316\"@A@8_\211#W\204=\327\"@@\320=\203@\202'\330\"@@!\324@!P!$\"@@\320U\204F$A@%\236\203F\"A\211\"\204\337\"\205\203#U?\205\203\"!=\203j
#\331!\322_\\W\205\203\nA\314&\332\nA@#Z\")\240\210$\240\210\n-.\207" [math-simplifying-units calc-autorange-units math-simplify-expr a num xpon (bigpos bigneg frac float) math-float calcFunc-xpon * 1 -1 nil ^ 2 math-check-unit-name 0 m 3 reverse symbol-name (100 68 104 72) 99 math-build-var-name char-to-string math-abs calcFunc-scf unitp unit pow u uxpon math-unit-prefixes pref p pxpon pname math-units-table calc-prefer-frac] 6])
(byte-code "\300\301\302\301\302N\303C\244#\207" [put / math-simplify #[(math-simplify-expr) "\205\221	A\306\307\211\310	8\242\311=\203\310	8A\202 	AA\312@!\203>	A\313	A@\307\314\315@\")\"\240\210\315\240\210
@\211\242\311=\203X\316A	AA\"\210AA\211\202?\316
	AA\"\210\f\306=\203\205\307\317\320	\307\"!\211\211:?\206}@\321>)\203\204*	\242\322=\203\217\323 \210	,\207" [math-simplifying-units math-simplify-expr nn n math-try-cancel-units np 0 nil 2 * math-realp math-mul math-div 1 math-simplify-units-divisor math-simplify math-to-standard-units (bigpos bigneg frac float cplx polar) / math-simplify-units-prod calc-prefer-frac base a] 7]] 5)
(defalias 'math-simplify-units-divisor #[(np dp) "@\306\211\211
@\211\242\307=\2031\310\fA@\"\211\203)	\211\240\210A\311\240\210AA\211\202\n\310\f\"\211\205C	\211\240\210
\311\240,\207" [np temp dd d n dp nil * math-simplify-units-quotient 1] 5])
(defalias 'math-simplify-units-quotient #[(n d) "\306\211\n\242\307=\203\310\n8\250\203\310\n8\nA@\242\307=\2030\3108\250\2030\3108A@\311\n!\311!\211\205\260\f\205\260\312
8\312\f8\232\203m	=\203m	\306=\203`\313\314\nE\315\"\202\260\307\313\314\nE\315\"	E\202\260\315\312
8\312\f8
\203\256\f\211\203\247
@@@@=\203\236
@A	_\f@A_Z\\A\211\204\203
A\211\204|)\315,\207" [pow2 pow1 n d ud un 1 ^ 2 math-check-unit-name 4 math-to-standard-units / nil ud1 math-try-cancel-units] 6])
(byte-code "\300\301\302\301\302N\303C\244#\210\300\304\302\304\302N\305C\244#\210\300\306\302\306\302N\307C\244#\210\300\310\302\310\302N\311C\244#\210\300\312\302\312\302N\313C\244#\210\300\314\302\314\302N\315C\244#\210\300\316\302\316\302N\317C\244#\210\300\320\302\320\302N\321C\244#\210\300\322\302\322\302N\323C\244#\210\300\324\302\324\302N\325C\244#\210\300\326\302\326\302N\327C\244#\210\300\330\302\330\302N\331C\244#\207" [put ^ math-simplify #[#1=(math-simplify-expr) "\2057\302\303	8!\2057	A@\242\304>\203/	A@@\305	A@A@\303	8E\305\303	A@8\303	8EE\207\306	A@\303	8\"\207" [math-simplifying-units math-simplify-expr math-realp 2 (* /) ^ math-simplify-units-pow] 6] calcFunc-sqrt #[#1# "\205'	A@\242\302>\203!	A@@\303	A@A@D\303\304	A@8DE\207\305	A@\306\"\207" [math-simplifying-units math-simplify-expr (* /) calcFunc-sqrt 2 math-simplify-units-pow (frac 1 2)] 5] calcFunc-floor #[#1# "\205Q	G\302U\205Q\303	A@!\203	A@\207	A@\242\304>\205Q\303	A@A@!\2044\303\302	A@8!\205Q	A@@	@	A@A@	AABB	@\302	A@8	AABBE\207" [math-simplifying-units math-simplify-expr 2 math-only-units-in-expr-p #2=(* /)] 5] calcFunc-ceil #[#1# "\205Q	G\302U\205Q\303	A@!\203	A@\207	A@\242\304>\205Q\303	A@A@!\2044\303\302	A@8!\205Q	A@@	@	A@A@	AABB	@\302	A@8	AABBE\207" [math-simplifying-units math-simplify-expr 2 math-only-units-in-expr-p #2#] 5] calcFunc-round #[#1# "\205Q	G\302U\205Q\303	A@!\203	A@\207	A@\242\304>\205Q\303	A@A@!\2044\303\302	A@8!\205Q	A@@	@	A@A@	AABB	@\302	A@8	AABBE\207" [math-simplifying-units math-simplify-expr 2 math-only-units-in-expr-p #2#] 5] calcFunc-rounde #[#1# "\205Q	G\302U\205Q\303	A@!\203	A@\207	A@\242\304>\205Q\303	A@A@!\2044\303\302	A@8!\205Q	A@@	@	A@A@	AABB	@\302	A@8	AABBE\207" [math-simplifying-units math-simplify-expr 2 math-only-units-in-expr-p #2#] 5] calcFunc-roundu #[#1# "\205Q	G\302U\205Q\303	A@!\203	A@\207	A@\242\304>\205Q\303	A@A@!\2044\303\302	A@8!\205Q	A@@	@	A@A@	AABB	@\302	A@8	AABBE\207" [math-simplifying-units math-simplify-expr 2 math-only-units-in-expr-p #2#] 5] calcFunc-trunc #[#1# "\205Q	G\302U\205Q\303	A@!\203	A@\207	A@\242\304>\205Q\303	A@A@!\2044\303\302	A@8!\205Q	A@@	@	A@A@	AABB	@\302	A@8	AABBE\207" [math-simplifying-units math-simplify-expr 2 math-only-units-in-expr-p #2#] 5] calcFunc-float #[#1# "\205Q	G\302U\205Q\303	A@!\203	A@\207	A@\242\304>\205Q\303	A@A@!\2044\303\302	A@8!\205Q	A@@	@	A@A@	AABB	@\302	A@8	AABBE\207" [math-simplifying-units math-simplify-expr 2 math-only-units-in-expr-p #2#] 5] calcFunc-frac #[#1# "\205Q	G\302U\205Q\303	A@!\203	A@\207	A@\242\304>\205Q\303	A@A@!\2044\303\302	A@8!\205Q	A@@	@	A@A@	AABB	@\302	A@8	AABBE\207" [math-simplifying-units math-simplify-expr 2 math-only-units-in-expr-p #2#] 5] calcFunc-abs #[#1# "\205Q	G\302U\205Q\303	A@!\203	A@\207	A@\242\304>\205Q\303	A@A@!\2044\303\302	A@8!\205Q	A@@	@	A@A@	AABB	@\302	A@8	AABBE\207" [math-simplifying-units math-simplify-expr 2 math-only-units-in-expr-p #2#] 5] calcFunc-clean #[#1# "\205Q	G\302U\205Q\303	A@!\203	A@\207	A@\242\304>\205Q\303	A@A@!\2044\303\302	A@8!\205Q	A@@	@	A@A@	AABB	@\302	A@8	AABBE\207" [math-simplifying-units math-simplify-expr 2 math-only-units-in-expr-p #2#] 5]] 5)
(defalias 'math-simplify-units-pow #[(a pow) "\242\305=\203#\306A@!\203#\307\3108!\203#\305A@\311	\3108\"E\207\306!\312	!\211\242\313=\2055\3108\n\205L\f\205L\314\n\f\"\205L\305\315\316\"	E+\207" [a pow u pf d ^ math-check-unit-name math-realp 2 math-mul math-to-simple-fraction frac math-units-are-multiple math-to-standard-units nil] 7])
(defalias 'math-units-are-multiple #[(u n) "\3028\211\203@A	\246\303U\203A\211\204?\207" [u n 4 0] 3])
(byte-code "\300\301\302\301\302N\303C\244#\210\300\304\302\304\302N\305C\244#\210\300\306\302\306\302N\307C\244#\210\300\310\302\310\302N\311C\244#\210\300\312\302\312\302N\313C\244#\210\300\314\302\314\302N\315C\244#\207" [put calcFunc-sin math-simplify #[#1=(math-simplify-expr) "\205B\304	A@\305\"\205B\306\307\310	A@\305\"!!\303\211\242\311=\205A\312A@!\205A\3138\242\314=\205A\3138A@\303=\205A\315A@D*\207" [math-simplifying-units math-simplify-expr calc-angle-mode rad math-units-in-expr-p nil math-simplify-units math-evaluate-expr math-to-standard-units * math-realp 2 var calcFunc-sin] 6] calcFunc-cos #[#1# "\205B\304	A@\305\"\205B\306\307\310	A@\305\"!!\303\211\242\311=\205A\312A@!\205A\3138\242\314=\205A\3138A@\303=\205A\315A@D*\207" [math-simplifying-units math-simplify-expr calc-angle-mode rad math-units-in-expr-p nil math-simplify-units math-evaluate-expr math-to-standard-units * math-realp 2 var calcFunc-cos] 6] calcFunc-tan #[#1# "\205B\304	A@\305\"\205B\306\307\310	A@\305\"!!\303\211\242\311=\205A\312A@!\205A\3138\242\314=\205A\3138A@\303=\205A\315A@D*\207" [math-simplifying-units math-simplify-expr calc-angle-mode rad math-units-in-expr-p nil math-simplify-units math-evaluate-expr math-to-standard-units * math-realp 2 var calcFunc-tan] 6] calcFunc-sec #[#1# "\205B\304	A@\305\"\205B\306\307\310	A@\305\"!!\303\211\242\311=\205A\312A@!\205A\3138\242\314=\205A\3138A@\303=\205A\315A@D*\207" [math-simplifying-units math-simplify-expr calc-angle-mode rad math-units-in-expr-p nil math-simplify-units math-evaluate-expr math-to-standard-units * math-realp 2 var calcFunc-sec] 6] calcFunc-csc #[#1# "\205B\304	A@\305\"\205B\306\307\310	A@\305\"!!\303\211\242\311=\205A\312A@!\205A\3138\242\314=\205A\3138A@\303=\205A\315A@D*\207" [math-simplifying-units math-simplify-expr calc-angle-mode rad math-units-in-expr-p nil math-simplify-units math-evaluate-expr math-to-standard-units * math-realp 2 var calcFunc-csc] 6] calcFunc-cot #[#1# "\205B\304	A@\305\"\205B\306\307\310	A@\305\"!!\303\211\242\311=\205A\312A@!\205A\3138\242\314=\205A\3138A@\303=\205A\315A@D*\207" [math-simplifying-units math-simplify-expr calc-angle-mode rad math-units-in-expr-p nil math-simplify-units math-evaluate-expr math-to-standard-units * math-realp 2 var calcFunc-cot] 6]] 5)
(defalias 'math-remove-units #[(expr) "\302!\203\303\207\211:?\206	@\304>)\203\207@\305\306A\"B\207" [expr a math-check-unit-name 1 (bigpos bigneg frac float cplx polar hms date mod var) mapcar math-remove-units] 5])
(defalias 'math-extract-units #[(expr) "\242\301>\203@\302\303A\"B\207\242\304=\203!\305A@!\203!\207\305!\203)\207\306\207" [expr (* /) mapcar math-extract-units ^ math-check-unit-name 1] 4])
(defalias 'math-build-units-table-buffer #[(enter-buffer) "\203	\203\306\307!\204\303\310\307!\311 \n\312=?\205\n\313\314\315\314\316\314\211\211\211:;<=>?@A\212\317\320!\210Aq\210\321B\322 \210\323c\210\324c\210\325c\210@\203+@@\326
8
@\327=\203g\321::\205q
@C\236\f\203\224\fG\330V\203\224\f\331H\332=\203\224@=\204\217\333c\210\f\330\314O\334c\210\203\236\335c\210\336
@!c\210\203\253\337c\210\340
8\203\276\315j\210\336\340
8!c\210\202\311:\204\311\315j\210\341c\210\342j\210\203\323\335c\210\343
8\203\341\343
8c\210\202\370
A@\203\362\344
A@\345\"c\210\202\370\336
@!c\210\203\377\337c\210\346j\210\334c\210\f\203\f\fc\210\203\347c\210\202
A@\204\350c\210\333c\210@A\211@\204U\351c\210D@@\203\213@@\334\352
@!\261\210
A@@A@A@\232\203b\334\352@A\211@@@!\353\261\210\202e\354c\210\355\356\326
A@8!\261\210\357j\210\353\326
8\333\261\210@A\211@@@\331=\204{\2022\360c\210\361\362\363\364\365\261\210)\366 \210\317\367!\210)\321pEAq\210eb\210Eq\210)F\203\274\370A!\202\300\371A!.\f\207F\203\316\370\306\307!!\207\371\306\307!!\207" [math-units-table math-units-table-buffer-valid calc-language shadowed name u get-buffer "*Units Table*" get-buffer-create math-build-units-table big (float 0) nil 10 "." message "Formatting units table..." t erase-buffer "Calculator Units Table:\n\n" "(All definitions are exact unless marked with an asterisk (*).)\n\n" "Unit    Type  Definition                  Description\n\n" 2 m 1 0 42 "\n" " " "(" symbol-name ")" 3 "U" 14 5 math-format-value 80 41 " (redefined above)" " (base unit)" "\n\nUnit Prefix Table:\n\n" char-to-string "   " "     " "10^" int-to-string 15 "\n\n" "(**) When in TeX or LaTeX display mode, the TeX specific unit\n" "names will not use the `tex' prefix; the unit name for a\n" "TeX point will be `pt' instead of `texpt', for example.\n" "To avoid conflicts, the unit names for pint and parsec will\n" "be `pint' and `parsec' instead of `pt' and `pc'." view-mode "Formatting units table...done" pop-to-buffer display-buffer std calc-point-char calc-twos-complement-mode calc-number-radix calc-group-digits calc-float-format uptr buf inhibit-read-only math-additional-units math-unit-prefixes oldbuf enter-buffer] 13])
(defvar math-logunits '((var dB var-dB) (var Np var-Np)))
#@88 Evaluate f(args) unless in symbolic mode.
In symbolic mode, return the list (fn args).
(defalias 'math-conditional-apply #[(fn &rest args) "\203	\nB\207\303	\n\"\207" [calc-symbolic-mode fn args apply] 3 (#$ . 40388)])
#@82 Evaluate a^b unless in symbolic mode.
In symbolic mode, return the list (^ a b).
(defalias 'math-conditional-pow #[(a b) "\203	\303	\nE\207\304	\n\"\207" [calc-symbolic-mode a b ^ math-pow] 3 (#$ . 40616)])
(defalias 'math-extract-logunits #[(expr) "\242\302>\203@\303\304A\"B\207\242\305>\203\"\306\304A@!\3078E\207	\235\203*\207\310\207" [expr math-logunits (* /) mapcar math-extract-logunits (^) ^ 2 1] 4])
(defalias 'math-logunits-add #[(a b neg power) "\306\307!!\211\242\310=\204\311\312	\"\202\335\313!\306\314!!\306\315\316\f\nE\317\"!\320
\317\"\2036\311\321\317\"\202\334#\203P\322
\"\204I\323
\"\203P\311\324\317\"\202\334\325	\326\232\203\232$\203`\327\202a\330%\325%\331\332#\203\202\333\334\327\335%\"\"\334\327\335
%\"\"\"\202\224\336\334\327\335%\"\"\334\327\335
%\"\"\"\"\")\202\332$\203\243\337\202\244\340%\335\331\341#\203\303\333\331\342\325%\"\"\331\342\325%
\"\"\"\202\325\336\331\342\325%\"\"\331\342\325%
\"\"\"\"%\")\n\"+)\207" [a aunit units acoeff b bcoeff math-simplify math-extract-logunits var calc-record-why "*Improper logarithmic unit" math-extract-units math-remove-units math-to-standard-units / nil math-units-in-expr-p "*Inconsistent units" math-lessp math-equal "*Improper coefficients" math-mul (var dB var-dB) 10 20 math-conditional-apply calcFunc-log10 math-sub math-conditional-pow math-div math-add 2 1 calcFunc-ln calcFunc-exp neg power coef] 13])
(defalias 'calcFunc-lufadd #[(a b) "\302	\303\211$\207" [a b math-logunits-add nil] 5])
(defalias 'calcFunc-lupadd #[(a b) "\302	\303\304$\207" [a b math-logunits-add nil t] 5])
(defalias 'calcFunc-lufsub #[(a b) "\302	\303\304$\207" [a b math-logunits-add t nil] 5])
(defalias 'calcFunc-lupsub #[(a b) "\302	\303\211$\207" [a b math-logunits-add t] 5])
(defalias 'calc-lu-plus #[(arg) "\300\301`\"\207" [calc-do #[nil "\301 \203\302 \203\303\304\305#\207\303\304\306#\207\302 \203!\303\307\310#\207\303\307\311#\207" [arg calc-is-inverse calc-is-hyperbolic calc-binary-op "lu-" calcFunc-lufsub calcFunc-lupsub "lu+" calcFunc-lufadd calcFunc-lupadd] 4]] 3 nil "P"])
(defalias 'calc-lu-minus #[(arg) "\300\301`\"\207" [calc-do #[nil "\301 \203\302 \203\303\304\305#\207\303\304\306#\207\302 \203!\303\307\310#\207\303\307\311#\207" [arg calc-is-inverse calc-is-hyperbolic calc-binary-op "lu+" calcFunc-lufadd calcFunc-lupadd "lu-" calcFunc-lufsub calcFunc-lupsub] 4]] 3 nil "P"])
(defalias 'math-logunits-mul #[(a b power) "\306\211\211\211\307\310\f!!\211\2032\242\311=\2032\307\312
!!\313=\2032\307\314\f!!\312\f!
\202^\307\310
!!\211\203\\\242\311=\203\\\307\312\f!!\313=\203\\\307\314
!!\312
!\f\202^\306\203\236\315\232\203\203\307\316\317\n\316\203v\320\202w\321\322\323\"\"\"	\"!\202\242\307\316\317\n\324\322\325\"\203\225\326\202\226\313\"\"	\"!\202\242\327\330\306\",\207" [number units coef logunit a b nil math-simplify math-extract-logunits var math-extract-units 1 math-remove-units (var dB var-dB) math-mul math-add 10 20 math-conditional-apply calcFunc-log10 math-div calcFunc-ln 2 calc-record-why "*Improper units" power] 9])
(defalias 'math-logunits-divide #[(a b power) "\306\307!!\211\242\310=\204\311\312	\"\202d\313\n\314\"\203\"\311\315\n\"\202d\316!\306\317!!	\320\232\203L\306\321\322\f\321
\203?\323\202@\324\325\326\n\"\"\"\"!\202c\306\321\322\f\327\325\330\n\"
\203]\331\202^\332\"\"\"!*)\207" [a logunit b units coef power math-simplify math-extract-logunits var calc-record-why "*Improper logarithmic unit" math-units-in-expr-p nil "*Improper units quantity" math-extract-units math-remove-units (var dB var-dB) math-mul math-sub 10 20 math-conditional-apply calcFunc-log10 math-div calcFunc-ln 2 1] 10])
(defalias 'calcFunc-lufmul #[(a b) "\302	\303#\207" [a b math-logunits-mul nil] 4])
(defalias 'calcFunc-lupmul #[(a b) "\302	\303#\207" [a b math-logunits-mul t] 4])
(defalias 'calc-lu-times #[(arg) "\300\301`\"\207" [calc-do #[nil "\301 \203\302 \203\303\304\305#\207\303\304\306#\207\302 \203!\303\307\310#\207\303\307\311#\207" [arg calc-is-inverse calc-is-hyperbolic calc-binary-op "lu/" calcFunc-lufdiv calcFunc-lupdiv "lu*" calcFunc-lufmul calcFunc-lupmul] 4]] 3 nil "P"])
(defalias 'calcFunc-lufdiv #[(a b) "\302	\303#\207" [a b math-logunits-divide nil] 4])
(defalias 'calcFunc-lupdiv #[(a b) "\302	\303#\207" [a b math-logunits-divide t] 4])
(defalias 'calc-lu-divide #[(arg) "\300\301`\"\207" [calc-do #[nil "\301 \203\302 \203\303\304\305#\207\303\304\306#\207\302 \203!\303\307\310#\207\303\307\311#\207" [arg calc-is-inverse calc-is-hyperbolic calc-binary-op "lu*" calcFunc-lufmul calcFunc-lupmul "lu/" calcFunc-lufdiv calcFunc-lupdiv] 4]] 3 nil "P"])
(defalias 'math-logunits-quant #[(val ref power) "\306\307!!\306\310	!!\211\242\311=\204\312\313\n\"\202[\306\314	\n\"!\306\314	\"!\315\n\316\232\203E\315
\317\320\314\203>\320\202?\321\"\"\"\202X\315
\322\323\203U\315\324\"\202V\"\"\f\"**\207" [val units lunit coeff runits ref math-simplify math-extract-units math-extract-logunits var calc-record-why "*Improper logarithmic unit" math-div math-mul (var dB var-dB) math-conditional-pow 10 20 math-conditional-apply calcFunc-exp 2 power] 9])
(defalias 'calcFunc-lufquant #[(val &optional ref) "\204\303	!\304\n\305#\207" [ref calc-lu-field-reference val math-read-expr math-logunits-quant nil] 4])
(defalias 'calcFunc-lupquant #[(val &optional ref) "\204\303	!\304\n\305#\207" [ref calc-lu-power-reference val math-read-expr math-logunits-quant t] 4])
(defalias 'calc-lu-quant #[(arg) "\300\301`\"\207" [calc-do #[nil "\301 \203\302 \203\303\304\305#\207\306\304\305#\207\302 \203!\303\307\310#\207\306\307\310#\207" [arg calc-is-hyperbolic calc-is-option calc-binary-op "lupq" calcFunc-lufquant calc-unary-op "lufq" calcFunc-lupquant] 4]] 3 nil "P"])
#@49 Compute the value of VAL in decibels or nepers.
(defalias 'math-logunits-level #[(val ref db power) "\306\307	\"!\306\310\n!!\311\312\n!!\313
\203.\313\211\203#\314\202$\315\316\317\"\"\320\"\202A\313\307\316\321\"\203=\322\202>\323\"\324\"\f\"+\207" [val ref ratio ratiou units db math-simplify-units math-div math-remove-units math-simplify math-extract-units math-mul 10 20 math-conditional-apply calcFunc-log10 (var dB var-dB) calcFunc-ln 2 1 (var Np var-Np) power] 7 (#$ . 46523)])
(defalias 'calcFunc-dbfield #[(val &optional ref) "\204\303	!\304\n\305\306$\207" [ref calc-lu-field-reference val math-read-expr math-logunits-level t nil] 5])
(defalias 'calcFunc-dbpower #[(val &optional ref) "\204\303	!\304\n\305\211$\207" [ref calc-lu-power-reference val math-read-expr math-logunits-level t] 5])
(defalias 'calcFunc-npfield #[(val &optional ref) "\204\303	!\304\n\305\211$\207" [ref calc-lu-field-reference val math-read-expr math-logunits-level nil] 5])
(defalias 'calcFunc-nppower #[(val &optional ref) "\204\303	!\304\n\305\306$\207" [ref calc-lu-power-reference val math-read-expr math-logunits-level nil t] 5])
(defalias 'calc-db #[(arg) "\300\301`\"\207" [calc-do #[nil "\301 \203\302 \203\303\304\305#\207\306\304\305#\207\302 \203!\303\304\307#\207\306\304\307#\207" [arg calc-is-hyperbolic calc-is-option calc-binary-op "ludb" calcFunc-dbfield calc-unary-op calcFunc-dbpower] 4]] 3 nil "P"])
(defalias 'calc-np #[(arg) "\300\301`\"\207" [calc-do #[nil "\301 \203\302 \203\303\304\305#\207\306\304\305#\207\302 \203!\303\304\307#\207\306\304\307#\207" [arg calc-is-hyperbolic calc-is-option calc-binary-op "lunp" calcFunc-npfield calc-unary-op calcFunc-nppower] 4]] 3 nil "P"])
#@76 Round NUM to an integer N if NUM is within calc-note-threshold cents of N.
(defalias 'math-midi-round #[(num) "\304!\305\306	\"!\307\n\310\311!\312\"\"\313W\203	\202*\207" [num n diff calc-note-threshold math-round math-abs math-sub math-compare math-div math-read-expr 100 0] 5 (#$ . 48278)])
#@59 An alist of notes with their number of semitones above C.
(defconst math-notes '(((var C var-C) . 0) ((var Csharp var-Csharp) . 1) ((var Dflat var-Dflat) . 1) ((var D var-D) . 2) ((var Dsharp var-Dsharp) . 3) ((var E var-E) . 4) ((var F var-F) . 5) ((var Fsharp var-Fsharp) . 6) ((var Gflat var-Gflat) . 6) ((var G var-G) . 7) ((var Gsharp var-Gsharp) . 8) ((var A var-A) . 9) ((var Asharp var-Asharp) . 10) ((var Bflat var-Bflat) . 10) ((var B var-B) . 11)) (#$ . 48588))
#@99 Non-nil if FREQ is a positive number times the unit Hz.
If non-nil, return the coefficient of Hz.
(defalias 'math-freqp #[(freq) "\303\304\305\"!\211\211:\203A\n@\306=\206D\n@\307=?\205D\n@\310>\203;\nA@\211:\2034\n@\306=\2027\n\311V)\202D\312\n!\202D\n\311V)\205I	)\207" [freq freqcoef a math-simplify-units math-div (var Hz var-Hz) bigpos bigneg (frac float) 0 math-posp] 5 (#$ . 49067)])
#@72 Non-nil if NUM is a possible MIDI note number.
If non-nil, return NUM.
(defalias 'math-midip #[(num) "\211:?\206\f	@\302>)\205\207" [num a (bigpos bigneg frac float cplx polar)] 3 (#$ . 49477)])
#@135 Non-nil if NUM is a scientific pitch note (note + cents).
If non-nil, return a list consisting of the note and the cents coefficient.
(defalias 'math-spnp #[(spn) "\306\211\211\211\f\242\307=\203\fA@\310\f8\202\f\306\242\311=\203^\312A@
\"\203^\3108\250\203^\211\203^\n\203X\313\314\n\315\"!\211\211:?\206T@\316>)\203^	D\202\233\n\242\311=\205\233\312\nA@
\"\205\233\310\n8\250\205\233\n\211\205\233\203\230\313\314\317\"!\211\211:?\206\224@\316>)\205\233	D,\207" [rcents rnote cents note spn math-notes nil + 2 calcFunc-subscr assoc math-simplify math-div (var cents var-cents) (bigpos bigneg frac float cplx polar) (var cents var-cents) a] 5 (#$ . 49685)])
#@55 Return the midi note number corresponding to FREQ Hz.
(defalias 'math-freq-to-midi #[(freq) "\302\303\304\305\306\307\310\"\311\"\"\"\312	!)\207" [freq midi math-add 69 math-mul 12 calcFunc-log math-div 440 2 math-midi-round] 8 (#$ . 50397)])
#@46 Return the MIDI number corresponding to SPN.
(defalias 'math-spn-to-midi #[(spn) "\306@A@	\"A\307\310@8\311\"A@\307\312\313\"\n\"\f\203+\307
\314\f\315\"\"\202,
,\207" [spn math-notes note octave cents midi assoc math-add 2 1 math-mul 12 math-div 100] 5 (#$ . 50648)])
#@73 Return the scientific pitch notation corresponding to midi number MIDI.
(defalias 'math-midi-to-spn #[(midi) "\306\211\307\n!\203\n\306\202\310\n!\311\312\313\n	\"\"	\211:\203W@\314=\206Z@\315=?\205Z@\316>\203QA@\211:\203J@\314=\202M\317W)\202Z\320!\202Z\317W)\203\206\321\322	!\323\"\211A\317U\203u\322\f@!\317B\202\202\313\322\f@!\324\"\313\323\fA\"B)\202\212\321	\323\"\313
@\324\"\325
A\"@\203\256\326\327E\330\331EE\202\264\327E-\207" [cents midin midi a dm nr nil math-integerp math-floor math-mul 100 math-sub bigneg bigpos (frac float) 0 math-negp math-idivmod math-neg 12 1 rassoc + calcFunc-subscr * (var cents var-cents) n math-notes note] 6 (#$ . 50933)])
#@64 Return the scientific pitch notation corresponding to FREQ Hz.
(defalias 'math-freq-to-spn #[(freq) "\302\303\\\304\305	!!)!\207" [calc-internal-prec freq math-normalize 3 math-midi-to-spn math-freq-to-midi] 4 (#$ . 51659)])
#@57 Return the frequency of the note with midi number MIDI.
(defalias 'math-midi-to-freq #[(midi) "\301\302\303\304\305\306\307\310\"\311\"\"\"\312E\207" [midi * math-mul 440 math-pow 2 math-div math-sub 69 12 (var Hz var-Hz)] 9 (#$ . 51892)])
#@70 Return the frequency of the note with scientific pitch notation SPN.
(defalias 'math-spn-to-freq #[(spn) "\301\302!!\207" [spn math-midi-to-freq math-spn-to-midi] 3 (#$ . 52139)])
#@59 Return EXPR written as scientific pitch notation + cents.
(defalias 'calcFunc-spn #[(expr) "\302\303	!\211\203\304!\202,\305	!\211\203\306!\202,\307	!\203(	\202,\310	\311\")\207" [note expr nil math-freqp math-freq-to-spn math-midip math-midi-to-spn math-spnp math-reject-arg "*Improper expression"] 3 (#$ . 52326)])
#@39 Return EXPR written as a MIDI number.
(defalias 'calcFunc-midi #[(expr) "\302\303	!\211\203\304!\202,\305	!\211\203\306!\202,\307	!\203(	\202,\310	\311\")\207" [note expr nil math-freqp math-freq-to-midi math-spnp math-spn-to-midi math-midip math-reject-arg "*Improper expression"] 3 (#$ . 52662)])
#@45 Return the frequency corresponding to EXPR.
(defalias 'calcFunc-freq #[(expr) "\302\303	!\211\203\304!\202,\305	!\211\203\306!\202,\307	!\203(	\202,\310	\311\")\207" [note expr nil math-midip math-midi-to-freq math-spnp math-spn-to-freq math-freqp math-reject-arg "*Improper expression"] 3 (#$ . 52980)])
#@68 Return the frequency corresponding to the expression on the stack.
(defalias 'calc-freq #[(arg) "\300\301`\"\207" [calc-do #[nil "\301\302\303#\207" [arg calc-unary-op "freq" calcFunc-freq] 4]] 3 (#$ . 53304) "P"])
#@70 Return the MIDI number corresponding to the expression on the stack.
(defalias 'calc-midi #[(arg) "\300\301`\"\207" [calc-do #[nil "\301\302\303#\207" [arg calc-unary-op "midi" calcFunc-midi] 4]] 3 (#$ . 53526) "P"])
#@84 Return the scientific pitch notation corresponding to the expression on the stack.
(defalias 'calc-spn #[(arg) "\300\301`\"\207" [calc-do #[nil "\301\302\303#\207" [arg calc-unary-op "spn" calcFunc-spn] 4]] 3 (#$ . 53750) "P"])
(provide 'calc-units)

MMCT - 2023