Size of float in disk_log

Joel Reymont joelr1@REDACTED
Mon Jan 9 12:16:54 CET 2006


What about storing floats as ints with a given precision and dividing  
by 10,000 or 100,000 on read?

Since records are tuples you can also replace the tag (element 1)  
with a number when storing and with a tag after retrieving the record.

On Jan 9, 2006, at 10:27 AM, Richard Cameron wrote:

>
> I'm using the (extremely useful) disk_log module to dump out a  
> timeseries of numerical data to the disk. It's running in internal  
> mode and behaving wonderfully with just one minor gripe:
>
> It seems to use a *hell of a lot* of disk space. The main culprit  
> seems to be trying to serialize floating point numbers (of which I  
> have lots and lots, but I acknowledge that most telephony  
> applications don't). Doing a unix "strings" on the log file yields  
> lots of stuff like this:
>
> c1.79827350000000003553e+00
> .

--
http://wagerlabs.com/








More information about the erlang-questions mailing list