[GRASS-dev] r.mapcalc division by 0
Helena Mitasova
hmitaso at unity.ncsu.edu
Sun Jan 21 00:27:44 EST 2007
I noticed that the man page for r.mapcalc gives confusing
information about division by 0. It says:
Division by 0 and modulus by 0 are acceptable and give a 0 result.
but later on:
Division by zero should result in NULL.
I tried it and the second is true (it results in NULL)
And then there is an example
To produce a binary representation of the raster map layer a so that
category 0 remains 0 and all other categories become 1:
mask = a/a
but what you get is a map with 1 and NULL.
I assume these are leftovers from pre-NULL times?
Helena
Helena Mitasova
Dept. of Marine, Earth and Atm. Sciences
1125 Jordan Hall, NCSU Box 8208,
Raleigh NC 27695
http://skagit.meas.ncsu.edu/~helena/
More information about the grass-dev
mailing list