r.mapcalc, floating point (fwd)

grass at genie.saff.utah.edu grass at genie.saff.utah.edu
Fri Oct 24 05:34:43 EDT 1997

This solution was succesful and all may take interest.  Thank you James.

Jason Carey
Snow Hydrology
University of Utah

---------- Forwarded message ----------
Date: Fri, 24 Oct 1997 13:05:22 +1000
From: James Cameron <cameron at stl.dec.com>
To: grass at genie.saff.utah.edu
Subject: Re: r.mapcalc, floating point

grass at genie.saff.utah.edu wrote:
>         snoele12_37 = 228*exp(1.2,elevation/1000)
> It runs, however the 'elevation/1000' doesn't seem to hold a floating
> point during the evaluation.

I don't know for sure, but as a guess I'd suggest 1000.0 not 1000,
because that's the way the C language would do it ... it sees 1000.0 as
a floating point constant, and 1000 as an integer constant.

James Cameron                                    (cameron at stl.dec.com)
Digital Equipment Corporation (Australia) Pty. Ltd. A.C.N. 000 446 800

More information about the grass-user mailing list