[GRASS-user] log(0)-error in r.mapcalculator

2012-11-08 Thread Patrick S.
Dear List, I keep getting a log(0) error in r.mapcalculator, even if I enlarge the data. This seems to be a bug as I controlled the same data with R and get (non-infinity) values. Does r.mapcalculator eventually truncate the results of formulas to some integer values? logit-expression: log(

Re: [GRASS-user] log(0)-error in r.mapcalculator

2012-11-08 Thread Markus Metz
On Thu, Nov 8, 2012 at 10:50 AM, Patrick S. wrote: > Dear List, > > I keep getting a log(0) error in r.mapcalculator, even if I enlarge the > data. This seems to be a bug as I controlled the same data with R and get > (non-infinity) values. Does r.mapcalculator eventually truncate the results > of

Re: [GRASS-user] log(0)-error in r.mapcalculator

2012-11-09 Thread Patrick S.
Thank you so much, Markus! That was the missing hint and it works now! However, I just went through the documentation, which says: "/F/ means that the functions always results in a floating point value" and Function "log" has "F". This is somehow misleading and rather should be an "*". Can I

Re: [GRASS-user] log(0)-error in r.mapcalculator

2012-11-09 Thread Markus Metz
On Fri, Nov 9, 2012 at 9:27 AM, Patrick S. wrote: > Thank you so much, Markus! > > That was the missing hint and it works now! > However, I just went through the documentation, which says: "F means that > the functions always results in a floating point value" and Function "log" > has "F". The do

Re: [GRASS-user] log(0)-error in r.mapcalculator

2012-11-09 Thread Patrick S.
Markus, I understand your arguments, but "A" is the slope of r.slope.aspect and has floating point values as input for the formula. I just created a testcase to be able to report on the behavior in detail. As you can see below the results are truncated to integer as soon as I add a term to "A

Re: [GRASS-user] log(0)-error in r.mapcalculator

2012-11-09 Thread Glynn Clements
Patrick S. wrote: > ###Testcase2: formula= log(((A+1)/100)/(1-(A+1/100))) Note that (A+1/100) = A+(1/100) = A as 1/100 will use integer division. -- Glynn Clements ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.o