Error Messages/40062

Warning messages

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.,

If x>0 Then Ln(x) Else Null


IgnoreWarnings( Ln(x) )

In the second case, the result will be NaN.

See Also


You are not allowed to post comments.