[postgis-users] Improving Performance
David Blasby
dblasby at refractions.net
Thu Feb 19 17:14:54 PST 2004
David Blasby wrote:
> We'll need to write a function that takes a BOX3D and converts it to a
> BOX2DFLOAT. The BOX2DFLOAT's xmin/ymin will have to be strictly less
> than the BOX3D's xmin/ymin to ensure that all the queries work properly.
I looked this up -
// gcc test7.cpp -lm ; ./a.out
#include "stdio.h"
#include "math.h"
int main(int argC, char* argV[])
{
printf("doubles:\n");
printf("%20.20lf\n", nextafter(1.0, 20.0));
printf("%20.20lf\n", 1.0);
printf("%20.20lf\n", nextafter(1.0, -20.0));
printf("floats:\n");
printf("%20.20f\n", nextafterf(1.0, 20.0));
printf("%20.20f\n", 1.0);
printf("%20.20f\n", nextafterf(1.0, -20.0));
}
gives you:
doubles:
1.00000000000000022204
1.00000000000000000000
0.99999999999999988898
floats:
1.00000011920928955078
1.00000000000000000000
0.99999994039535522461
More information about the postgis-users
mailing list