Smart bit encoding of floating point values (float, double) -


assume have array of floating point values , bottleneck in disk loading , package size limit. how encode values in order reduce data size, given following 3 inputs:

  • absolute error: can remove mantissa bits long final value not different real value amount (this come design, based on screen error visualization of data)
  • minimum floating point value: smallest value in array
  • maximum floating point value: biggest value in array

note: if float value small converted 0 (because whole mantissa removed due usage of absolute error, big numbers mantissa left untouched).

the order in floating points values appear important (it not points cloud). whichever encoding is, after decoding order should preserved.

right not able save many bits possible:

i save 3 5 bits in exponent field using min/max values, not able exploit absolute error, nor exploit bits in min/max values. can cut 1 3 mantissa bits if max value not big, here again i'm not optimally using 3 inputs.

i'm not looking compression, better encoding (the package 7-zipped). note i'm referring regular float , double values, 1 can find in c# , c++.

importante notice: when exponent big enough in ieee floating point numbers absolute error becomes bigger use input (first point in bullet list). not problem since anyway data started , ended floating point. important instead dropping useless bits in mantissa.

i tried fixed point numbers, work, degree.(see comment tera's answer).

looks me if looking fixed-point representation. subtract minimum value, divide 2 times absolute error limit, , round nearest integer.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -