pgvector.git / summary / log / commit / refs
commit aa77346103e29b7e2db2ae45df74bce237f5ff72
Author: Andrew Kane <andrew@ankane.org>
Date: Fri Sep 20 02:57:16 2024 +0000
Improved code [skip ci]
src/sparsevec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sparsevec.c b/src/sparsevec.c
index 50f6fb8f..44d765b7 100644
--- a/src/sparsevec.c
+++ b/src/sparsevec.c
@@ -709,7 +709,7 @@ array_to_sparsevec(PG_FUNCTION_ARGS)
#ifdef _MSC_VER
/* /fp:fast may not propagate +/-Infinity or NaN */
-#define IS_NOT_ZERO(v) (isnan((float) v) || isinf((float) v) || ((float) v) != 0)
+#define IS_NOT_ZERO(v) (isnan((float) (v)) || isinf((float) (v)) || ((float) (v)) != 0)
#else
#define IS_NOT_ZERO(v) (((float) (v)) != 0)
#endif
[parent: b0da2d95d994]