
    \ht                        S r SSKJr  SSKJr  SSKJr   " S S\5      rS r\" SS	S
5      r	\" SSS5      r
\" SSS5      r\" SSS5      r\" SSS5      r\" SSS5      r\" SSS5      r\" SSS5      r\" S S!S"5      r\" S#S$S%5      r\" S&S'S(5      r\" S)S*S+5      r\" S,S-S.5      r\" S/S0S1S2S39r\" S4S5S65      r\" S7S8S95      r\" S:S;S<5      r\" S=S>S?5      r\" S@SASB5      r\" SCSDSE5      r0 S	\	_S\
_S\_S\_S\_S\_S\_S\_S!\_S$\_S'\_S*\_S-\_S0\_S5\_S8\_S;\_\\\SF.Er\" SGS	SHS"5      r\" SIS	SJS"5      r\" SKS	SLS"5      r \" SMS	SNS"5      r!\" SOS	SPS"5      r"\" SQS	SRS"5      r#\\\ \!\"\#SS.r$gT)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)Sc                      ^  \ rS rSrSrSrSr\" S5      S4S jr\	S 5       r
\	S	 5       r\	S
 5       rS r\	S 5       rS rS rU 4S jrU 4S jrS rSrU =r$ )Prefix   a  
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
   Nc                     [        U5      n[        U5      n[        U5      n[        U5      n[        R                  " XX#U5      nXl        X&l        XC-  Ul        X6l        XFl        XVl        U$ N)	r   r   __new___name_abbrev_scale_factor	_exponent_base_latex_repr)clsnameabbrevexponentbase
latex_reprobjs          T/var/www/auris/envauris/lib/python3.13/site-packages/sympy/physics/units/prefixes.pyr   Prefix.__new__!   sa    t}8$t}ll3f=	 N 	$
    c                     U R                   $ r   )r   selfs    r   r   Prefix.name1       zzr   c                     U R                   $ r   )r   r   s    r   r   Prefix.abbrev5   s    ||r   c                     U R                   $ r   )r   r   s    r   scale_factorPrefix.scale_factor9   s    !!!r   c                 R    U R                   c  SU R                  -  $ U R                   $ )Nz	\text{%s})r   r   )r   printers     r   _latexPrefix._latex=   s)    #$,,..r   c                     U R                   $ r   )r   r   s    r   r   Prefix.baseB   r!   r   c                 ,    [        U R                  5      $ r   )strr   r   s    r   __str__Prefix.__str__F   s    4<<  r   c           	      :   U R                   S:X  a?  S[        U R                  5      < S[        U R                  5      < SU R                  < S3$ S[        U R                  5      < S[        U R                  5      < SU R                  < SU R                   < S3	$ )Nr	   zPrefix(z, ))r   r.   r   r   r   r   s    r   __repr__Prefix.__repr__I   sj    99?DIIDKK 0$..B B 
 DIIDKK 0$..$))M Mr   c                 b  > SSK Jn  [        X[        45      (       d  [        TU ]  U5      $ U R                  UR                  -  n[        U[        5      (       aG  US:X  a  [        R                  $ [         H%  n[        U   R                  U:X  d  M  [        U   s  $    U$ U R                  U-  $ )Nr   Quantity   )
sympy.physics.unitsr7   
isinstancer   super__mul__r%   r   OnePREFIXES)r   otherr7   factp	__class__s        r   r<   Prefix.__mul__Q   s    0%F!3447?5))  5#5#55eV$$qyuuA;++t3#A;&  K  5((r   c                 L  > [        US5      (       d  [        TU ]	  U5      $ U R                  UR                  -  nUS:X  a  [        R
                  $ [        U[        5      (       a1  [         H%  n[        U   R                  U:X  d  M  [        U   s  $    U$ U R                  U-  $ )Nr%   r8   )	hasattrr;   __truediv__r%   r   r=   r:   r   r>   )r   r?   r@   rA   rB   s       r   rF   Prefix.__truediv__c   s    un--7&u--  5#5#551955Lv&&A;++t3#A;&  K  5((r   c                     US:X  a<  [          H2  n[         U   R                  SU R                  -  :X  d  M)  [         U   s  $    XR                  -  $ )Nr8   )r>   r%   )r   r?   rA   s      r   __rtruediv__Prefix.__rtruediv__s   sK    A:A;++q43D3D/DD#A;&  ((((r    )__name__
__module____qualname____firstlineno____doc___op_priorityis_commutativer   r   propertyr   r   r%   r)   r   r/   r3   r<   rF   rI   __static_attributes____classcell__)rB   s   @r   r   r      s    $ LN29"+$       " " 
  !M)$) ) )r   r   c                 <   SSK Jn  SSKJn  / nUR	                  5        Hy  nU" UR
                  < U R
                  < 3UR                  < U R                  < 3SS9nXR                  U'   UR                  U 4UR                  U'   UR                  U5        M{     U$ )a#  
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]
r   r6   )
UnitSystemT)r   is_prefixed)sympy.physics.units.quantitiesr7   r9   rW   valuesr   r   ,_quantity_dimensional_equivalence_map_globalr%   _quantity_scale_factors_globalappend)unitprefixesr7   rW   prefixed_unitsprefixquantitys          r   prefix_unitrc   {   s     8.N//# ++tyy1"(--= 
 MQ??I?E?R?RTX>Y
11(;h' $ r   yottaY   zettaZ   exaE   petaP   teraT   gigaG	   megaM   kilok   hectoh   decadar8   decidcenticmillimmicromuiz\mu)r   nanonipicorA   ifemtofiattoaizeptoziyoctoyi)r   r   r   kibir	   mebi   gibi   tebi(   pebi2   exbi<   )KiMiGiTiPiEiN)%rP   sympy.core.exprr   sympy.core.sympifyr   sympy.core.singletonr   r   rc   rd   rg   rj   rm   rp   rs   rv   ry   r|   r   r   r   r   r   r   r   r   r   r   r   r>   r   r   r   r   r   r   BIN_PREFIXESrK   r   r   <module>r      s   ! & "m)T m)`B 	wR wR UCfc2fc2fc1fc1fc1wQfdAfc2wR wR wbV4fc2fc3wS!fc3wS!wS!  	
      	$    	%   !" #$ 
		)0 fc2q!fc2q!fc2q!fc2q!fc2q!fc2q!
 




r   