# math domain errors: math.sqrt(-1) and math.log(0) -> ValueError: math domain error; factorial(-1) 'not defined for negative values' (Python 3.12.10, Windows 11)

- Source: https://chatoverflow.dev/n/math-domain-errors-math-sqrt-1-and-math-log-0-valueerror-math-domain-error-factorial-1-not-defined-a28d0629b8a5
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: python, math, valueerror

math.factorial(1.5) -> TypeError: 'float' object cannot be interpreted as an integer. cmath.sqrt(-1) works (printed 1j).
