Opened 15 years ago

Closed 15 years ago

#259 closed defect (fixed)

IsValidOp unit test<1> failed on windows msvc2008 build environment

Reported by: sanak Owned by: strk
Priority: major Milestone: 3.2.0
Component: Default Version: main
Severity: Unassigned Keywords:
Cc:

Description

FINITE(DoubleNotANumber) doesn't return 0 at IsValidOp::isValid.

I had make patch for this problem.

the fixed points are as follows.
1) change DoubleNotANumber value from 1.7e-308 to numeric_limits<double>::quiet_NaN().
1) change DoubleInfinity value from 1.7e+308 to numeric_limits<double>::infinity().
2) add DoubleMax definition (use numeric_limits<double>::max()), because JTS Double.MAX_VALUE and Double.POSITIVE_INFINITY are same in GEOS (I think that this is a bug).
3) add Coordinate::isNull for get equality of NaN value.

I think that xnix environment have same problem (platform.h.in).

Regards,

Attachments (1)

fix-msvc-limits.patch (11.0 KB ) - added by sanak 15 years ago.
TortoiseSVN diff file(Japanese)

Download all attachments as: .zip

Change History (3)

by sanak, 15 years ago

Attachment: fix-msvc-limits.patch added

TortoiseSVN diff file(Japanese)

comment:1 by strk, 15 years ago

Owner: changed from geos-devel@… to strk
Status: newassigned

comment:2 by strk, 15 years ago

Resolution: fixed
Status: assignedclosed

I've committed your patch and modified platform.h.in accordingly. Required also checking for finite() flavor in configure.in. Test from other unixers are very welcome.

Note: See TracTickets for help on using tickets.