[geos-devel] QD (Quad-Double) Approach to Robustness

Mateusz Loskot mateusz at loskot.net
Wed Jun 14 14:42:15 EDT 2006


strk at refractions.net wrote:
> On Wed, Jun 14, 2006 at 11:16:09AM -0700, Martin Davis wrote:
>>> Ok, but equality is actually used in JTS too. Does Java have an 
>>> automatic approximate equality ?
>> I've been working under the assumption that Java uses a single FP 
>> model, so that it's safe to compare FP numbers.
>> 
>> In any case, I'm not sure that JTS uses FP equals for anything 
>> other than checking whether two points are *exactly* the same.  So
>>  this should be portable, I assume.
> 
> As far as you mean memory address comparison that would be portable 
> (pointers are integer values). Unfortunately we don't have garbage 
> collection for free in the C++ world, so in some places your identity
>  checks might have become value comparisons.


Hmm, there are pretty number of GCs for C++, e.g.:
http://www.hpl.hp.com/personal/Hans_Boehm/gc/

But Dear Friends, it would be humorous if GEOS should use real GC :-)
Then GEOS existence has completely no reason, because JTS is there.

p.s. Please note, that I'm quite suspicious about direct Java to C++
ports so my judgements in this subject are quite radical.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net



More information about the geos-devel mailing list