Indeterminate and Infinite Results

If you type in an expression like 0/0, the Wolfram Language prints a message, and returns the result (RefLink[Indeterminate, paclet:ref/Indeterminate]):

0/0

An expression like 0/0 is an example of an indeterminate numerical result. If you type in 0/0, there is no way for the Wolfram Language to know what answer you want. If you got 0/0 by taking the limit of x/x as x->0, then you might want the answer 1. On the other hand, if you got 0/0 instead as the limit of 2x/x, then you probably want the answer 2. The expression 0/0 on its own does not contain enough information to choose between these and other cases. As a result, its value must be considered indeterminate.

Whenever an indeterminate result is produced in an arithmetic computation, the Wolfram Language prints a warning message, and then returns (RefLink[Indeterminate, paclet:ref/Indeterminate]) as the result of the computation. If you ever try to use (RefLink[Indeterminate, paclet:ref/Indeterminate]) in an arithmetic computation, you always get the result (RefLink[Indeterminate, paclet:ref/Indeterminate]). A single indeterminate expression effectively "poisons" any arithmetic computation. (The symbol (RefLink[Indeterminate, paclet:ref/Indeterminate]) plays a role in the Wolfram Language similar to the "not a number" object in the IEEE Floating Point Standard.)

The usual laws of arithmetic simplification are suspended in the case of (RefLink[Indeterminate, paclet:ref/Indeterminate]):

Indeterminate-Indeterminate

(RefLink[Indeterminate, paclet:ref/Indeterminate]) "poisons" any arithmetic computation, and leads to an indeterminate result:

2 Indeterminate-7

When you do arithmetic computations inside Wolfram Language programs, it is often important to be able to tell whether indeterminate results were generated in the computations. You can do this by using the function (RefLink[Check, paclet:ref/Check]) discussed in "Messages" to test whether any warning messages associated with indeterminate results were produced.

You can use (RefLink[Check, paclet:ref/Check]) inside a program to test whether warning messages are generated in a computation:

Check[(7-7)/(8-8),meaningless]

Indeterminate and infinite quantities.

There are many situations where it is convenient to be able to do calculations with infinite quantities. The symbol (RefLink[Infinity, paclet:ref/Infinity]) in the Wolfram Language represents a positive infinite quantity. You can use it to specify such things as limits of sums and integrals. You can also do some arithmetic calculations with it.

Here is an integral with an infinite limit:

Integrate[1/x^3,{x,1,Infinity}]

The Wolfram Language knows that 1/∞==0:

1/Infinity

If you try to find the difference between two infinite quantities, you get an indeterminate result:

Infinity-Infinity

There are a number of subtle points that arise in handling infinite quantities. One of them concerns the "direction" of an infinite quantity. When you do an infinite integral, you typically think of performing the integration along a path in the complex plane that goes to infinity in some direction. In this case, it is important to distinguish different versions of infinity that correspond to different directions in the complex plane. +∞ and -∞ are two examples, but for some purposes one also needs i∞ and so on.

In the Wolfram Language, infinite quantities can have a "direction", specified by a complex number. When you type in the symbol (RefLink[Infinity, paclet:ref/Infinity]), representing a positive infinite quantity, this is converted internally to the form (RefLink[DirectedInfinity, paclet:ref/DirectedInfinity])[1], which represents an infinite quantity in the +1 direction. Similarly, -(RefLink[Infinity, paclet:ref/Infinity]) becomes (RefLink[DirectedInfinity, paclet:ref/DirectedInfinity])[-1], and (RefLink[I, paclet:ref/I])(RefLink[Infinity, paclet:ref/Infinity]) becomes (RefLink[DirectedInfinity, paclet:ref/DirectedInfinity])[(RefLink[I, paclet:ref/I])]. Although the (RefLink[DirectedInfinity, paclet:ref/DirectedInfinity]) form is always used internally, the standard output format for (RefLink[DirectedInfinity, paclet:ref/DirectedInfinity])[r] is r (RefLink[Infinity, paclet:ref/Infinity]).

(RefLink[Infinity, paclet:ref/Infinity]) is converted internally to (RefLink[DirectedInfinity, paclet:ref/DirectedInfinity])[1]:

Infinity//FullForm

Although the notion of a "directed infinity" is often useful, it is not always available. If you type in 1/0, you get an infinite result, but there is no way to determine the "direction" of the infinity. The Wolfram Language represents the result of 1/0 as (RefLink[DirectedInfinity, paclet:ref/DirectedInfinity])[]. In standard output form, this undirected infinity is printed out as (RefLink[ComplexInfinity, paclet:ref/ComplexInfinity]).

1/0 gives an undirected form of infinity:

1/0