Re: [Tutor] Having trouble getting mind around decimal module

2006-08-14 Thread Alan Gauld
> >>> from decimal import Decimal > >>> getcontext().prec = 32 > >>> Decimal(1) / Decimal(7) > Decimal("0.14285714285714285714285714285714") > > But I can't figure out how to compute to 32 places things like the > square root of 2, or the arc tangent of .41. Could someone please > show me? The f

Re: [Tutor] Having trouble getting mind around decimal module

2006-08-14 Thread Luke Paireepinart
Dick Moores wrote: > I'm having trouble getting my mind around the decimal module. From > the tutorial () I > can see how to get 1/7 to, say, 32 places: > > >>> from decimal import Decimal > >>> getcontext().prec = 32 > >>> Decimal(1) / Decimal

[Tutor] Having trouble getting mind around decimal module

2006-08-13 Thread Dick Moores
I'm having trouble getting my mind around the decimal module. From the tutorial () I can see how to get 1/7 to, say, 32 places: >>> from decimal import Decimal >>> getcontext().prec = 32 >>> Decimal(1) / Decimal(7) Decimal("0.14285714285714285