From: Geoffrey F. <fu...@li...> - 2002-04-08 15:29:51
|
Alan W. Irwin writes: > I do have some further (perhaps naive) comments. I wouldn't worry a bit > about increasing the size of the metafile by a factor of four (assuming we > use 64-bit which is what I hope we do). Disk space and band width are > incredibly cheap now, and the historical trends say they will get a lot > cheaper in the future. It still blows my mind that the 2GB scsi disk I > bought in 1996 cost me $1700. Now, 2GB of ATA disk space can be had for > $10. Well, we do tend to see some monstrously large metafiles even now, and as Maurice mentioned, long haul networking to remote computational sites can make this as much of an issue as the disk space requirement itself. I wonder how well gzip or bzip2 would be able to compress a file made up of lots of binary 64 bit integers with lots of zero bits mixed in. Whatever we chose, the code API's will all have to use the same size values for passing things around between functions, but the plmeta driver could narrow it down to a chosen (run time selectable) bit width before writing it out to disk. I'm okay with this, sounds like Maurice is too. One question I have is, is there a way to specify a 64 bit integer on a 32 bit machine, that is legal ANSI C? I don't think so. If I remember correctly, long long might be 64 bits in GCC/Linux, but it's not in ANSI C. I'd be a little concerned about having the internal data representation of plot coordinates in PLplot depend on a construct that can't be reproduced in a strictly conforming ANSI C program. > Also, it sounds to me that your present difficulties are because integers > lack dynamic range. Would it be possible to get around that limitation by > switching to (64-bit) floating point instead? Well, note that scaled integers of any particular size have more dynamic range than a float of the same size. This is true both because the float covers the whole number line, extending upward and downward from the range covered by the scaled int, but also because several bits go to the exponent. For a 32 bit float, you have 23 bits of mantissa that cover all space, whereas a 32 bit saled integer has all 32 bits of "mantissa" covering just the scaled region. Similarly, a 64 bit float has only 53 bits of mantissa. -- Geoffrey Furnish Lightspeed Semiconductor Corp voice: 408-616-3244 209 North Fair Oaks fax: 408-616-3201 Sunnyvale, CA 94085 |