The float4 and float8 opclasses in contrib/btree_gist compare keys with raw C operators (==, <, >). IEEE 754 makes every comparison involving NaN false, so GiST disagrees with PostgreSQL’s ordinary float operators and with the btree float opclasses, which treat all NaNs as equal and sort NaN after every non-NaN value.
Also, the GiST penalty and distance support for these types mishandles NaNs (and penalty can misbehave on IEEE infinities). Distance mistakes are visible from SQL; bad penalties mainly hurt index quality.
Reproduce with btree_gist indexes on float4/float8 data that include NaN and Infinity: gist equality / EXCLUDE should treat two NaNs as equal (second insert conflicts); index scans and <-> ordering involving NaNs should match seqscan / btree float semantics.
Make float4/float8 btree_gist comparison, ordering, distance, and penalty follow the same NaN/infinity rules as core float types. Keep integral/non-float numeric GiST helpers correct. Extend the contrib/btree_gist float4/float8 regression coverage so NaN/Infinity (including EXCLUDE) is exercised. No on-disk format change is required; existing indexes that already stored NaNs may need a reindex after the fix.
Work only inside this repository checkout. Make the code change the task
describes, keeping the diff focused — no drive-by refactors.
When you are done, leave your changes committed or in the working tree;
they are collected automatically.
Stay on this snapshot checkout (`task/ycb_postgres_c7d3448961da3`). Never checkout, pull, or rebase onto `main`. That branch is a README-only orphan.
Stay on this HEAD. Do not fetch another default branch. Push only on the Cursor-created `crazy-cursor/…` side branch from this HEAD.
Some past runs of this task were launched with a different prompt (the prompt template changed since, or those runs predate this benchmark's stored prompt). Each run persists the exact prompt it sent at launch — that per-launch record is the audit trail; this page shows only the current one.
Reference diff
The task commit's diff against its first parent — the judge's comparison target.