Method on @sym: isinf (x)

Return true if a symbolic expression is infinite.

Example:

syms x finite
A = [sym(inf) sym(1)/0 1; x 1 sym(inf)]
  ⇒ A = (sym 2×3 matrix)
      ⎡∞  zoo  1⎤
      ⎢         ⎥
      ⎣x   1   ∞⎦
isinf(A)
  ⇒ ans =
      1   1   0
      0   0   1

Note that the return is of type logical and thus either true or false. However, the underlying SymPy software supports True/False/None answers, where None indicates an unknown or indeterminate result. Consider the example:

syms x
isinf(x)
  ⇒ ans = 0

Here SymPy would have said None as it does not know whether x is finite or not. However, currently isinf returns false, which perhaps should be interpreted as “x cannot be shown to be infinite” (as opposed to “x is not infinite”).

FIXME: this is behaviour might change in a future version; come discuss at https://github.com/cbm755/octsympy/issues/308.

See also: @sym/isnan, @sym/double.

Package: symbolic