*
**********************************************************************
* $Log$
+ * Revision 1.16 2004/06/03 08:13:11 strk
+ * Simplified INFINITY checks by use of isinf()
+ *
* Revision 1.15 2004/06/03 07:58:11 strk
* Infinite coordinate geoms omitted from index
*
checkinf = in->bvol.URT.x - in->bvol.URT.y -
in->bvol.LLB.x - in->bvol.LLB.y;
- if ( isnan(checkinf) || checkinf == INFINITY ||
- checkinf == -INFINITY )
+ if ( isnan(checkinf) || isinf(checkinf) )
{
//elog(NOTICE, "found infinite geometry");
PG_RETURN_POINTER(entry);
pageunion.low.y = cur->low.y;
}
- if (
- pageunion.low.y == -INFINITY ||
- pageunion.low.y == -INFINITY ||
- pageunion.high.y == -INFINITY ||
- pageunion.high.y == INFINITY ||
- pageunion.low.x == -INFINITY ||
- pageunion.low.x == -INFINITY ||
- pageunion.high.x == -INFINITY ||
- pageunion.high.x == INFINITY
- ) elog(NOTICE, "infinite pageunion");
-
-
nbytes = (maxoff + 2) * sizeof(OffsetNumber);
listL = (OffsetNumber *) palloc(nbytes);
listR = (OffsetNumber *) palloc(nbytes);
*
**********************************************************************
* $Log$
+ * Revision 1.40 2004/06/03 08:13:11 strk
+ * Simplified INFINITY checks by use of isinf()
+ *
* Revision 1.39 2004/06/03 07:57:29 strk
* wkt parser throws an error on Infinite coordinates
*
*is3d = TRUE; //found 3 entites (x,y,z)
}
- if ( abs(points[numb_found].x) == INFINITY ||
- abs(points[numb_found].y) == INFINITY )
+ if ( isinf(points[numb_found].x) ||
+ isinf(points[numb_found].y) )
{
elog(ERROR, "infinite coordinate in geom");
return FALSE;
return FALSE; //error occured (nothing parsed)
}
str = end_of_double;
- if ( abs(points[numb_found].x) == INFINITY )
+ if ( isinf(points[numb_found].x) )
{
elog(ERROR, "infinite coordinate in geom");
return FALSE;
{
return FALSE; //error occured (nothing parsed)
}
- if ( abs(points[numb_found].y) == INFINITY )
+ if ( isinf(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 ( abs(points[numb_found].y) == INFINITY )
+ if ( isinf(points[numb_found].y) )
{
elog(ERROR, "infinite coordinate in geom");
return FALSE;