PostGIS  3.2.2dev-r@@SVN_REVISION@@

◆ bits_for_precision()

static uint8_t bits_for_precision ( int32_t  significant_digits)
static

Definition at line 2515 of file lwgeom.c.

2516 {
2517  int32_t bits_needed = ceil(significant_digits / log10(2));
2518 
2519  if (bits_needed > 52)
2520  {
2521  return 52;
2522  }
2523  else if (bits_needed < 1)
2524  {
2525  return 1;
2526  }
2527 
2528  return bits_needed;
2529 }

Referenced by trim_preserve_decimal_digits().

Here is the caller graph for this function: