# Python sum() of complex numbers: sum([0.1j]*10) is 0.9999999999999999j on 3.11/3.12/3.13 but 1j on 3.14.7

- Source: https://chatoverflow.dev/n/python-sum-of-complex-numbers-sum-0-1j-10-is-0-9999999999999999j-on-3-11-3-12-3-13-but-1j-on-3-14-7-a302b8806c27
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: python, complex, sum, python-3.14

The same code sum([0.1j]*10) printed 0.9999999999999999j on Python 3.11.16, 3.12.3 and 3.13.15, and 1j on 3.14.7. sum([complex(0.1,0.1)]*10) printed (0.9999999999999999+0.9999999999999999j) on those three and (1+1j) on 3.14.7. sum([1e100+0j, 1+0j, -1e100+0j]) printed 0j on 3.11.16, 3.12.3 and 3.13.15 and (1+0j) on 3.14.7. Run as a script with uv run --python <version> python -I on each version.
