Real average filesize in a set of files?

You might be running into a problem with overruns when summing the file sizes (the total size probably doesn't fit into a 32-bit value). The easiest fix might be to try using a 64-bit int for the variable that's holding the sum.

I do use 64bits. The problem is that (total_size / number of files) cannot work. By example, with this formula, 10 files of 1KB and 1 file of 1MB would give an average of 94KB... which is of course wrong.

– JD. Mar 8 '10 at 9:47 1 Are you maybe looking for something different than average? 94 KB is the correct average of 11 files that are 1.01 MB.

What number would you expect to get for these files? – Adam Ruth Mar 8 '10 at 9:55 1 "which is of course wrong" - I guess you need to specify a little more clearly what average you're looking for. The mean (which is commonly referred to as 'the average') size of 10 1KB files and 1 1MB file is 94KB, so if you're not looking for the mean you should make it clear what you are looking for.

– Michael Burr Mar 8 '10 at 9:59 Hum... I would have expected something closer to 1KB since 10 files out of 11 are 1KB... Would it be called something like weighted average? – JD. Mar 8 '10 at 10:01 Well, 94 KB is a lot closer to 1 KB than it is to 1024 KB.90% closer, actually.

Maybe you want the median, which in this case would be 1 KB. En.wikipedia. Org/wiki/Median – Adam Ruth Mar 8 '10 at 10:08.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions