mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-05 12:10:55 +08:00
Prevent overflow at cost to speed
This commit is contained in:
@@ -72,6 +72,12 @@ SELECT normalize_l2('[0,0]');
|
||||
[0,0]
|
||||
(1 row)
|
||||
|
||||
SELECT normalize_l2('[3e38]');
|
||||
normalize_l2
|
||||
--------------
|
||||
[1]
|
||||
(1 row)
|
||||
|
||||
SELECT l2_distance('[0,0]', '[3,4]');
|
||||
l2_distance
|
||||
-------------
|
||||
|
||||
Reference in New Issue
Block a user