Open rtoy opened 1 month ago
Imported from SourceForge on 2024-07-07 00:14:49 Created by robert_dodier on 2021-11-29 05:36:57 Original: https://sourceforge.net/p/maxima/bugs/3861/#90df
I tried cutting out SIMPLIMSUBST via (defun simplimsubst (&rest a) nil) and then ran run_testsuite(tests = rtest_limit); and I found several results that are different from the expected results. Without looking more carefully, I don't know whether one set of results is better than the other.
Imported from SourceForge on 2024-07-07 00:14:48 Created by willisbl on 2021-09-21 10:22:22 Original: https://sourceforge.net/p/maxima/bugs/3861
The non-user level function
simplimsubst
evaluates a limit by direct substitution.Near the top of
simplimsubst
there is a check if the expression involves any one of$atan2, $floor, %round, ...
. And when that's the case,simplimsubst
declines direct substitution and returns nil.There are lots of problems with this scheme. For one, the check only looks to see if these functions are in the expression, but it doesn't look to see if the argument of any of these functions depend on the limit variable. This gives rise to inconsistent results:
For %o9, since the expression involves
ceiling
, the functionsimplimsubst
declines to use direct substitution and the limit is computed by some other method. But for %o10,simplimsubst
decides that uses direct substitution is OK and it returns a wrong value.Further, the check declines direct substitution for many cases that are OK; for example the limit of
floor(x)
asx
approaches5/2
for example.