o
0¦iRn ã @ sx d Z ddlmZ ddlZddlZddlZddlZddlZdgZej j
Zej jZ
e dejejB ¡ZG dd„ dejƒZdS )z+Fraction, infinite-precision, real numbers.é ©ÚDecimalNÚFractionaC
\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 ZdZdZdRddœ‡ fdd„Zed d
„ ƒZedd„ ƒZd
d„ Z dSdd„Z
edd„ ƒZedd„ ƒZ
dd„ Zdd„ Zdd„ Zdd„ Zeeejƒ\ZZdd„ Zeeejƒ\ZZd d!„ Zeeejƒ\ZZd"d#„ Zeeejƒ\Z Z!d$d%„ Z"ee"ej#ƒ\Z$Z%d&d'„ Z&ee&e'ƒ\Z(Z)d(d)„ Z*ee*ej+ƒ\Z,Z-d*d+„ Z.d,d-„ Z/d.d/„ Z0d0d1„ Z1d2d3„ Z2d4d5„ Z3d6d7„ Z4d8d9„ Z5dTd:d;„Z6d