<div dir="ltr"><div dir="ltr">Dear all <div>I have some strange behaviour in r.mapcalc that i can not figure out the reason. </div><div>I have a Float32 raster with very large pixels values  </div><div>wget <a href="https://www.dropbox.com/s/pxh473rs34wvxuc/basin_lbasin_172_oft_crop.tif?dl=0">https://www.dropbox.com/s/pxh473rs34wvxuc/basin_lbasin_172_oft_crop.tif?dl=0</a></div><div><div>min                      max <br>241981407232    3266766176256<br></div><div>I want rescale to in such a way that  the min is reachin 1 and the maximum value is - min</div><div>Therfore <br></div><div>min=241981407231.0</div><div>r.mapcalc  " output  =   float( float(input)   - $min  ) " <br></div><div>and i get </div><div><br></div><div>min max output<br>1  3024784719872<br></div><div>which rather should be </div><div>3266766176256 - 241981407231 = 3024784769025<br></div><div><br></div><div>It seems to me that the subtraction is working fine for small numbers but not for larger numbers. </div><div>I tried all the combinations of </div><div>r.mapcalc  " output  =   float( float(input)   - $min  ) "  </div><div>r.mapcalc  " output  =   float( input   - $min  ) "  <br></div><div>Attached the script.</div><div>Did I reach some numerical limitation? </div><div>Any suggestions?</div><div>Thanks giuseppe</div><div><br></div><div><br></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Giuseppe Amatulli, Ph.D.<br><br>Research scientist at<br>School of the Environment<br>Yale University</div><div>New Haven, CT, USA - 06511</div><div><div><span style="color:rgb(0,0,0)">Tweeter: @BigDataEcology</span><br></div><div>Teaching: <a href="http://spatial-ecology.net/" target="_blank">http://spatial-ecology.net</a></div>Work:  <a href="https://environment.yale.edu/profile/giuseppe-amatulli/" target="_blank">https://environment.yale.edu/profile/giuseppe-amatulli/</a> </div><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>