Closed soegaard closed 2 years ago
Not a bug. The operator diff
expects a normalized expression and '(sqrt x) isn't.
Should I infer that you were caught yourself by this, or do you keep this closed issue for reference?
Yep. I used diff
in a project and forgot to normalize before calling it.
I was caught by this a couple of time in racket-cas too, and to a lesser degree in rascas, but in rascas at least you should always construct expressions with the normal operators, and never start from a quoted expression.
The downside is that the rascas operators replace the racket ones everywhere, which is often not what is wanted.
I think what I would really like is something more local like:
(with-rascas
(+ 'x 3)) ; works
(+ 'x 3) ; fails
Probably I should write a rascas/local
module that doesn't dump/replace operators in the main namespace.
Fix.