PostGIS  3.1.6dev-r@@SVN_REVISION@@

◆ bits_for_precision()

static uint8_t bits_for_precision ( int32_t  significant_digits)
static

Definition at line 2486 of file lwgeom.c.

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

Referenced by trim_preserve_decimal_digits().

Here is the caller graph for this function: