isInfinite package:extended-reals

isInfinite x returns True iff x is PosInf or NegInf.