Size of float in disk_log
Mon Jan 9 12:40:54 CET 2006
Or change the floats first to binary ..., that helps too.
<<Pi/float>> = 3.14 (about).
On Mon, 2006-01-09 at 11:16 +0000, Joel Reymont wrote:
> 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
> > .
Jouni Rynö mailto://Jouni.Ryno@fmi.fi/
Finnish Meteorological Institute http://www.fmi.fi/
Space Research http://www.geo.fmi.fi/
P.O.BOX 503 Tel (+358)-9-19294656
FIN-00101 Helsinki FAX (+358)-9-19294603
Finland priv-GSM (+358)-50-5302903
"It's just zeros and ones, it cannot be hard"
More information about the erlang-questions