Error Messages/40062
Warning messages
- Logarithm of a non-positive number.
Description
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.,
or
IgnoreWarnings( Ln(x) )
In the second case, the result will be NaN.
See Also
- Complex Numbers
- EnableComplexNumbers system variable
- Ln, LogTen
- Sqrt
- NaN
Comments
Enable comment auto-refresher