(infinite? x)
Returns true for Infinity and -Infinity values.
(defn infinite? [x] (or (identical? x js/Number.POSITIVE_INFINITY) (identical? x js/Number.NEGATIVE_INFINITY)))