*
**********************************************************************
* $Log$
+ * Revision 1.17 2004/06/03 08:19:20 strk
+ * yet another Infinite check used: finite() - which checks for NaN,-Inf,+Inf
+ *
* Revision 1.16 2004/06/03 08:13:11 strk
* Simplified INFINITY checks by use of isinf()
*
{
GISTENTRY *entry=(GISTENTRY*)PG_GETARG_POINTER(0);
GISTENTRY *retval;
- double checkinf;
if ( entry->leafkey)
{
PG_RETURN_POINTER(entry);
}
- checkinf = in->bvol.URT.x - in->bvol.URT.y -
- in->bvol.LLB.x - in->bvol.LLB.y;
- if ( isnan(checkinf) || isinf(checkinf) )
+ if ( ! finite(in->bvol.URT.x) ||
+ ! finite(in->bvol.URT.y) ||
+ ! finite(in->bvol.LLB.x) ||
+ ! finite(in->bvol.LLB.y) )
{
//elog(NOTICE, "found infinite geometry");
PG_RETURN_POINTER(entry);
*
**********************************************************************
* $Log$
+ * Revision 1.41 2004/06/03 08:19:20 strk
+ * yet another Infinite check used: finite() - which checks for NaN,-Inf,+Inf
+ *
* Revision 1.40 2004/06/03 08:13:11 strk
* Simplified INFINITY checks by use of isinf()
*
*is3d = TRUE; //found 3 entites (x,y,z)
}
- if ( isinf(points[numb_found].x) ||
- isinf(points[numb_found].y) )
+ if ( ! finite(points[numb_found].x) ||
+ ! finite(points[numb_found].y) )
{
elog(ERROR, "infinite coordinate in geom");
return FALSE;
return FALSE; //error occured (nothing parsed)
}
str = end_of_double;
- if ( isinf(points[numb_found].x) )
+ if ( ! finite(points[numb_found].x) )
{
elog(ERROR, "infinite coordinate in geom");
return FALSE;
{
return FALSE; //error occured (nothing parsed)
}
- if ( isinf(points[numb_found].y) )
+ if ( ! finite(points[numb_found].y) )
{
elog(ERROR, "infinite coordinate in geom");
return FALSE;
points[numb_found].z = strtod(str,&end_of_double); //will be zero if error occured
if (!(end_of_double == str))
{
- if ( isinf(points[numb_found].y) )
+ if ( ! finite(points[numb_found].y) )
{
elog(ERROR, "infinite coordinate in geom");
return FALSE;