Skip to content

Commit 456fee4

Browse files
committed
doc: add coordinate scaling caveat to README
1 parent a51f304 commit 456fee4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ you want to have it added here, please open an issue.
119119
Technical Notes
120120
-------
121121

122+
**Coordinate scaling:** Concorde computes distances using integer arithmetic.
123+
If your coordinates are small (e.g. in [0, 1]), distances between points will
124+
be rounded to 0, leading to incorrect results or crashes. Scale your
125+
coordinates up before passing them to the solver — for example, multiply by
126+
1e6. Similarly, very large coordinates (above 1e7) may cause integer overflow.
127+
See `examples/truncation_demo.py` for a demonstration.
128+
122129
PyConcorde needs Concorde and QSOpt. Downloading and building these packages
123130
should happen automatically on Linux/Mac OS, but please file an issue if you
124131
experience any trouble during this step.

0 commit comments

Comments
 (0)