Information System : Linux apprendre2 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
Disable Function : NONE
3
\W\ @ s d Z ddlmZ ddlZddlZddlZddlZddlZddgZdd Z dd Z
ejjZ
ejjZejd ejejB ZG d
d dejZdS )z+Fraction, infinite-precision, real numbers. )DecimalNFractiongcdc C sf ddl }|jdtd t| t ko0t|kn r\|p<| dk rPtj| | S tj| |S t| |S )zCalculate the Greatest Common Divisor of a and b.
Unless b==0, the result will have the same sign as b (so that when
b is divided by it, the result comes out positive).
r Nz6fractions.gcd() is deprecated. Use math.gcd() instead. )warningswarnDeprecationWarningtypeintmathr _gcd)abr r !/usr/lib64/python3.6/fractions.pyr s c C s x|r|| | } }qW | S )Nr )r
r r r r r s r aC
\A\s* # optional whitespace at the start, then
(?P[-+]?) # an optional sign, then
(?=\d|\.\d) # lookahead for digit or .digit
(?P\d*) # numerator (possibly empty)
(?: # followed by
(?:/(?P\d+))? # an optional denominator
| # or
(?:\.(?P\d*))? # an optional fractional part
(?:E(?P[-+]?\d+))? # and optional exponent
)
\s*\Z # and optional whitespace to finish
c s e Zd ZdZdSZdTdd fdd Zed
d Zedd
ZdUddZ e
dd Ze
dd Zdd Z
dd Zdd Zdd Zeeej\ZZdd Zeeej\ZZdd Zeeej\ZZd!d" Zeeej\ZZ d#d$ Z!d%d&