mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-01 18:21:16 +08:00
Added comments [skip ci]
This commit is contained in:
@@ -699,6 +699,7 @@ vector_add(PG_FUNCTION_ARGS)
|
||||
for (int i = 0, imax = a->dim; i < imax; i++)
|
||||
rx[i] = ax[i] + bx[i];
|
||||
|
||||
/* Check for overflow */
|
||||
for (int i = 0, imax = a->dim; i < imax; i++)
|
||||
{
|
||||
if (isinf(rx[i]))
|
||||
@@ -734,6 +735,7 @@ vector_sub(PG_FUNCTION_ARGS)
|
||||
for (int i = 0, imax = a->dim; i < imax; i++)
|
||||
rx[i] = ax[i] - bx[i];
|
||||
|
||||
/* Check for overflow */
|
||||
for (int i = 0, imax = a->dim; i < imax; i++)
|
||||
{
|
||||
if (isinf(rx[i]))
|
||||
|
||||
Reference in New Issue
Block a user