Article View: news.software.nntp
Article #25193Re: Bet nobody else has *this* problem...
From: Matija Grabnar
Date: Wed, 14 Jan 1998 00:00
Date: Wed, 14 Jan 1998 00:00
89 lines
2585 bytes
2585 bytes
In article <34bd3a1b.348629872@news.corp.home.net>,
Trevor Fiatal <trevor@home.net> wrote:
>On Tue, 13 Jan 1998 12:31:42 GMT, Terry Kennedy <terry@spcuna.spc.edu>
>spake thusly:
>
>>Trevor Fiatal <trevor@home.net> writes:
>>> Perl won't handle integers greater than 2^21, and several of my lusers have
>>> downloaded over 2GB of news in that 48-hour period. And these are
>>> *residential* customers. One of them, from the looks of it, has passed *4GB*
>>> by a few dozen megabytes.
That's weird. Perl uses doubles by default, which means it is accurate
up to 49 bits, which should be enough even for most news applications:
perl -e '$j=1;for $i (0..64) { print "$i $j\n"; $j*=2; }'
0 1
1 2
2 4
3 8
4 16
5 32
6 64
7 128
8 256
9 512
10 1024
11 2048
12 4096
13 8192
14 16384
15 32768
16 65536
17 131072
18 262144
19 524288
20 1048576
21 2097152
22 4194304
23 8388608
24 16777216
25 33554432
26 67108864
27 134217728
28 268435456
29 536870912
30 1073741824
31 2147483648
32 4294967296
33 8589934592
34 17179869184
35 34359738368
36 68719476736
37 137438953472
38 274877906944
39 549755813888
40 1099511627776
41 2199023255552
42 4398046511104
43 8796093022208
44 17592186044416
45 35184372088832
46 70368744177664
47 140737488355328
48 281474976710656
49 562949953421312
50 1.12589990684262e+15
51 2.25179981368525e+15
52 4.5035996273705e+15
53 9.00719925474099e+15
54 1.8014398509482e+16
55 3.6028797018964e+16
56 7.20575940379279e+16
57 1.44115188075856e+17
58 2.88230376151712e+17
59 5.76460752303423e+17
60 1.15292150460685e+18
61 2.30584300921369e+18
62 4.61168601842739e+18
63 9.22337203685478e+18
64 1.84467440737096e+19
Maybe someone said 'use int' or something like that?
--
"My name is Not Important. Not to friends.
But you can call me mr. Important" - Not J. Important
Matija.Grabnar@arnes.si
Technical Details
Message-ID:
<69im0p$bmu$1@kanja.arnes.si>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<34bc54cf.289908102@news.corp.home.net> <EMq2su.7vt@spcuna.spc.edu> <34bd3a1b.348629872@news.corp.home.net>Show Full Headers
Complete Article Headers
Message-ID: <69im0p$bmu$1@kanja.arnes.si> Subject: Re: Bet nobody else has *this* problem... Date: Wed, 14 Jan 1998 00:00:00 +0000 From: matija@arnes.si (Matija Grabnar) References: <34bc54cf.289908102@news.corp.home.net> <EMq2su.7vt@spcuna.spc.edu> <34bd3a1b.348629872@news.corp.home.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 315874638 Reply-To: Matija.Grabnar@arnes.si Organization: Arnes - Academic Research Network of Slovenia Newsgroups: news.software.nntp