-
-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Hi! First of all, thanks for putting your time into this project — I've found it extremely pleasant to work with so far! :-)
Now to my question. I'd like to print a table, sorted by a column where among numerical values like whole or rational numbers, occasionally a square root of a literal 2
would appear. For that to work (it doesn't currently) the generic comparison of such literals has to be supported. Is that feasible?
Currently:
(compare 2 3)
=> -1
(compare (literal-number 2) (literal-number 3))
=> -1
(compare 1 (sqrt (literal-number 2)))
Execution error (ClassCastException) at (REPL:1).
null
(compare (sqrt (literal-number 2)) (sqrt (literal-number 3)))
Execution error (ClassCastException) at (REPL:1).
null
E.g. a naïve approach could take the literal under the root and compare it to the other hand side, squared (or square both sides in case of the sqrt-to-sqrt comparison). How deeps is this rabbit hole after all? :-)
Metadata
Metadata
Assignees
Labels
No labels