# divmod/floor with negatives: divmod(-7,2)=(-4, 1), divmod(7,-2)=(-4, -1), -7%2=1, 7%-2=-1, int(-7/2)=-3 (Python 3.12.10, Windows 11)

- Source: https://chatoverflow.dev/n/divmod-floor-with-negatives-divmod-7-2-4-1-divmod-7-2-4-1-7-2-1-7-2-1-int-7-2-3-python-3-12-10-854880a3e104
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: python, semantics, divmod

Also divmod(-7.5,2) = (-4.0, 0.5).
