PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ bits_for_precision()

static uint8_t bits_for_precision ( int32_t  significant_digits)
static

Definition at line 2485 of file lwgeom.c.

2486 {
2487  int32_t bits_needed = ceil(significant_digits / log10(2));
2488 
2489  if (bits_needed > 52)
2490  {
2491  return 52;
2492  }
2493  else if (bits_needed < 1)
2494  {
2495  return 1;
2496  }
2497 
2498  return bits_needed;
2499 }

Referenced by trim_preserve_decimal_digits().

Here is the caller graph for this function: