Infinity (MathObject Class)

From WeBWorK_wiki
Revision as of 16:25, 2 August 2012 by Dpvc (talk | contribs) (Created page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The Infinity Class

The Infinity class handles the positive infinity of the extended reals. This value can be negated and used in intervals, but can be added to Reals (or other MathObjects) and can't be used as an argument to functions like sin() or sqrt(). In Perl code, you can use Infinity to obtain this value, or -(Infinity) to obtain its negation. E.g.,
   Context("Numeric");
   
   $Inf = Infinity;
   $MInf = -(Infinity);
   $I = Interval("(",0,Infinity,"]");   # easier as Interval("(0,infinity]");