in reply to Module for file size arithmetic
Oooh, this is really complex when dealing with hard disk or memory sizes. One Kilo Byte to an engineer is 1024 bytes. To a marketing guy one KB is 1,000. They do this so that the numbers look bigger!
In "C", I would just use 64 bit int's (or unsigned 64 bit ints) for the vars which use the actual number of bytes for math operations.
So one question that I don't know: can a perl var be assigned to 64 bit precision? If so, then this becomes easier as scaling factors aren't needed. If not then we can do this with 32 bit math.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Module for file size arithmetic
by mirod (Canon) on Mar 12, 2009 at 12:31 UTC | |
by Marshall (Canon) on Mar 12, 2009 at 14:38 UTC |