<div dir="ltr"><div><div>I have the following function (to calculate cell area)<br><br>PI=3.1415926536<br>RES=0.0008333<br>R=6371007<br>r.mapcalc "test3 = (sin(y()+$RES/2) - sin(y()-$RES/2)) * ($RES * $PI/180) * $R^2"<br><br>This will give me a wrong results, apparently because R is an integer value. If I adapt the formula:<br><br>r.mapcalc "test3 = (sin(y()+$RES/2) - sin(y()-$RES/2)) * ($RES * $PI/180) * float($R)^2"<br><br>I get the correct result. From the help file I understand that if any of the arguments is a floating number the result should be a floating number. But that does not seem the case above so apparently I am missing something here. Can anybody explain the logic behind the above?<br><br></div>Rgds<br><br></div>Paulo<br><div><div><br><br></div></div></div>