[postgis-tickets] r14891 - Use limits for double, not float, in fix for #3523

Sandro Santilli strk at keybit.net
Wed May 11 07:22:51 PDT 2016


On Wed, May 11, 2016 at 07:18:53AM -0700, Daniel Baston wrote:
> Author: dbaston
> Date: 2016-05-11 07:18:53 -0700 (Wed, 11 May 2016)
> New Revision: 14891
> 
> Modified:
>    trunk/liblwgeom/lwkmeans.c
> Log:
> Use limits for double, not float, in fix for #3523

> -	POINT2D min = { FLT_MAX, FLT_MAX };
> -	POINT2D max = { FLT_MIN, FLT_MIN };
> +	POINT2D min = { DBL_MAX, DBL_MAX };
> +	POINT2D max = { DBL_MIN, DBL_MIN };

Beware that you might be meaning -DBL_MAX instead of DBL_MIN

This is what it expands it otherwsie:

 POINT2D min = { ((double)1.79769313486231570815e+308L), ((double)1.79769313486231570815e+308L) };
 POINT2D max = { ((double)2.22507385850720138309e-308L), ((double)2.22507385850720138309e-308L) };

--strk;


More information about the postgis-tickets mailing list