Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database float64 values

As I read you are making a new version of the software, well I have some recommendation.
The ADE7878 outputs 24 bit numbers, that you convert into float64. This is OK for doing intermediate calculations to not loose the precision, but it makes no sense to output values as float64 or even store them into a database, since the float64 has 52 bit mantissa, while you get raw data with only 24 bit precision. So my recommendation is to use 32 bit float numbers as a result and database format. 

A 32 bit float has 23 bit mantissa, 1 bit sign and 8 bit exponent, total 32 bits. ADE7878 outputs 24 bit integer values, MSB is sign and 23 bits is number. When multiplying, dividing with float64 you won't loose almost anything, then simply convert the result into 32 bit float. You won't have any loose in precision.

This can save huge amount of storage space (double) without practically loosing any precision.

Messages In This Thread
Database float64 values - by markobursic - 11.10.2019, 15:42
RE: Database float64 values - by clemens - 14.10.2019, 11:17
RE: Database float64 values - by markobursic - 14.10.2019, 18:27

Forum Jump:

Users browsing this thread: 1 Guest(s)