KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21571/root/usr/lib64/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21571/root/usr/lib64/python2.4/fpformat.pyc
mò
‚=5Dc@sdZdkZdddgZeidƒZydefd„ƒYZWnej
o
dZnXd„Zd	„Z	d
„Z
d„Zd„Zd
„Z
dS(s8General floating point formatting functions.

Functions:
fix(x, digits_behind)
sci(x, digits_behind)

Each takes a number or a string and a number of digits as arguments.

Parameters:
x:             number to be formatted; or a string resembling a number
digits_behind: number of digits behind the decimal point
Ntfixtscit
NotANumbers-^([-+]?)0*(\d*)((?:\.\d*)?)(([eE][-+]?\d+)?)$cBstZRS(N(t__name__t
__module__(((t /usr/lib64/python2.4/fpformat.pyRssfpformat.NotANumbercCsªti|ƒ}|djo
t|‚n|iddddƒ\}}}}|djo
d}n|o|d}n|ot|dƒ}nd}||||fS(	sÅReturn (sign, intpart, fraction, expo) or raise an exception:
    sign is '+' or '-'
    intpart is 0 or more digits beginning with a nonzero
    fraction is 0 or more digits
    expo is an integeriiiit+tiN(
tdecodertmatchtstrestNoneRtgrouptsigntintparttfractiontexpparttinttexpo(R
RRRRRR((Rtextract s

$

cCs¾|djoLt|ƒ}||| ||}}||jo|d||}q´n\|djoNt|ƒ}|| |||}}||jod|||}q´n||fS(s5Remove the exponent by changing intpart and fraction.it0N(RtlenRtfRti(RRRRR((Rtunexpo/s


cCspt|ƒ}||jo||d||fSnt|ƒ}||djod|dfSn||}|||}|djo®||d}xL|djo$||djoPn|d}q™Wd|}|d}d}|| t	t
||ƒdƒdt|ƒ|d}|| ||}}n|djo||| fSn|| d|dfSdS(s*Round or extend the fraction to size digs.RiRt5it9N(RRRtdigsRRttotalt	nextdigittntchrtord(RRRRRRRR((Rt	roundfrac=s0





8
cCsýt|ƒtdƒjot|ƒ}nyt|ƒ\}}}}Wntj
o|SnXt	|||ƒ\}}t
|||ƒ\}}x'|o|ddjo|d}q’W|djo
d}n|djo||d|Sn	||SdS(s‡Format x as [-]ddd.ddd with 'digs' digits after the point
    and at least one digit before.
    If digs <= 0, the point is suppressed.RiRit.N(ttypetxtreprRRRRRRRR"R(R%RRRRR((RRWs"	


cCsÑt|ƒtdƒjot|ƒ}nt|ƒ\}}}}|phx1|o)|ddjo|d}|d}qKW|o#|d|d}}|d}qÝd}n.|t|ƒd}|d|d|}}t	d|ƒ}t|||ƒ\}}t|ƒdjo6|d|d|d |t|ƒd}}}n||}|djo|d|}ntt
|ƒƒ}ddt|ƒ|}|djod|}nd	|}|d
|S(s¥Format x as [-]d.dddE[+-]ddd with 'digs' digits after the point
    and exactly one digit before.
    If digs is <= 0, one digit is kept and the point is suppressed.RiRiiÿÿÿÿR#it-RteN(R$R%R&RRRRRRtmaxRR"R
tabsR((R%RR(RR
RRR((RRgs8

6



cCs]y=x6tdƒ\}}|Gt||ƒGt||ƒGHqWWnttfj
onXdS(sInteractive test run.isEnter (x, digs): N(tinputR%RRRtEOFErrortKeyboardInterrupt(RR%((Rttest‡s((t__doc__tret__all__tcompileRt
ValueErrorRt	TypeErrorRRR"RRR.(
RR1R0R.RRRRR"R((Rt?s						 

Anon7 - 2021