Use INFINITY instead of DBL_MAX for comparisons

This commit is contained in:
Andrew Kane
2021-04-25 19:16:29 -07:00
parent e0854e6381
commit 0aa39a8c0c
3 changed files with 8 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
#include "postgres.h"
#include <float.h>
#include <math.h>
#include "catalog/index.h"
#include "ivfflat.h"
@@ -110,7 +110,7 @@ BuildCallback(Relation index, CALLBACK_ITEM_POINTER, Datum *values,
{
IvfflatBuildState *buildstate = (IvfflatBuildState *) state;
double distance;
double minDistance = DBL_MAX;
double minDistance = INFINITY;
int closestCenter = -1;
VectorArray centers = buildstate->centers;
TupleTableSlot *slot = buildstate->slot;