PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ bits_for_precision()

static uint8_t bits_for_precision ( int32_t  significant_digits)
static

Definition at line 2475 of file lwgeom.c.

2476{
2477 int32_t bits_needed = ceil(significant_digits / log10(2));
2478
2479 if (bits_needed > 52)
2480 {
2481 return 52;
2482 }
2483 else if (bits_needed < 1)
2484 {
2485 return 1;
2486 }
2487
2488 return bits_needed;
2489}

Referenced by trim_preserve_decimal_digits().

Here is the caller graph for this function: