I think that limit was written to assume that the limit point was real,
and that it was approached on the real line from above, below, or both.
Thus limit(1/x,x,0) has 2 values, inf or -inf depending on the
direction. infinity is unsigned infinity, so I think this is right.
RJF
Leo Butler wrote:
> Is this a bug? I think the correct answer depends on the domain:
>
> (%i2) domain;
>
> (%o2) real
> (%i3) limit(1/x,x,0);
>
> (%o3) infinity
>
> (%i4) ? limit
>
> -- Function: limit (<expr>, <x>, <val>, <dir>)
> -- Function: limit (<expr>, <x>, <val>)
> -- Function: limit (<expr>)
> Computes the limit of <expr> as the real variable <x> approaches
> the value <val> from the direction <dir>. <dir> may have the
> value `plus' for a limit from above, `minus' for a limit from
> below, or may be omitted (implying a two-sided limit is to be
> computed).
>
> It seems to me that domain=real => und, domain=complex => infinity.
>
> Leo
>
>