infinity - Maple Programming Help

infinity

Description

 • infinity is a name in Maple which has several special properties.
 • infinity is used to denote a mathematical infinity, and hence it is usually used as a symbol by itself or as -infinity.
 • Several functions accept infinity as a parameter or produce it as a result of computation (for example, int, sum, limit, min, max, and RealRange). The to part of the for loop statement accepts infinity as an argument, which will cause it to loop forever.
 • The kernel can compare infinity or -infinity to any other numerical value. Hence, infinity can be used in boolean expressions (for example, max, min, etc.).
 In the floating-point computation domain, infinity is represented as Float(infinity), and -infinity is represented as Float(-infinity) or -Float(infinity).  (The exponent fields are both the symbol infinity,  while the mantissas are 1 and -1, respectively.)  For completeness, these can be entered as Float(n, infinity), where n is a non-0 integer. Float(n, infinity) automatically simplifies to sign(n) * Float(infinity).
 • Float(infinity) cannot be assumed to represent the mathematical concept of infinity, as it may also arise from non-infinity operations, such as overflows.  Care must therefore be taken when converting between computation domains (e.g., via round()) that spurious information is not artificially created.
 Note:  While the tests Float(infinity)=infinity and Float(infinity) < infinity both return false, the test Float(infinity) <= infinity returns true.
 • The quantities infinity, -infinity, infinity*I, -infinity*I, infinity + y*I, -infinity + y*I, x + infinity*I and x - infinity*I, where x and y are finite, are all considered to be distinct in Maple. However, all 2-component complex numerics in which both components are infinity are considered to be the same (representing the single point at the "north pole" of the Riemann sphere).
 Similarly, different floating-point infinities are generally considered to represent distinct entities, except that the four infinities Float(+-infinity+-infinity*I) are considered to be the same.
 • The type cx_infinity can be used to recognize this "north pole" infinity.
 • The NumericClass function can also be used to differentiate between the various infinities.
 • Infinity commonly arises as the default value from the divide_by_zero and overflow numeric events.
 • See the type[infinity] help page for more information regarding how to test for an infinity.

Examples

 > $\underset{x→\mathrm{∞}}{lim}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{ⅇ}^{x}$
 ${\mathrm{∞}}$ (1)
 > ${∫}_{1}^{\mathrm{∞}}\frac{1}{{x}^{2}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}ⅆx$
 ${1}$ (2)
 > $\sum _{i=-\mathrm{∞}}^{-1}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}\frac{1}{{i}^{2}}$
 $\frac{{1}}{{6}}{}{{\mathrm{π}}}^{{2}}$ (3)
 > $\mathrm{min}\left(\right),\mathrm{max}\left(\right)$
 ${\mathrm{∞}}{,}{-}{\mathrm{∞}}$ (4)
 > $\mathrm{assume}\left(x,\mathrm{RealRange}\left(-\mathrm{∞},32\right)\right)$
 > $\mathrm{evalb}\left(32<\mathrm{∞}\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{Γ}\left(-1.\right)$
 ${\mathrm{Float}}{}\left({\mathrm{∞}}\right){+}{\mathrm{Float}}{}\left({\mathrm{∞}}\right){}{I}$ (6)

Exceptional conditions or undefined operations signal events, which can be caught or tested for, if desired.

 > $\mathrm{NumericStatus}\left(\mathrm{false}\right)$
 ${\mathrm{invalid_operation}}{=}{\mathrm{true}}{,}{\mathrm{division_by_zero}}{=}{\mathrm{true}}{,}{\mathrm{overflow}}{=}{\mathrm{false}}{,}{\mathrm{underflow}}{=}{\mathrm{false}}{,}{\mathrm{inexact}}{=}{\mathrm{true}}{,}{\mathrm{real_to_complex}}{=}{\mathrm{true}}$ (7)
 > $\frac{\mathrm{∞}}{\mathrm{∞}}$
 ${\mathrm{undefined}}$ (8)
 > $\mathrm{NumericStatus}\left(\mathrm{invalid_operation}\right)$
 ${\mathrm{true}}$ (9)