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 "ivfflat.h"
#include "storage/bufmgr.h"
@@ -15,7 +15,7 @@ FindInsertPage(Relation rel, Datum *values, BlockNumber *insertPage, ListInfo *
Page cpage;
IvfflatList list;
double distance;
double minDistance = DBL_MAX;
double minDistance = INFINITY;
BlockNumber nextblkno = IVFFLAT_HEAD_BLKNO;
FmgrInfo *procinfo;
Oid collation;