Difference between revisions of "Infinity (MathObject Class)"

From WeBWorK_wiki
Jump to navigation Jump to search
m (moved Infinity (MathObjects Class) to Infinity (MathObject Class): Fix another typo in name (arg!))
Line 1: Line 1:
 
== The Infinity Class ==
 
== 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 <code>sin()</code> or <code>sqrt()</code>. In Perl code, you can use <code>Infinity</code> to obtain this value, or <code>-(Infinity)</code> to obtain its negation. E.g.,
+
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 <code>sin()</code> or <code>sqrt()</code>. In Perl code, you can use <code>Infinity</code> to obtain this value, or <code>-(Infinity)</code> to obtain its negation. E.g.,
   
 
Context("Numeric");
 
Context("Numeric");
Line 9: Line 9:
 
$I = Interval("(",0,Infinity,"]"); # easier as Interval("(0,infinity]");
 
$I = Interval("(",0,Infinity,"]"); # easier as Interval("(0,infinity]");
   
  +
<br>
   
 
[[Category:MathObject_Classes]]
 
[[Category:MathObject_Classes]]

Revision as of 15:35, 2 August 2012

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]");