- Logarithm of a non-positive number.
The logarithm of a non-positive number is not defined on the reals. It is possible to take the logarithm of a negative number if you want a complex number for the result. If you want to manipulate complex numbers, set the system variable EnableComplexNumbers to 1, and then this warning won't occur. If you aren't working with complex numbers, this probably indicates a mistake in your model logic.
To avoid the warning, you can either use, e.g.,
In the second case, the result will be NaN.