-
-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
Description
Mathics3 Order[] values for numerics do not take into account the type in numerics when values are the same.
How to Reproduce
In[1]= Order[1.0, 1]
Out[1]= -1 (* Correct value*)
Output Given
Out[1]= 0
Expected behavior
In Order, and Sort and element ordering when numeric values are equal, the element order is probably needed. We currently lump Numeric (PrecisionReal, MachineReal, Integer, Complex) together and I guess we shouldn't.
I tried adjusting this but I am seeing a problem where the test:
ColorNegate[Yellow] == Blue
Fails because RGBColor[0, 0, 1.0] != RGBColor[0, 0, 1] and it should be ==. That possibly a separate bug, but it feels mixed in here, and I don't understand how to fix.
Priority Additional Context
I am wondering if this kind of thing is going to eventually factor into Boxing order. Is it?
Additional context
Metadata
Metadata
Assignees
Labels
No labels