On Wed, Jun 14, 2006 at 08:01:53PM +0200, Mateusz Loskot wrote:

> Sandro,
> 
> Your test case is incorrect.
> You can't compare float numbers as you are doing it in the assert:
> 
> assert(tot_check==tot);
> 
> especially if you're working with multiplatform library as GEOS.
> You can only test how close are both numbers.
> 
> There are many problems. float arithmetic on Intel CPUs deos not follow
> IEEE 754, different representation of float numbers on varios
> architectures: FPU calculations are made on 80 bits numbers (ext.
> double) but SSE2 instructions on 64 bits.

Ok, but equality is actually used in JTS too.
Does Java have an automatic approximate equality ?

Beside this, the XML testcase I have attached should
then represent a valid testcase and should be made
to work with the current "sloppy" fp condition.
Problem is that I suppose JTS won't raise the same
problem (having different fp threatment).

--strk;
_______________________________________________
geos-devel mailing list
geos-devel@geos.refractions.net
http://geos.refractions.net/mailman/listinfo/geos-devel

Reply via email to