K itdZddlmZddlmZddlmZGddeZdZedd d Z ed d d Z edddZ edddZ edddZ edddZedddZedddZed d!d"Zed#d$d%Zed&d'd(Zed)d*d+Zed,d-d.Zed/d0d1d23Zed4d5d6Zed7d8d9Zed:d;d<Zed=d>d?Zed@dAdBZedCdDdEZid e d e de de de dededed!ed$ed'ed*ed-ed0ed5ed8ed;eeeedFZedGd dHd"ZedId dJd"ZedKd dLd"Z edMd dNd"Z!edOd dPd"Z"edQd dRd"Z#eee e!e"e#dSZ$yT)Uz Module defining unit prefixe class and some constants. Constant dict for SI and binary prefixes are defined as PREFIXES and BIN_PREFIXES. )Expr)sympify)SceZdZdZdZdZeddfdZedZ edZ ed Z d Z ed Z d Zd ZfdZfdZdZxZS)Prefixa This class represent prefixes, with their name, symbol and factor. Prefixes are used to create derived units from a given unit. They should always be encapsulated into units. The factor is constructed from a base (default is 10) to some power, and it gives the total multiple or fraction. For example the kilometer km is constructed from the meter (factor 1) and the kilo (10 to the power 3, i.e. 1000). The base can be changed to allow e.g. binary prefixes. A prefix multiplied by something will always return the product of this other object times the factor, except if the other object: - is a prefix and they can be combined into a new prefix; - defines multiplication with prefixes (which is the case for the Unit class). g*@T Nct|}t|}t|}t|}tj|||||}||_||_||z|_||_||_||_|SN) rr__new___name_abbrev _scale_factor _exponent_base _latex_repr)clsnameabbrevexponentbase latex_reprobjs b/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sympy/physics/units/prefixes.pyr zPrefix.__new__!sqt}8$t}ll3fh=   (N   $ c|jSr )r selfs rrz Prefix.name1 zzrc|jSr )r rs rrz Prefix.abbrev5s ||rc|jSr )rrs r scale_factorzPrefix.scale_factor9s!!!rcP|jd|jzS|jS)Nz \text{%s})rr )rprinters r_latexz Prefix._latex=s)    #$,,. .rc|jSr )rrs rrz Prefix.baseBrrc,t|jSr )strr rs r__str__zPrefix.__str__Fs4<<  rc *|jdk(r __classcell__)r9s@rrr s$LN29"+$ "" !M)$) )rrc8ddlm}ddlm}g}|j D]x}||j |j |j |j d}||j|<|j|f|j|<|j|z|S)aK Return a list of all units formed by unit and the given prefixes. You can use the predefined PREFIXES or BIN_PREFIXES, but you can also pass as argument a subdict of them if you do not want all prefixed units. >>> from sympy.physics.units.prefixes import (PREFIXES, ... prefix_unit) >>> from sympy.physics.units import m >>> pref = {"m": PREFIXES["m"], "c": PREFIXES["c"], "d": PREFIXES["d"]} >>> prefix_unit(m, pref) # doctest: +SKIP [millimeter, centimeter, decimeter] rr-) UnitSystemT)r is_prefixed) sympy.physics.units.quantitiesr.r0rHvaluesrr,_quantity_dimensional_equivalence_map_globalr!_quantity_scale_factors_globalappend)unitprefixesr.rHprefixed_unitsprefixquantitys r prefix_unitrT{s8.N//#( ++tyy1"(--=   MQ ??I?E?R?RTX>Y 11(;h'( ryottaYzettaZexaEpetaPteraT gigaG megaMkilokhectohdecadar/decidcenticmillimmicromuiz\mu)rnanonipicor8ifemtofiattoaizeptoziyoctoyi)rrrkibirmebigibitebi(pebi2exbi<)KiMiGiTiPiEiN)%rBsympy.core.exprrsympy.core.sympifyrsympy.core.singletonrrrTrUrXr[r^rardrgrjrmrprrrurxr{r}rrrrrr5rrrrrr BIN_PREFIXESrrrs !&"m)Tm)`B wR wR  UC fc2 fc2 fc1 fc1 fc1wQ fdA fc2wR wR wbV4 fc2 fc3wS! fc3wS!wS!                $     %   ! "# $   ) 0fc2q! fc2q! fc2q! fc2q! fc2q! fc2q!        r