From: Gregory Brown Date: 2005-12-24T02:07:19+09:00 Subject: Re: BigDecimal#sqrt On 12/22/05, James Edward Gray II wrote: > I'm trying to understand the argument to BigDecimal#sqrt. I figured > it was for precision and it does seem to affect it, but I can't > understand the exactly relationship. Can anyone tell me what the > argument controls and how? This is the C source, if you haven't looked at it yet. BigDecimal_sqrt(VALUE self, VALUE nFig) { ENTER(5); Real *c, *a; S_INT mx, n; GUARD_OBJ(a,GetVpValue(self,1)); mx = a->Prec *(VpBaseFig() + 1); n = GetPositiveInt(nFig) + VpDblFig() + 1; if(mx <= n) mx = n; GUARD_OBJ(c,VpCreateRbObject(mx, "0")); VpSqrt(c, a); return ToValue(c); } I don't fully understand what's going on with it, because my C is pretty weak, but hopefully this will provide some insight from someone.