Re: print flips to scientific notation when integer exceeds 15 decimal digits

2009-11-05 Thread David Lee
Philip Potter wrote: 2009/11/4 David Lee : [...] Anyway, your explanation was useful and gives us sufficient to decide how to address our local use of these numbers. (In our case, they are human-oriented accumulated byte-counts, for which we don't actually need that significance/precision.)

Re: print flips to scientific notation when integer exceeds 15 decimal digits

2009-11-04 Thread David Lee
Philip Potter wrote: I would guess that these numbers are being stored in floats, and that these floats are 64-bit double precision, with 53 bits of mantissa. That means that there are just under 16 decimal digits of precision in these numbers. print and friends seem to automatically print no mo

Re: print flips to scientific notation when integer exceeds 15 decimal digits

2009-11-04 Thread Philip Potter
2009/11/4 David Lee : > Many thanks for the reply. > > Following the initial surprise, my main concern was that attempts to unearth > a description or explanation (i.e. documentation) for the observed behaviour > was so tricky.  For instance, there was nothing obvious in the relevant > parts of "Pr

Re: print flips to scientific notation when integer exceeds 15 decimal digits

2009-11-03 Thread Philip Potter
2009/11/3 David Lee : > Although I've used perl for many years, I've just been surprised (in the > unpleasant sense) by a recent event.  Given a variable, say "$int", which is > a growing integer, I would expect "print $int" to print it as a simple > integer; indeed it usually does so.  But when it

print flips to scientific notation when integer exceeds 15 decimal digits

2009-11-03 Thread David Lee
Although I've used perl for many years, I've just been surprised (in the unpleasant sense) by a recent event. Given a variable, say "$int", which is a growing integer, I would expect "print $int" to print it as a simple integer; indeed it usually does so. But when its size takes it from 15 de