0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-27 14:16:20 +00:00
netdata_netdata/libnetdata/storage_number
2023-07-06 15:46:48 +00:00
..
tests netdata doubles () 2022-06-28 17:04:37 +03:00
Makefile.am Makefile.am files indentation () 2019-11-11 01:30:00 +02:00
README.md More learn reorg/reordering () 2023-02-10 11:21:10 -08:00
storage_number.c Rename generic error function () 2023-07-06 15:46:48 +00:00
storage_number.h /api/v2 part 10 () 2023-04-13 15:27:34 +03:00

Netdata storage number

Although netdata does all its calculations using long double, it stores all values using a custom-made 32-bit number.

This custom-made number can store in 29 bits values from -167772150000000.0 to 167772150000000.0 with a precision of 0.00001 (yes, it's a floating point number, meaning that higher integer values have less decimal precision) and 3 bits for flags.

This provides an extremely optimized memory footprint with just 0.0001% max accuracy loss.