[GRASS-dev] results in winGRASS7 32bit vs 64bit: should they be identical?
Markus Neteler
neteler at osgeo.org
Wed Dec 30 03:07:48 PST 2015
On Wed, Dec 30, 2015 at 11:48 AM, Helmut Kudrnovsky <hellik at web.de> wrote:
> hi,
>
> I've done some quick diff test with results of winGRASS7 32bit vs 64bit in
> the NC sample dataset:
>
> r.slope.aspect:
>
> r.mapcalc aspect32bit - aspect64bit => 0
> r.mapcalc slope32bit - slope64bit => 0
>
> they seems to be identical.
>
> r.watershed:
>
> r.mapcalc accum32bit - accum64bit
...
> the results between 32bit and 64bit winGRASS seems not to be identical.
>
> any ideas if they should be identical?
Testing like this will likely show differences due to CPU precision etc.
The test needs to be implemented in a different way, using an epsilon.
Essentially, something like this:
if(abs(map_A - map_B) <= 1e-8,... )
Like this you check if the difference is very small and below the
acceptable threshold.
In C, we use GRASS_EPSILON for these comparisons.
best,
Markus
More information about the grass-dev
mailing list