<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 2, 2014 at 10:10 PM, GRASS GIS <span dir="ltr"><<a href="mailto:trac@osgeo.org" target="_blank">trac@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">#2053: r.recode: 0.0 or 1.0 as limits do not seem to be taken into account<br>
----------------------------------------------------+-----------------------<br>
 Reporter:  nikosa                                  |       Owner:  grass-dev@…<br>
     Type:  defect                                  |      Status:  new<br>
 Priority:  major                                   |   Milestone:  7.0.0<br>
Component:  Raster                                  |     Version:  unspecified<br>
 Keywords:  r.recode, DCELL, CELL, rules, needinfo  |    Platform:  Unspecified<br>
      Cpu:  Unspecified                             |<br>
----------------------------------------------------+-----------------------<br>
<br>
Comment(by annakrat):<br>
<br>
 Replying to [comment:13 glynn]:<br>
 > Replying to [comment:12 annakrat]:<br>
 ><br>
 > > I attached the diff for this, I decided for floor(x+0.5) logic (but we<br>
 could use just floor if someone is against this). I would rather get some<br>
 approval from other developers for this.<br>
 ><br>
 > The advantage of floor() is that it will produce identical results to<br>
 the existing implementation for positive values.<br>
 ><br>
 > The main disadvantage of floor() is that minuscule rounding errors can<br>
 result in the wrong value, e.g. (CELL)floor(1.9999999) is 1 rather than 2.<br>
<br>
 Thanks for the summary, but I was mainly asking for opinions which one<br>
 should we use. I prefer rounding to the nearest integer, even though it<br>
 can give different results. Anyone has the same/different opinion?<br></blockquote><div><br>+1 for rounding to the nearest integer <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=""><font color="#888888"><br>
--<br>
Ticket URL: <<a href="http://trac.osgeo.org/grass/ticket/2053#comment:14" target="_blank">http://trac.osgeo.org/grass/ticket/2053#comment:14</a>><br>
GRASS GIS <<a href="http://grass.osgeo.org" target="_blank">http://grass.osgeo.org</a>><br>
<br>
_______________________________________________<br>
grass-dev mailing list<br>
<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-dev</a></font></span></blockquote></div><br></div></div>