[GRASS-user] Precision of raster/vector float values

Markus Neteler neteler at osgeo.org
Thu Aug 23 07:09:33 PDT 2012


On Thu, Aug 23, 2012 at 3:23 PM, Markus Metz
<markus.metz.giswork at gmail.com> wrote:
> On Thu, Aug 23, 2012 at 2:40 PM, Johannes Radinger
...
>> So if I understand you correctly: 1.0e-15 is the smallest number for
>> values in attribute columns although the values in a DCELL raster
>> can be  smaller?

Just for the record from some older emails:
    CELL    32-bit signed integer
    FCELL   IEEE single-precision floating-point
    DCELL   IEEE double-precision floating-point

On Tue, Nov 23, 2010 at 8:34 PM, Glynn Clements
<glynn at gclements.plus.com> wrote:
> CELL maps contain signed, 32-bit values using sign-bit representation,
> so the range is -2147483647 to 2147483647 inclusive (i.e. -(2^31-1) to
> 2^31-1). So you aren't going to be able to store 12-digit numbers in a
> CELL map.
>
> DCELL maps use the C "double" type, which on most systems is IEEE-754
> double precision, which has a 53-bit mantissa, plus a separate sign
> bit. That can exactly represent any integer between -9007199254740992
> and 9007199254740992 inclusive (i.e. almost 16 decimal digits).

MarkusN


More information about the grass-user mailing list