René's URL Explorer Experiment


Title: Fix HalfVector equality for signed zero by chaduo · Pull Request #164 · pgvector/pgvector-python · GitHub

Open Graph Title: Fix HalfVector equality for signed zero by chaduo · Pull Request #164 · pgvector/pgvector-python

X Title: Fix HalfVector equality for signed zero by chaduo · Pull Request #164 · pgvector/pgvector-python

Description: HalfVector compares its uint16 storage rather than its numeric values, so vectors containing +0.0 and -0.0 compare unequal. Small positive and negative values that both round to zero expose the same issue. Vector and HalfVector in v0.4.2 use numeric equality. Compare the decoded values instead. Keep the existing type check and preserve the stored sign bits, text serialization, and binary serialization. The regression tests cover direct construction, float16 underflow, text decoding, and binary decoding. Validation: the five new cases failed on the unchanged implementation. The focused HalfVector, Vector, SparseVector, and Bit suites pass (60 passed, 8 skipped because SciPy is not installed). No PostgreSQL integration suite was run. Prepared with assistance from OpenAI Codex. No independent human review is implied.

Open Graph Description: HalfVector compares its uint16 storage rather than its numeric values, so vectors containing +0.0 and -0.0 compare unequal. Small positive and negative values that both round to zero expose the sam...

X Description: HalfVector compares its uint16 storage rather than its numeric values, so vectors containing +0.0 and -0.0 compare unequal. Small positive and negative values that both round to zero expose the sam...

Opengraph URL: https://github.com/pgvector/pgvector-python/pull/164

X: @github

direct link

Domain: redirect.github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:0ea6188f-9aac-6532-ae34-24ae22a2a4b2
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9908:87757:B6E381:EF62A9:6AFE8637
html-safe-nonce566732b14d750c28b541b092097124bfec4f780a06bff6df217ce0ed86971460
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTA4Ojg3NzU3OkI2RTM4MTpFRjYyQTk6NkFGRTg2MzciLCJ2aXNpdG9yX2lkIjoiNzIxMjY1MjE0OTQ5MzEwNjIzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc24c5e7892459f2538e6c54c9895301bfe84e56bad7a8d1059fa590396dac4aa
hovercard-subject-tagpull_request:4843496926
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/pgvector/pgvector-python/pull/164/files
twitter:imagehttps://avatars.githubusercontent.com/u/193034689?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/193034689?s=400&v=4
og:image:altHalfVector compares its uint16 storage rather than its numeric values, so vectors containing +0.0 and -0.0 compare unequal. Small positive and negative values that both round to zero expose the sam...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/pgvector/pgvector-python git https://github.com/pgvector/pgvector-python.git
octolytics-dimension-user_id98363230
octolytics-dimension-user_loginpgvector
octolytics-dimension-repository_id376300726
octolytics-dimension-repository_nwopgvector/pgvector-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id376300726
octolytics-dimension-repository_network_root_nwopgvector/pgvector-python
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://redirect.github.com/pgvector/pgvector-python/pull/164/files#start-of-content
https://redirect.github.com/
Sign inhttps://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpgvector%2Fpgvector-python%2Fpull%2F164%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpgvector%2Fpgvector-python%2Fpull%2F164%2Ffiles
Sign uphttps://redirect.github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=pgvector%2Fpgvector-python
Reloadhttps://redirect.github.com/pgvector/pgvector-python/pull/164/files
Reloadhttps://redirect.github.com/pgvector/pgvector-python/pull/164/files
Reloadhttps://redirect.github.com/pgvector/pgvector-python/pull/164/files
pgvectorhttps://redirect.github.com/pgvector
pgvector-pythonhttps://redirect.github.com/pgvector/pgvector-python
Codehttps://redirect.github.com/pgvector/pgvector-python
Issues2 (2)https://redirect.github.com/pgvector/pgvector-python/issues
Pull requests8 (8)https://redirect.github.com/pgvector/pgvector-python/pulls
Actionshttps://redirect.github.com/pgvector/pgvector-python/actions
Security and qualityhttps://redirect.github.com/pgvector/pgvector-python/security
Insightshttps://redirect.github.com/pgvector/pgvector-python/insights
Sign up for GitHub https://redirect.github.com/signup?return_to=%2Fpgvector%2Fpgvector-python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://redirect.github.com/login?return_to=%2Fpgvector%2Fpgvector-python%2Fissues%2Fnew%2Fchoose
chaduohttps://redirect.github.com/chaduo
pgvector:masterhttps://redirect.github.com/pgvector/pgvector-python/tree/master
chaduo:fix/halfvector-numeric-equalityhttps://redirect.github.com/chaduo/pgvector-python/tree/fix/halfvector-numeric-equality
Conversation 2 https://redirect.github.com/pgvector/pgvector-python/pull/164
Commits 1 https://redirect.github.com/pgvector/pgvector-python/pull/164/commits
Checks 0 https://redirect.github.com/pgvector/pgvector-python/pull/164/checks
Files changed https://redirect.github.com/pgvector/pgvector-python/pull/164/files
Please reload this pagehttps://redirect.github.com/pgvector/pgvector-python/pull/164/files
Fix HalfVector equality for signed zero https://redirect.github.com/pgvector/pgvector-python/pull/164/files#top
Show all changes 1 commit https://redirect.github.com/pgvector/pgvector-python/pull/164/files
02c8ea2 Fix HalfVector equality for signed zero chaduo Oct 13, 2026 https://redirect.github.com/pgvector/pgvector-python/pull/164/commits/02c8ea2ca55bc052ec473ff57f5c773bf62669da
Clear filters https://redirect.github.com/pgvector/pgvector-python/pull/164/files
Please reload this pagehttps://redirect.github.com/pgvector/pgvector-python/pull/164/files
Please reload this pagehttps://redirect.github.com/pgvector/pgvector-python/pull/164/files
halfvec.py https://redirect.github.com/pgvector/pgvector-python/pull/164/files#diff-1eb8f76e55db799734ccc426c573b4b053ad21b42f367ef100a83b28449c9cb9
test_half_vector.py https://redirect.github.com/pgvector/pgvector-python/pull/164/files#diff-3b82792f17ce7201407598051f3063c8864522b380ae6a4cfaa7720dd5304eab
pgvector/halfvec.pyhttps://redirect.github.com/pgvector/pgvector-python/pull/164/files#diff-1eb8f76e55db799734ccc426c573b4b053ad21b42f367ef100a83b28449c9cb9
View file https://redirect.github.com/chaduo/pgvector-python/blob/02c8ea2ca55bc052ec473ff57f5c773bf62669da/pgvector/halfvec.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/pgvector/pgvector-python/pull/164/{{ revealButtonHref }}
https://redirect.github.com/pgvector/pgvector-python/pull/164/files#diff-1eb8f76e55db799734ccc426c573b4b053ad21b42f367ef100a83b28449c9cb9
https://redirect.github.com/pgvector/pgvector-python/pull/164/files#diff-1eb8f76e55db799734ccc426c573b4b053ad21b42f367ef100a83b28449c9cb9
tests/test_half_vector.pyhttps://redirect.github.com/pgvector/pgvector-python/pull/164/files#diff-3b82792f17ce7201407598051f3063c8864522b380ae6a4cfaa7720dd5304eab
View file https://redirect.github.com/chaduo/pgvector-python/blob/02c8ea2ca55bc052ec473ff57f5c773bf62669da/tests/test_half_vector.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/pgvector/pgvector-python/pull/164/{{ revealButtonHref }}
https://redirect.github.com/pgvector/pgvector-python/pull/164/files#diff-3b82792f17ce7201407598051f3063c8864522b380ae6a4cfaa7720dd5304eab
https://redirect.github.com/pgvector/pgvector-python/pull/164/files#diff-3b82792f17ce7201407598051f3063c8864522b380ae6a4cfaa7720dd5304eab
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.