Function: math[realsort] - sorts real values in ascending order
Calling Sequence:
realsort(expr);
Parameters:
expr - a sequence or list or set of expressions of type realcons
Description:
realsort takes a sequence or list or set expr of real values
..
, internally stores the elements
in a table tbl where
tbl[evalf(
)] :=
,
converts all elements in expr to Maple floats and then applies
sort
to those floats. After sorting
each float evalf(
) is replaced by
again.
The return of realsort is a sequence if expr is a sequence, a list if expr is a list, and a set if expr is a set (in the last case, there is no sorting).
This function is part of the math package, and so can be used only after performing the command with(math) or with(math, realsort).
Examples:
> with(math, realsort):
> li := [1, Pi, exp(1), 0, 1/2];
> sort(li);
> realsort(li);
See Also:
sort .
Version History:
Version 1.0 as of February 14, 1998
Version 1.1 as of June 10, 1998