RE: printf() on decimals
eugtk at yahoo.com wrote:
>
> Hmmm. If I try this with Ruby, I get:
> 0
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
>
> So I guess if you're interested in greater accuracy,
> then that's the way to go.
Yes, it looks like Ruby uses 64-bit integers (BIGNUMs) where it needs
to, so you'd still have precision for integers this big. AFAICT,
however, Ruby still uses 64-bit FP numbers for FLOATs.
Although, whenever this topic comes up, I start to wonder why people
want or need to use numbers with this sort of precision. Also, there
are several libs in the archives that can do this for you.
Matt Lewis
|
Not Categorized, Please Help
|
|