Formal models and scripts: sloppymath-and-geo-distance-documented-error-bounds
Tools: Python
These are the working models and scripts this part of the hunt used. Some encode the code as it is (a counterexample is the expected result), others a fixed or correct variant; read the header comment of each file. Paths inside them were replaced by placeholders such as $LUCENE (a Lucene checkout) and $WORK.
Findings
- Rectangle.fromPointDistance throws 'invalid longitude NaN' for some legal circles whose edge stops just short of a pole, so LatLon distance queries on them fail with IllegalArgumentException (finding LFV-771; repro ยท finding page)
Files
rectangle-frompointdistance-asin-arg-above-one-nan/model/box_nan_smt.py(used for LFV-771)rectangle-frompointdistance-asin-arg-above-one-nan/model/cos_knot_smt.py(used for LFV-771)rectangle-frompointdistance-asin-arg-above-one-nan/model/cos_knot_smt2.py(used for LFV-771)
How to run
- Python:
python3 <file>.py; scripts that importz3need thez3-solverpackage.
Snapshot of 2026-11-04. AI-assisted; not yet triaged by a human Lucene committer. Feedback: open an issue in lucene-ai-bug-hunt.