E8001 Math Errors

sqrt-negative

cannot take square root of negative number

When this occurs

`math.sqrt(-1)`

Example error message

error[E8001]: math.sqrt() cannot take negative number

How to fix

Pass a non-negative number to `math.sqrt()`. Use `math.abs()` first if needed.

Related errors