[GRASS5] r.random broken

Glynn Clements glynn at gclements.plus.com
Wed Jul 6 09:48:56 EDT 2005


Markus Neteler wrote:

> there is probably another canditate:
> 
> ~/grass61/raster/r.mapcalc > grep lrand *
> xrand.c:#define lrand48() ((long)rand())
> xrand.c:                        long x = lrand48();

That one is less of a problem, as it doesn't matter what the range of
lrand48() is, so long as it's larger than the interval between the
arguments to r.mapcalc's rand() function. The macro could still be a
problem if rand() only returns e.g. 16-bit values.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list