[GRASS-dev] r.mapcal rand() strangeness

Maciej Sieczka tutey at o2.pl
Sat Feb 23 17:58:08 EST 2008


$ r.mapcalc 'map=rand(-2147483648,2147483647)'

$ r.stats -1 map | sort -n | uniq
  100%
-2147483647
-2147483646

Why only 2 values from 4294967295 possible? Region is big enough to 
accomodate more than 2 values from the range:

$ g.region -g
n=4928055
s=4913670
w=589970
e=609000
nsres=5
ewres=5
rows=2877
cols=3806
cells=10949862

GRASS 6.3 SVN r30311 (latest).

Maciek


More information about the grass-dev mailing list