Negative numbers
Pascal Gouery - UHB - 99 33 52 52
gouery at uhb.fr
Mon Oct 16 08:00:00 EDT 1995
...
>From: alobo at ija.csic.es (Agustin Lobo)
>Subject:grass negative numbers?
>Date: 9 Oct 95 18:10:22 GMT
>Message-ID:<120*alobo at ija.csic.es>
...
>How is grass writing negative numbers? I've made a C program
>to import uncompressed binary cell raster files and I get
>wrong results with negatives, even if I read them as
>long integers. I get numbers like :
...
>Agus
I haven't my documentation here in my office - I forgot it at home -,
but as far as i remember, Grass doesn't use "two's complement" as many
computers/softwares. It just uses the first bit as a flag, and the others
bits codes the number as a positive number. For more info, e-mail me or post
another message in the list, i'll search info and ref in the documentation.
Hope this helps you,
+------------------------------:-:-----------------------------------+
| Pascal GOUERY : Tel.: 99.14.13.47 |
| C.R.I. : 99.14.13.52 |
| Universite de Rennes 2 : Fax.: 99.14.13.50 |
| 6, Av G.Berger : |
| 35043 RENNES CEDEX : e.mail: Pascal.Gouery at Uhb.Fr |
| FRANCE : |
+------------------------------:-:-----------------------------------+
More information about the grass-dev
mailing list