[Python-ideas] Python3.3 Decimal Library Released

Antoine Pitrou solipsis at pitrou.net
Tue Mar 4 00:10:48 CET 2014


On Mon, 3 Mar 2014 15:07:57 -0800
David Mertz <mertz at gnosis.cx> wrote:
> On Mon, Mar 3, 2014 at 3:01 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> 
> > For the record, int doesn't have a sqrt() method while Decimal has, so
> > if you wanna take the exact square root of a large integer, you'd better
> > convert it to a Decimal.
> >
> 
> Well, actually, if you want to take the square root of a large integer,
> most times you'll need an irrational number as a value.

Well, unless you know by construction that your integer is a perfect
square.

Regards

Antoine.




More information about the Python-ideas mailing list