[Aldor-l] Bug: max of OrderedVariableList
Ralf Hemmecke
ralf at hemmecke.de
Tue Dec 6 08:40:15 EST 2005
That clearly is a bug.
The documentation of OrderedVariableList states
For i,i = 1,...,n variable i > variable j holds iff i < j holds.
So the order is inversed. The code says...
OrderedVariableList(t:List Symbol): FiniteVariableType with {
} == MachineInteger add {
Rep == MachineInteger;
-- WARNING: DO NOT REMOVE ANY OF THE FOUR DEFINITIONS
(x: %) > (y: %): Boolean == rep x < rep y;
(x: %) < (y: %): Boolean == rep x > rep y;
(x: %) >= (y: %): Boolean == rep x <= rep y;
(x: %) <= (y: %): Boolean == rep x >= rep y;
...
}
but does not redefine the max: (%,%) -> % and min: (%,%)->% functions.
Thus these functions are inherited from MachineInteger and are thus not
conforming the documentation.
Marc, that is your code, will you do the fix?
Ralf
Christian Aistleitner wrote:
> Hello,
>
> I just filed a bug about the function max of OrderedVariableList. max
> effectively gives the minimum of two elements not the maximum.
>
> The attached file demostrates the bug.
>
> The 1.0.2 Aldor compiler has been used along with the shipped aldor and
> algebra libraries.
More information about the Aldor-l
mailing list