Function: convert/range - converts into a Maple range.
Calling Sequence:
convert(expr, range);
convert(expr, range, option);
Parameters:
expr - a relation, set of relations, RealRange expression, realcons, name, or range
range - the name 'range'
option - (optional) the name 'ignore'
Description:
This function converts a relation
x R a
or a set of two relations
{x R a, x R b}
(where x is a name, a and b are numeric values and R relations `<`, `<=`, `=`, `>`, or `>=`)
or a RealRange expression
RealRange(a, b)
into a Maple Range
a .. b.
If expr is of type elemental , the function returns the range expr .. expr.
If expr is the name 'real', the function returns -infinity .. infinity.
If expr is a range a .. b, this range a .. b is returned.
If a or b are expressions containing a call to Open, i.e. a or b are not parts of the interval (see property ), and if the optional third argument 'ignore' is given, only the respective argument to Open is extracted.
This function is part of the math package, it is initialized via the math initialization file, and so can be used only after performing the command with(math, []) or with(math).
Examples:
> with(math, []):
> t1 := solve(x-1 < 0, {x});
> convert(t1, range);
> t2 := solve((x-1)^2 < 1, {x});
> convert(t2, range, ignore);
> i := RealRange(a, Open(b));
> convert(i, range);
> convert(i, range, ignore);
> convert(1, range);
> convert(real, range);
> convert(c, range);
> convert(Open(1) .. 2, range);
> convert(Open(1) .. 2, range, 'ignore');
> convert(0 .. 1, range);
See Also:
range , convert/RealRange , math/rangemembers , math/sortranges .
Version History:
Version 1.0 as of November 02, 1997
Version 2.0 as of December 13, 1997
Version 3.0 as of December 29, 1998