<div dir="ltr"><div class="gmail_extra"></div><div class="gmail_extra">Hi Ken,<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 3, 2016 at 6:06 PM, Markus Neteler <span dir="ltr"><<a href="mailto:neteler@osgeo.org" target="_blank">neteler@osgeo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">> r.mapcalc 'phi = bed*2' does produce a data file, full resolution or downsampled.<br>
><br>
> Oddly, "2*bed" works, but "2.5*bed" does not work.<br>
<br>
</span>That's rather unusual, indeed.<br></blockquote><div><br></div><div>these expressions work for me:<br></div><div><br>> r.mapcalc "test = 21"<br>> r.mapcalc "test_a = 2*test"<br>> r.mapcalc "test_b = 2.5*test"<br>> r.mapcalc "test_c = test*2"<br>> r.mapcalc "test_d = test*2.5"<br>> <a href="http://r.info">r.info</a> test_a | grep "Data Type"<br> |   Data Type:    CELL<br>> <a href="http://r.info">r.info</a> test_b | grep "Data Type"<br> |   Data Type:    DCELL<br>> <a href="http://r.info">r.info</a> test_c | grep "Data Type"<br> |   Data Type:    CELL<br>> <a href="http://r.info">r.info</a> test_d | grep "Data Type"<br> |   Data Type:    DCELL<br><br></div><div>CELL is for integer and DCELL for double (floating point). Spaces around operators are best practice but nor required and I did not include them to make it similar to you example.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class=""><br>
> Does r.mapcalc only do integer math?<br>
<br>
</span>Definitely yes.<br></blockquote><div><br></div><div>I'm not sure what Markus is referring ti but in general, r.mapcalc works with integers and floating point numbers (floats and doubles) as requested.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class=""><br>
> Not according to the manual.<br>
<br>
</span>Oh - so we should improve that:<br>
<a href="https://grass.osgeo.org/grass70/manuals/r.mapcalc.html" rel="noreferrer" target="_blank">https://grass.osgeo.org/grass70/manuals/r.mapcalc.html</a><br>
<br>
Please let us know where to add extra explanations (what did you look<br>
for and didn't find?)</blockquote></div><br></div><div class="gmail_extra">In any case this is true, if you are/were confused about the functionality, please suggest a change to the manual for benefit of others and yours as well when you get back to it after some time.<br><br></div><div class="gmail_extra">Vaclav<br></div></div>